{"id":18078472,"url":"https://github.com/techgaun/concourse-cheatsheet","last_synced_at":"2026-03-02T22:31:56.169Z","repository":{"id":38127994,"uuid":"285925005","full_name":"techgaun/concourse-cheatsheet","owner":"techgaun","description":"Concourse CI cheatsheet","archived":false,"fork":false,"pushed_at":"2020-08-18T04:12:23.000Z","size":48,"stargazers_count":23,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T20:41:31.949Z","etag":null,"topics":["concourse","concourse-cheatsheet","concourse-ci","fly-commands","hacktoberfest","hacktoberfest2021","pipleline-configurations"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/techgaun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-07T21:36:22.000Z","updated_at":"2024-11-14T21:03:46.000Z","dependencies_parsed_at":"2022-08-18T14:02:35.008Z","dependency_job_id":null,"html_url":"https://github.com/techgaun/concourse-cheatsheet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/techgaun/concourse-cheatsheet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techgaun%2Fconcourse-cheatsheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techgaun%2Fconcourse-cheatsheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techgaun%2Fconcourse-cheatsheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techgaun%2Fconcourse-cheatsheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techgaun","download_url":"https://codeload.github.com/techgaun/concourse-cheatsheet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techgaun%2Fconcourse-cheatsheet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30022929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T22:30:10.381Z","status":"ssl_error","status_checked_at":"2026-03-02T22:23:34.650Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["concourse","concourse-cheatsheet","concourse-ci","fly-commands","hacktoberfest","hacktoberfest2021","pipleline-configurations"],"created_at":"2024-10-31T12:14:17.647Z","updated_at":"2026-03-02T22:31:56.152Z","avatar_url":"https://github.com/techgaun.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Concourse CI](https://avatars1.githubusercontent.com/u/7809479?s=50\u0026v=4)](https://concourse-ci.org/)\n# concourse-cheatsheet\n\n\u003e Cheatsheet for working with Concourse CI\n\nThis cheatsheet lists various useful tips and tricks to use with [Concourse CI](https://concourse-ci.org/)\nand thus omits the very basics such as logging in or setting pipeline from yaml file.\n\n## Table of Contents\n\n- [Fly CLI](#fly-cli)\n- [Pipleline Configurations](#pipleline-configurations)\n- [Miscellaneous](#miscellaneous)\n- [Editor Support](#editor-support)\n- [Links](#links)\n\n## Fly CLI\n\n### [Fly completion](https://concourse-ci.org/fly.html#fly-completion)\n\n```shell\n# for bash, put the following on your .bashrc\nsource \u003c(fly completion --shell bash)\n\n# for zsh, put the following on your .zshrc\nsource \u003c(fly completion --shell zsh)\n```\n\n### List pipelines in all teams\n\n```shell\n# lists all the accessible pipelines regardless of what team you're on in the target\nfly -t \u003cyour_target\u003e ps -a\n```\n\n### List all workers with details\n\n```shell\nfly -t \u003cyour_target\u003e workers --details\n```\n\n### List build containers\n\n```shell\nfly -t \u003cyour_target\u003e containers\n\n# above command also provides handle id which you can use to intercept\nfly -t \u003cyour_target\u003e intercept --handle \u003chandle_id\u003e # eg. handle_id - 5f588b86-116b-4e7c-5bef-811dad839539\n```\n\n### Intercept build aka grab an interactive shell inside build container for debugging\n\n```shell\n# simple example to connect to a particular pipeline's specific job\nfly -t \u003cyour_target\u003e intercept --job \u003cPIPELINE\u003e/\u003cJOB_NAME\u003e\n\n# simple example to connect to a particular pipeline's specific job and run specific binary\n# this is useful to specify custom shell such as sh in alpine or any arbitrary command during intercept\nfly -t \u003cyour_target\u003e intercept --job \u003cPIPELINE\u003e/\u003cJOB_NAME\u003e \u003cyour_custom_binary\u003e\n```\n\n### Arbitrary API requests to your Concourse CI\n\n```shell\nfly -t \u003cyour_target\u003e curl /api/v1/info\n\u003e {\"version\":\"6.1.0\",\"worker_version\":\"2.2\",\"external_url\":\"https://concourse.example.com\"}\n\nfly -t \u003cyour_target\u003e curl /api/v1/builds\n\u003e json_array_of build_lists\n```\n\n### Make pipeline visible to unauthenticated users\n\nThis is often useful for open-source projects so that the build pipeline\nis visible for unauthenticated users.\n\n```shell\nfly -t \u003cyour_target\u003e expose-pipeline --pipeline \u003cYOUR_PIPELINE\u003e\n```\n\n### Format your pipeline\n\nConcourse has a handy fly command to format your pipeline in a \"canonical\" form.\nOmitting `-w` / `--write` would print formatted pipeline on stdout instead.\nThis is useful when you've made a mess of your yaml configuration formatting.\n\n```shell\nfly format-pipeline -c \u003cYOUR_PIPELINE.yml\u003e -w\n```\n\n### Different team in your fly commands\n\nBy default, concourse sets team on a target when you login and its cumbersome\nto manage multiple targets just to be working on a different team space. Fly\ncommands support `--team` so you can specify another team name in a single target.\nHowever, this is a work in progress as tracked [HERE](https://github.com/concourse/concourse/issues/5215)\nso make sure you check the progress in above issue or by checking the help information.\n\n## Pipleline Configurations\n\n### Root privileges in container for your jobs\n\n- Use `privileged: true` in the task config.\n\n```yaml\n- task: some-task\n  privileged: true\n```\n\n### Custom icons for your resources\n\n- You can use icon name from [Material Design icon](https://materialdesignicons.com/) to get nice little icon by your resource.\n\n```yaml\n- resources:\n  - name: my-image\n    type: registry-image\n    icon: docker\n```\n\n### YAML anchors to re-use configuration blocks\n\nYou can use YAML anchor to re-use configuration blocks and remove duplicates.\nOften times, you can use `file` directive but still the anchor syntax can be useful.\n\n```yaml\n# this is an example from concourse docs\n# the following repetitive blocks can be shortened using yaml anchor syntax\nlarge_value:\n  do_the_thing: true\n  with_these_values: [1, 2, 3]\n\nduplicate_value:\n  do_the_thing: true\n  with_these_values: [1, 2, 3]\n\n# look how we anchor a block with \u0026anchor_name syntax and reference it with *anchor_name\nlarge_value: \u0026my_anchor\n  do_the_thing: true\n  with_these_values: [1, 2, 3]\n\nduplicate_value: *my_anchor\n```\n\nThe same anchor syntax can be used to merge yaml objects.\nOn the example below, you can see how we can avoid duplicate\nAWS ECR configuration by using anchor.\n\n```yaml\naws-ecr-config: \u0026aws-ecr-config\n  aws_role_arn: ((ecr-role-arn))\n  aws_region: ((ecr-region))\n  aws_access_key_id: ((ecr-access-key-id))\n  aws_secret_access_key: ((ecr-secret-access-key))\n\nresources:\n  - name: elixir-1.8.2\n    type: registry-image\n    source:\n      repository: engineering/elixir\n      tag: 1.8.2\n      \u003c\u003c: *aws-ecr-config\n      \n  - name: elixir-1.10.1\n    type: registry-image\n    source:\n      repository: engineering/elixir\n      tag: 1.10.1\n      \u003c\u003c: *aws-ecr-config\n```\n\nHere's another example:\n\n```yaml\njobs:\n- name: job-1\n  plan:\n    - \u0026task-1\n      task: task-1\n      config:\n        platform: linux\n\n    - \u0026task-2\n      task: task-2\n      config:\n        platform: linux\n- name: job-2\n  - *task-1\n  - *task-2\n```\n\n### Container CPU and Memory Limits for Task\n\n```yaml\n# you can configure and override default container limits\n# cpu - max amount of CPU available to task container, measured in shares\n# memory - max amount of memory available to task container\n# 0 means unlimited\njobs:\n  - name: container-limits-job\n    plan:\n      - task: task-with-container-limits\n        config:\n          platform: linux\n          image_resource:\n            type: mock\n            source: {mirror_self: true}\n          container_limits:\n            cpu: 512\n            memory: 1GB\n          run:\n            path: sh\n            args: [\"-c\", \"echo hello\"]\n```\n\n### Pipeline Organization\n\nWhile yaml tricks are nice for smaller pipelines, complex pipelines\nbenefit from a well-defined structure. Check out the [command schema](https://concourse-ci.org/tasks.html#schema.command)\nand [task step config](https://concourse-ci.org/jobs.html#schema.step)\nthat shows an alternative `file` that allows you to point to a `.yml`\ncontaining the task config.\n\nA good starting example follows:\n\n```shell\ntechgaun at techgaun in /home/techgaun/projects/rpi-ha\n$ tre\n      1 .\n      2 └── .ci\n      3     ├── dockerfiles\n      4     │   ├── Dockerfile.alpine\n      5     │   ├── Dockerfile.buster\n      6     │   └── Dockerfile.distroless\n      7     ├── pipelines\n      8     │   ├── k8-build.yml\n      9     │   └── swarm-build.yml\n     10     ├── scripts\n     11     │   ├── build\n     12     │   ├── init\n     13     │   └── test\n     14     └── tasks\n     15         ├── build.yml\n     16         ├── e2e.yml\n     17         └── test.yml\n     18 \n     19 5 directories, 11 files\n```\n\n## Miscellaneous\n\n### Build Badges\n\n- You can get a badge for your pipeline with the following URL:\n\n```\n/api/v1/teams/{team}/pipelines/{pipeline}/badge\n```\n\nExample from Concourse CI itself: [![Concourse CI Build](https://ci.concourse-ci.org/api/v1/teams/main/pipelines/concourse/badge)](https://ci.concourse-ci.org/teams/main/pipelines/concourse)\n```\n# snippet for above SVG\n[![Concourse CI Build](https://ci.concourse-ci.org/api/v1/teams/main/pipelines/concourse/badge)](https://ci.concourse-ci.org/teams/main/pipelines/concourse)\n```\n\n- You can get a badge for your pipeline's specific jobs with the following URL:\n\n```\n/api/v1/teams/{team}/pipelines/{pipeline}/jobs/{job}/badge\n```\n\nExample from Concourse CI itself: [![Concourse CI Unit Tests](https://ci.concourse-ci.org/api/v1/teams/main/pipelines/concourse/jobs/unit/badge)](https://ci.concourse-ci.org/teams/main/pipelines/concourse/jobs/unit)\n\n```\n# snippet for above SVG\n[![Concourse CI Unit Tests](https://ci.concourse-ci.org/api/v1/teams/main/pipelines/concourse/jobs/unit/badge)](https://ci.concourse-ci.org/teams/main/pipelines/concourse/jobs/unit)\n```\n\n- Additionally, Concourse API supports a team's pipeline in a [CCMenu](http://ccmenu.org/) compatible XML file.\n\n```\n/api/v1/teams/{team}/cc.xml\n```\n\n## Editor Support\n\n- [Concourse CI Pipeline Editor](https://marketplace.visualstudio.com/items?itemName=Pivotal.vscode-concourse) - Provides validation and content assist for Concourse CI pipeline and task configuration yml files\n- [Concourse-Vis](https://atom.io/packages/concourse-vis) - A plugin to preview Concourse pipelines in Atom.\n\n\n## Links\n\n- [Concourse CI Pipeline Dashboard](https://ci.concourse-ci.org/) - Example dashboard/pipelines\n- [Concourse Internals](https://concourse-ci.org/internals.html) - Deeper understanding of Concourse\n- [Concourse Tutorial by Stark \u0026 Wayne](https://concoursetutorial.com/) - A great introduction to Concourse\n- [Pipelines Used by Concourse Team](https://github.com/concourse/pipelines) - A collection of pipelines used by the Concourse Team\n- [Sample Concourse Pipeline Examples](https://github.com/concourse/concourse/tree/master/testflight/fixtures) - Fixtures from Concourse source code to understand pipelines better\n\n## Authors\n\n- [techgaun](https://github.com/techgaun)\n- [bpote](https://github.com/bpote)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechgaun%2Fconcourse-cheatsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechgaun%2Fconcourse-cheatsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechgaun%2Fconcourse-cheatsheet/lists"}