Playpen and examples for concourse CI resources.
Prerequisites:
- concourse installation
- team set up in concourse and target set up using
fly
.
git_pipeline_ex.yml is a "toy" changelog builder that triggers off of repo commits. A changelog entry is added to a different repo than the one being monitored. In this example, commits to master on this repo are added to this readme. One could imagine aggregating multiple repo's commits into a single repo's changelog.
- using pipeline assets from a git repo
- a pipeline trigger off of repo commits (ci-assets - this repo in this example)
- splitting scripts from tasks
- linking output of one task to input of another
- parameterizing pipleine variables
- pushing commits to a different repo
- pipeline git_pipeline_ex.yml
- pipeline credentials credentials_ex.yml
- tasks last-commit.yml update-readme.yml
- scripts last-commit.sh update-readme.sh
ci-assets
repo commit triggerslast-commit
last-commit
pulls and formats the latest commit as outputupdate-readme
takes the output oflast-commit
and makes aREADME.md
update inci-changelog
- pipeline does a put on the
ci-changelog
repo resource
- update
credentials_ex.yml
appropriately fly -t <your target> set-pipeline -p git -c ci/git_pipeline_ex.yml -l ci/credentials_ex.yml
- unpause pipeline (UI or via fly)
- commit to
master
ofci-assets
, and you should see a build kick off that culminates in a README.md entry inci-changelog
- this is just pattern code, not production ready
- relatively tight coupling between pipeline/tasks/scripts (e.g. file names, etc): needs better parameterization
- even though credentials are externalized, anyone with concourse pipeline access will see them. Consider using an external store, e.g.
vault