-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #151 from Clever/INFRANG-6709
[INFRANG-6709] Finish the README and docs
- Loading branch information
Showing
4 changed files
with
40 additions
and
35 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,44 @@ | ||
# goci | ||
|
||
`goci` is a small command line application which performs packaging and | ||
publishing of Clever build artifacts. | ||
`goci` is a small command line application which performs building, publishing, and deploying applications. It is the next evolution of many of the scripts in this repository, and offers more automation, configurability and optimization. | ||
|
||
# Configuration | ||
## Configuration | ||
|
||
goci does not accept any arguments and is instead configured entirely | ||
through environment variables and launch config settings. See the | ||
[environment](../../internal/environment/environment.go) package for | ||
detailed documentation of environment variables for configuration. goci | ||
reads it's configuration from the `build` section of the launch config | ||
of each application. | ||
goci accepts very limited arguments which merely change the mode it runs in. The rest of the configuration is entirely through environment variables and launch config settings. See the[environment](../../internal/environment/environment.go) package for detailed documentation of environment variables for configuration. goci reads it's configuration from the `build` section of the launch config of each application. See the [build section](https://github.com/Clever/catapult/blob/master/swagger.yml#L1773) of the launch yaml to learn about the various parameters which configure goci. | ||
|
||
# Multi-app Support | ||
## Modes | ||
|
||
1. `goci detect` detects any changed applications according to their launch configuration. This can be used to pass a name of apps to another script. | ||
2. `goci artifact-build-publish-deploy` builds, publishes and deploys any application artifacts. | ||
|
||
|
||
## Multi-app Support | ||
|
||
goci will automatically detect all launch configs in the `launch` | ||
directory, then perform the following actions as needed. | ||
|
||
1. detect the run type of the application | ||
2. build any docker images | ||
3. publish all built docker images to ECFR | ||
4. publish all pre-built lambdas to s3 | ||
2. Run any configured build commands | ||
3. build any docker images | ||
4. publish all built docker images to all ECR regions | ||
5. publish all lambdas to s3 in all regions. | ||
6. Sync all changed apps with catalog config | ||
7. Publish new application versions to catapult | ||
8. Deploy any changed applications. | ||
|
||
## Development | ||
|
||
Currently, goci does not build lambdas. | ||
Since goci is just a go app, it can be run locally after building the binary. goci expects to be run from within the root of an applications repo. | ||
|
||
## Running and testing locally | ||
There is a [test app](./testApp) in this repository which you can use to run goci on locally and test various build configurations. Additionally, you can leverage the built in integrations tests in https://github.com/Clever/circleci-orbs/tree/master, which call goci to test new builds of goci in CI. | ||
|
||
Since goci is just a go app, it can be run locally after building the | ||
binary. goci expects to be run from within the root of an applications | ||
repo. You may use the `testApp` within this repo for testing various | ||
launch configurations of goci. | ||
### Running locally | ||
Running goci locally is not easy because it leverages a lot of variables set in our CI environments. Generally it would be easier to use the private orbs repo, or make a branch on another app like catapult and pull in the development branch of goci there for testing in CI. If you need to run locally, you can view each of the variables required for local runs in the environment file and provide them all to the command. | ||
|
||
```bash | ||
$ go build -o ./bin/goci ./cmd/goci | ||
go build -o ./bin/goci ./cmd/goci | ||
|
||
$ cp ./bin/goci ./testApp | ||
cp ./bin/goci ./testApp | ||
|
||
$ cd testApp && goci | ||
cd testApp && goci | ||
``` |
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