-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sdk/gleam] update README.md [sdk/gleam] update README.md
- Loading branch information
Showing
105 changed files
with
2,688 additions
and
366 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.beam | ||
*.ez | ||
/build | ||
erl_crash.dump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) 2024 Tsiry Sandratraina <tsiry.sndr@fluentci.io> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# FluentCI Gleam SDK | ||
|
||
[![Package Version](https://img.shields.io/hexpm/v/fluentci)](https://hex.pm/packages/fluentci) | ||
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/fluentci/) | ||
|
||
The FluentCI Gleam SDK provides a set of APIs to interact with FluentCI in Gleam, it allows you to write CI/CD pipelines in Gleam. | ||
|
||
## 🚚 Installation | ||
|
||
```sh | ||
gleam add fluentci | ||
``` | ||
|
||
## 🚀 Quick Start | ||
|
||
```gleam | ||
import fluentci.{dag, pipeline, set_secret} | ||
import fluentci/pipeline.{ stdout, with_exec, with_secret_variable} | ||
import fluentci/secret.{plaintext} | ||
import gleam/io | ||
import gleam/javascript/array.{from_list} | ||
import gleam/javascript/promise.{await, resolve} | ||
pub fn main() { | ||
// This pipeline will print "Hello, World!" to the console | ||
dag() | ||
|> pipeline("hello-world") | ||
|> with_exec(from_list(["echo", "Hello, World!"])) | ||
|> await(fn(output) { | ||
io.println(output) | ||
resolve(value) | ||
}) | ||
// This pipeline will print the value of a secret to the console | ||
let secret = dag() |> set_secret("GITHUB", "my-github-token") | ||
secret | ||
|> plaintext | ||
|> await(fn(value) { | ||
io.println(value) | ||
resolve(value) | ||
}) | ||
dag() | ||
|> pipeline("secret-demo") | ||
|> with_secret_variable("GITHUB", secret) | ||
|> with_exec(from_list(["echo", "$GITHUB"])) | ||
|> stdout | ||
|> await(fn(value) { | ||
io.print("Secret demo: ") | ||
io.println(value) | ||
resolve(value) | ||
}) | ||
} | ||
``` | ||
|
||
Further documentation can be found at <https://hexdocs.pm/fluentci>. |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.