ConcourseQuickNotes - henk52/knowledgesharing GitHub Wiki
Introduction
References
-
https://www.thoughtworks.com/insights/blog/modernizing-your-build-pipelines
-
https://blog.scottlogic.com/2016/06/20/declarative-ci-cd-with-concourse.html
Commands
- fly builds --target YOUR_TARGET [--team YOUR_TEAM]
- Display the results for the last couple of builds for all the builds/jobs that are visible to you.
- fly execute --target YOUR_TARGET --config YOUR_YAML
- -c, --config= The task config to execute
- -i, --input=NAME=PATH An input to provide to the task (can be specified multiple times)
- The PATH is actually a path, though I do not know what it does
- the -i option can be removed if the current directory is the same name as the required input.
- short cmd: 'e'
- fly login --target YOUR_TARGET --team-name MY_TEAM --concourse-url https://concourse.YOUR_ADDR
- t, --target= Concourse target name
- a sort of tag for when you are authenticated against several machines or several teams?
- -n, --team-name= Team to authenticate with
- t, --target= Concourse target name
- fly logout --target YOUR_TARGET
- Log out of this session.
- fly --target test rename-pipeline --old-name OLD --new-name NEW
- Renames the existing pipeline OLD to be named NEW.
- fly set-pipeline --target YOUR_TARGET --config pipeline.yml --verbose --pipeline hello-world
- -p, --pipeline= Pipeline to configure
- This seems to become the name of the pipeline on councourse, and seems to have no relation to names inside the pipeline yaml file
- -p, --pipeline= Pipeline to configure
- fly sync --target YOUR_TARGET
- Get the latest version of 'fly' from the server ?
- fly status --target YOUR_TARGET
- Show if you login is still valid.
- fly targets --target YOUR_TARGET
- Shows that targets you have defined/used.
- fly watch --target YOUR_TARGET --job PIPELINE/JOB --build BUILD_NUMBER
- Show the screen log output of the job.
Pibeline Yaml
- jobs: root node, holds all the jobs
- name: Just a descriptive node.
- public: true/false, public - you can see it, even if not logged in.
- plan:
- get: refers to a resource that needs to be activated.
- task: ?
- file: only yaml files? Does this mean the .yml file is now executed in this context?
Meta data
not available to task
- $BUILD_ID: The internal identifier for the build. Right now this is numeric but it may become a guid in the future. Treat it as an absolute reference to the build.
- $BUILD_NAME: The build number within the build's job.
- $BUILD_JOB_NAME: The name of the build's job.
- $BUILD_PIPELINE_NAME: The pipeline that the build's job lives in.
- $BUILD_TEAM_NAME: The team that the build belongs to.
- $ATC_EXTERNAL_URL: The public URL for your ATC; useful for debugging.
Triggering
Triggering at a certain interval
https://concoursetutorial.com/basics/triggers/
Resourse
Create your own resource
- https://concourse-ci.org/resources.html
- https://concourse-ci.org/resource-types.html
- https://concourse-ci.org/implementing-resource-types.html
- https://content.pivotal.io/blog/developing-a-custom-concourse-resource