Skip to content

Commit

Permalink
docs: fixing errors in extensions documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
clintjedwards committed Apr 18, 2023
1 parent 05f9e8d commit 0dc073a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 deletions.
1 change: 0 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ There are several useful things we can do with the concept of extensions:
### On the floor

- Force for both objects and secrets need to be checked. Some layers of the process does not respect it.
- Documentation has a bunch of code references to "with" that doesn't exist anymore as an API.

- Github Extension:
- Because things are handled at the current abstraction layer for users who just want to throw code and have it work it can be difficult. Users who operate within Gofer will have to do at least some thought about repositories downloads, possibly caching, transferring between containers, etc. These are all things that some CI/CD systems give for free. The managing of large git repos is the biggest pain point here.
Expand Down
8 changes: 2 additions & 6 deletions documentation/src/ref/extensions/provided/cron.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,8 @@ It uses a stripped down version of the cron syntax to do so:

### Every year on Xmas

```go
...
WithExtensions(
*sdk.NewExtension("cron", "yearly_on_xmas").WithSetting("expression", "0 1 25 12 * *"),
)
...
```bash
gofer pipeline extend simple cron yearly_on_xmas -s expression="0 1 25 12 * *"
```

## Extension Configuration
Expand Down
8 changes: 2 additions & 6 deletions documentation/src/ref/extensions/provided/interval.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ Interval simply runs the subscribed pipeline at the given time interval continou

- `every` <string>: Specifies the time duration between events. Unless changed via the extension configuration, the minimum for this is 5 mins.

```go
...
WithExtensions(
*sdk.NewExtension("interval", "every_five_mins").WithSetting("every", "5m"),
)
...
```bash
gofer pipeline extend simple interval every_five_mins -s every="5m"
```

## Extension Configuration
Expand Down
6 changes: 3 additions & 3 deletions documentation/src/ref/pipeline_configuration/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ A Task can be any Docker container you want to run. In the [Getting Started](../
```go
Tasks(
sdk.NewTask("simple_task", "ubuntu:latest").
WithDescription("This task simply prints our hello-world message and exists!").
WithCommand("echo", "Hello from Gofer!"),
Description("This task simply prints our hello-world message and exists!").
Command("echo", "Hello from Gofer!"),
)
```

## Task Environment Variables and Configuration

Gofer handles container configuration [the cloud native way](https://12factor.net/config). That is to say every configuration is passed in as an environment variable. This allows for many advantages, the greatest of which is standardization.

As a user, [you pass your configuration in via the `Variable(s)`](https://pkg.go.dev/github.com/clintjedwards/gofer@v0.3.0/sdk/go/config#TaskConfig.Variables) flavor of functions in your pipeline-config.
As a user, [you pass your configuration in via the `Variable(s)`](https://pkg.go.dev/github.com/clintjedwards/gofer@v0.5.0/sdk/go/config#TaskConfig.Variables) flavor of functions in your pipeline-config.

When a container is run by Gofer, the Gofer scheduler has the potential to pass in configuration from multiple sources[^1]:

Expand Down

0 comments on commit 0dc073a

Please sign in to comment.