how to avoid long pipeline files
splitting resources into separate files out from pipeline.yml
let’s say we have this big pipeline definition
composed-pipeline.yml
jobs:
- name: pipeline
public: true
plan:
- task: hola
config:
platform: linux
image_resource:
type: docker-image
source: {repository: ubuntu}
run:
path: echo
args: [who-hoo!!!]
spinup concourse, login and setup pipeline
docker-compose up
fly -t lite login -c http://0.0.0.0:8080 # username: concourse, password: changeme
fly -t lite set-pipeline -c composed-pipeline.yml -p 04
fly -t lite unpause-pipeline -p 04 # by default pipelines creates paused
and we wanna do some decomposition of our pipelines to split it in logic reusable blocks
create decomposed-pipeline.yml and decomposed-resource.yml files
touch decomposed-pipeline.yml decomposed-resource.yml
decomposed-pipeline.yml
resources:
- name: pipeline-resources
type: git
source:
uri: https://github.com/daggerok/concourse-examples.git
jobs:
- name: pipeline
public: true
plan:
- get: pipeline-resources
- task: hola
file: pipeline-resources/04-tasks-extracted-into-resources/decomposed-resource.yml
decomposed-resource.yml
platform: linux
image_resource:
type: docker-image
source: {repository: ubuntu}
run:
path: echo
args: [who-hoo!]
now apply pipeline updates via patch
fly -t lite set-pipeline -c decomposed-pipeline.yml -p 04
check web UI