diff --git a/pipelines/git-triggered.yml b/pipelines/git-triggered.yml index abf2332..e311e67 100644 --- a/pipelines/git-triggered.yml +++ b/pipelines/git-triggered.yml @@ -1,25 +1,25 @@ --- resources: - - name: concourse-docs-git - type: git - icon: github - source: - uri: https://github.com/concourse/docs +- name: concourse-docs-git + type: git + icon: github + source: + uri: https://github.com/concourse/docs jobs: - - name: job - public: true - plan: - - get: concourse-docs-git - trigger: true - - task: list-files - config: - inputs: - - name: concourse-docs-git - platform: linux - image_resource: - type: registry-image - source: { repository: busybox } - run: - path: ls - args: ["-la", "./concourse-docs-git"] +- name: job + public: true + plan: + - get: concourse-docs-git + trigger: true + - task: list-files + config: + inputs: + - name: concourse-docs-git + platform: linux + image_resource: + type: registry-image + source: { repository: busybox } + run: + path: ls + args: ["-la", "./concourse-docs-git"] diff --git a/pipelines/golang-lib.yml b/pipelines/golang-lib.yml index 169bb87..e9cdac8 100644 --- a/pipelines/golang-lib.yml +++ b/pipelines/golang-lib.yml @@ -1,31 +1,31 @@ --- resources: - - name: golang-mock-git - type: git - icon: github - source: - uri: https://github.com/golang/mock.git +- name: golang-mock-git + type: git + icon: github + source: + uri: https://github.com/golang/mock.git - - name: golang-1.11.x-image - type: registry-image - icon: docker - source: - repository: golang - tag: 1.11-stretch +- name: golang-1.11.x-image + type: registry-image + icon: docker + source: + repository: golang + tag: 1.11-stretch - - name: golang-1.12.x-image - type: registry-image - icon: docker - source: - repository: golang - tag: 1.12-stretch +- name: golang-1.12.x-image + type: registry-image + icon: docker + source: + repository: golang + tag: 1.12-stretch - - name: golang-1.13.x-image - type: registry-image - icon: docker - source: - repository: golang - tag: 1.13-stretch +- name: golang-1.13.x-image + type: registry-image + icon: docker + source: + repository: golang + tag: 1.13-stretch task-config: &task-config platform: linux @@ -54,36 +54,36 @@ task-config: &task-config go test -v ./... jobs: - - name: golang-1.11 - public: true - plan: - - get: golang-mock-git - trigger: true - - get: golang-1.11.x-image - trigger: true - - task: run-tests - image: golang-1.11.x-image - config: - << : *task-config - - name: golang-1.12 - public: true - plan: - - get: golang-mock-git - trigger: true - - get: golang-1.12.x-image - trigger: true - - task: run-tests - image: golang-1.12.x-image - config: - << : *task-config - - name: golang-1.13 - public: true - plan: - - get: golang-mock-git - trigger: true - - get: golang-1.13.x-image - trigger: true - - task: run-tests - image: golang-1.13.x-image - config: - << : *task-config +- name: golang-1.11 + public: true + plan: + - get: golang-mock-git + trigger: true + - get: golang-1.11.x-image + trigger: true + - task: run-tests + image: golang-1.11.x-image + config: + << : *task-config +- name: golang-1.12 + public: true + plan: + - get: golang-mock-git + trigger: true + - get: golang-1.12.x-image + trigger: true + - task: run-tests + image: golang-1.12.x-image + config: + << : *task-config +- name: golang-1.13 + public: true + plan: + - get: golang-mock-git + trigger: true + - get: golang-1.13.x-image + trigger: true + - task: run-tests + image: golang-1.13.x-image + config: + << : *task-config diff --git a/pipelines/hello-world.yml b/pipelines/hello-world.yml index ea0116a..434d8ee 100644 --- a/pipelines/hello-world.yml +++ b/pipelines/hello-world.yml @@ -1,14 +1,14 @@ --- jobs: - - name: job - public: true - plan: - - task: simple-task - config: - platform: linux - image_resource: - type: registry-image - source: { repository: busybox } - run: - path: echo - args: ["Hello, world!"] +- name: job + public: true + plan: + - task: simple-task + config: + platform: linux + image_resource: + type: registry-image + source: { repository: busybox } + run: + path: echo + args: ["Hello, world!"] diff --git a/pipelines/java.yml b/pipelines/java.yml index d8f68ff..f3bdd52 100644 --- a/pipelines/java.yml +++ b/pipelines/java.yml @@ -34,6 +34,7 @@ jobs: user: root task: run-tests public: true + resources: - icon: github name: apache-kafka-git diff --git a/pipelines/job-and-task-hooks.yml b/pipelines/job-and-task-hooks.yml index db19494..c6e75dd 100644 --- a/pipelines/job-and-task-hooks.yml +++ b/pipelines/job-and-task-hooks.yml @@ -6,60 +6,60 @@ task-config: &task-config source: { repository: busybox } jobs: - - name: job - public: true - plan: - - task: successful-task +- name: job + public: true + plan: + - task: successful-task + config: + << : *task-config + run: + path: sh + args: ["-lc", "exit 0"] + on_success: + task: task-success config: << : *task-config run: - path: sh - args: ["-lc", "exit 0"] - on_success: - task: task-success - config: - << : *task-config - run: - path: echo - args: ["This task succeeded!"] - on_abort: - task: task-aborted - config: - << : *task-config - run: - path: echo - args: ["This task was aborted!"] - - task: failing-task + path: echo + args: ["This task succeeded!"] + on_abort: + task: task-aborted config: << : *task-config run: - path: sh - args: ["-lc", "exit 1"] - on_failure: - task: task-failure - config: - << : *task-config - run: - path: echo - args: ["This task failed!"] - on_success: - task: job-success - config: - << : *task-config - run: - path: echo - args: ["This job succeeded!"] - on_failure: - task: job-failure + path: echo + args: ["This task was aborted!"] + - task: failing-task config: << : *task-config run: - path: echo - args: ["This job failed!"] - on_abort: - task: job-aborted - config: - << : *task-config - run: - path: echo - args: ["This job was aborted!"] + path: sh + args: ["-lc", "exit 1"] + on_failure: + task: task-failure + config: + << : *task-config + run: + path: echo + args: ["This task failed!"] + on_success: + task: job-success + config: + << : *task-config + run: + path: echo + args: ["This job succeeded!"] + on_failure: + task: job-failure + config: + << : *task-config + run: + path: echo + args: ["This job failed!"] + on_abort: + task: job-aborted + config: + << : *task-config + run: + path: echo + args: ["This job was aborted!"] diff --git a/pipelines/manually-triggered.yml b/pipelines/manually-triggered.yml index d0d2f0b..a9fe2ac 100644 --- a/pipelines/manually-triggered.yml +++ b/pipelines/manually-triggered.yml @@ -1,52 +1,52 @@ --- resources: - - name: every-30s - type: time - icon: clock-outline - source: - interval: 30s +- name: every-30s + type: time + icon: clock-outline + source: + interval: 30s jobs: - - name: triggered-first - public: true - plan: - - get: every-30s - trigger: true - - task: simple-task - config: - platform: linux - image_resource: - type: registry-image - source: { repository: busybox } - run: - path: echo - args: ["Hello, world!"] - - name: not-triggered - public: true - plan: - - get: every-30s - passed: [triggered-first] - - task: simple-task - config: - platform: linux - image_resource: - type: registry-image - source: { repository: busybox } - run: - path: echo - args: ["Hello, world!"] - - name: triggered-second - public: true - plan: - - get: every-30s - passed: [triggered-first] - trigger: true - - task: simple-task - config: - platform: linux - image_resource: - type: registry-image - source: { repository: busybox } - run: - path: echo - args: ["Hello, world!"] +- name: triggered-first + public: true + plan: + - get: every-30s + trigger: true + - task: simple-task + config: + platform: linux + image_resource: + type: registry-image + source: { repository: busybox } + run: + path: echo + args: ["Hello, world!"] +- name: not-triggered + public: true + plan: + - get: every-30s + passed: [triggered-first] + - task: simple-task + config: + platform: linux + image_resource: + type: registry-image + source: { repository: busybox } + run: + path: echo + args: ["Hello, world!"] +- name: triggered-second + public: true + plan: + - get: every-30s + passed: [triggered-first] + trigger: true + - task: simple-task + config: + platform: linux + image_resource: + type: registry-image + source: { repository: busybox } + run: + path: echo + args: ["Hello, world!"] diff --git a/pipelines/nodejs-app-testing.yml b/pipelines/nodejs-app-testing.yml index 011be65..74c7f32 100644 --- a/pipelines/nodejs-app-testing.yml +++ b/pipelines/nodejs-app-testing.yml @@ -1,32 +1,32 @@ --- resources: - - name: nodejs.org-git - type: git - icon: github - source: - uri: https://github.com/nodejs/nodejs.org.git +- name: nodejs.org-git + type: git + icon: github + source: + uri: https://github.com/nodejs/nodejs.org.git jobs: - - name: test - public: true - plan: - - get: nodejs.org-git - trigger: true - - task: run-tests - config: - platform: linux - image_resource: - type: registry-image - source: { repository: node } - inputs: - - name: nodejs.org-git - run: - path: /bin/sh - args: - - -c - - | - echo "Node Version: $(node --version)" - echo "NPM Version: $(npm --version)" - cd nodejs.org-git - npm install - npm test +- name: test + public: true + plan: + - get: nodejs.org-git + trigger: true + - task: run-tests + config: + platform: linux + image_resource: + type: registry-image + source: { repository: node } + inputs: + - name: nodejs.org-git + run: + path: /bin/sh + args: + - -c + - | + echo "Node Version: $(node --version)" + echo "NPM Version: $(npm --version)" + cd nodejs.org-git + npm install + npm test diff --git a/pipelines/php-larvel-app-testing.yml b/pipelines/php-larvel-app-testing.yml index e3e93c2..629a827 100644 --- a/pipelines/php-larvel-app-testing.yml +++ b/pipelines/php-larvel-app-testing.yml @@ -1,31 +1,31 @@ --- resources: - - name: larvel-websockets-git - type: git - icon: github - source: - uri: https://github.com/beyondcode/laravel-websockets.git +- name: larvel-websockets-git + type: git + icon: github + source: + uri: https://github.com/beyondcode/laravel-websockets.git jobs: - - name: test - public: true - plan: - - get: larvel-websockets-git - trigger: true - - task: run-tests - config: - platform: linux - image_resource: - type: registry-image - source: { repository: composer } - inputs: - - name: larvel-websockets-git - run: - path: /bin/sh - args: - - -c - - | - cd larvel-websockets-git +- name: test + public: true + plan: + - get: larvel-websockets-git + trigger: true + - task: run-tests + config: + platform: linux + image_resource: + type: registry-image + source: { repository: composer } + inputs: + - name: larvel-websockets-git + run: + path: /bin/sh + args: + - -c + - | + cd larvel-websockets-git - composer install - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover + composer install + vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover diff --git a/pipelines/pipeline-vars.yml b/pipelines/pipeline-vars.yml index fc5b619..054b7df 100644 --- a/pipelines/pipeline-vars.yml +++ b/pipelines/pipeline-vars.yml @@ -1,26 +1,26 @@ --- jobs: - - name: ((first))-job - public: true - plan: - - task: simple-task - config: - platform: linux - image_resource: - type: registry-image - source: { repository: busybox } - run: - path: echo - args: ["Hello, ((hello))!"] - - name: level-((number))-job - public: true - plan: - - task: simple-task - config: - platform: linux - image_resource: - type: registry-image - source: { repository: busybox } - run: - path: echo - args: ["Hello, ((hello))!"] +- name: ((first))-job + public: true + plan: + - task: simple-task + config: + platform: linux + image_resource: + type: registry-image + source: { repository: busybox } + run: + path: echo + args: ["Hello, ((hello))!"] +- name: level-((number))-job + public: true + plan: +- task: simple-task + config: + platform: linux + image_resource: + type: registry-image + source: { repository: busybox } + run: + path: echo + args: ["Hello, ((hello))!"] diff --git a/pipelines/rails-app-testing.yml b/pipelines/rails-app-testing.yml index e2b3899..04cfcdd 100644 --- a/pipelines/rails-app-testing.yml +++ b/pipelines/rails-app-testing.yml @@ -1,10 +1,10 @@ --- resources: - - name: rails-contributors-git - type: git - icon: github - source: - uri: https://github.com/rails/rails-contributors.git +- name: rails-contributors-git + type: git + icon: github + source: + uri: https://github.com/rails/rails-contributors.git task-config: &task-config platform: linux @@ -36,14 +36,14 @@ task-config: &task-config bundle exec rails test jobs: - - name: test - public: true - plan: - - get: rails-contributors-git - trigger: true - - task: run-tests - config: - image_resource: - type: registry-image - source: { repository: ruby, tag: 2.6.5 } - << : *task-config +- name: test + public: true + plan: + - get: rails-contributors-git + trigger: true + - task: run-tests + config: + image_resource: + type: registry-image + source: { repository: ruby, tag: 2.6.5 } + << : *task-config diff --git a/pipelines/separate-task-config.yml b/pipelines/separate-task-config.yml index 00a77f1..9bff6d5 100644 --- a/pipelines/separate-task-config.yml +++ b/pipelines/separate-task-config.yml @@ -1,15 +1,15 @@ --- resources: - - name: concourse-examples - type: git - icon: github - source: - uri: https://github.com/concourse/examples +- name: concourse-examples + type: git + icon: github + source: + uri: https://github.com/concourse/examples jobs: - - name: job - public: true - plan: - - get: concourse-examples - - task: simple-task - file: concourse-examples/tasks/hello-world.yml +- name: job + public: true + plan: + - get: concourse-examples + - task: simple-task + file: concourse-examples/tasks/hello-world.yml diff --git a/pipelines/serial-job.yml b/pipelines/serial-job.yml index f6d5ebf..97cda23 100644 --- a/pipelines/serial-job.yml +++ b/pipelines/serial-job.yml @@ -1,15 +1,16 @@ --- jobs: - - name: serial-job - public: true - serial: true - plan: - - task: simple-task - config: - platform: linux - image_resource: - type: registry-image - source: { repository: busybox } - run: - path: echo - args: ["Hello, world!"] +# Try to trigger the job multiple times and see what happens +- name: serial-job + public: true + serial: true + plan: + - task: simple-task + config: + platform: linux + image_resource: + type: registry-image + source: { repository: busybox } + run: + path: echo + args: ["Hello, world!"] diff --git a/pipelines/set-pipelines.yml b/pipelines/set-pipelines.yml index ed76577..c01bdce 100644 --- a/pipelines/set-pipelines.yml +++ b/pipelines/set-pipelines.yml @@ -1,69 +1,69 @@ --- resources: - - name: concourse-examples - type: git - icon: github - source: - uri: https://github.com/concourse/examples +- name: concourse-examples + type: git + icon: github + source: + uri: https://github.com/concourse/examples jobs: - # update this pipeline before updating child pipelines - - name: set-self - public: true - plan: - - get: concourse-examples - trigger: true - - set_pipeline: set-pipelines - file: concourse-examples/pipelines/set-pipelines.yml - - name: set-example-pipelines - public: true - plan: - - get: concourse-examples - trigger: true - passed: [set-self] - - set_pipeline: job - file: concourse-examples/pipelines/hello-world.yml - - set_pipeline: separate-task-config - file: concourse-examples/pipelines/separate-task-config.yml - - set_pipeline: serial-job - file: concourse-examples/pipelines/serial-job.yml - - set_pipeline: pipeline-vars - file: concourse-examples/pipelines/pipeline-vars.yml - vars: - first: initial - number: "9000" - hello: HAL - - set_pipeline: instance-groups - file: concourse-examples/pipelines/pipeline-vars.yml - # instance_vars is currently experimental and requires the feature flag - # --enable-pipeline-instances - instance_vars: - first: initial - number: "9000" - hello: HAL - - set_pipeline: instance-groups - file: concourse-examples/pipelines/pipeline-vars.yml - instance_vars: - first: second - number: "3000" - hello: WALLY-E - - set_pipeline: task-passing-artifact - file: concourse-examples/pipelines/task-passing-artifact.yml - - set_pipeline: time-triggered - file: concourse-examples/pipelines/time-triggered.yml - - set_pipeline: git-triggered - file: concourse-examples/pipelines/git-triggered.yml - - set_pipeline: manual-trigger - file: concourse-examples/pipelines/manually-triggered.yml - - set_pipeline: hooks - file: concourse-examples/pipelines/job-and-task-hooks.yml - - set_pipeline: golang-lib - file: concourse-examples/pipelines/golang-lib.yml - - set_pipeline: rails - file: concourse-examples/pipelines/rails-app-testing.yml - - set_pipeline: nodejs - file: concourse-examples/pipelines/nodejs-app-testing.yml - - set_pipeline: php - file: concourse-examples/pipelines/php-larvel-app-testing.yml - - set_pipeline: java - file: concourse-examples/pipelines/java.yml +# update this pipeline before updating child pipelines +- name: set-self + public: true + plan: + - get: concourse-examples + trigger: true + - set_pipeline: set-pipelines + file: concourse-examples/pipelines/set-pipelines.yml +- name: set-example-pipelines + public: true + plan: + - get: concourse-examples + trigger: true + passed: [set-self] + - set_pipeline: job + file: concourse-examples/pipelines/hello-world.yml + - set_pipeline: separate-task-config + file: concourse-examples/pipelines/separate-task-config.yml + - set_pipeline: serial-job + file: concourse-examples/pipelines/serial-job.yml + - set_pipeline: pipeline-vars + file: concourse-examples/pipelines/pipeline-vars.yml + vars: + first: initial + number: "9000" + hello: HAL + - set_pipeline: instance-groups + file: concourse-examples/pipelines/pipeline-vars.yml + # instance_vars is currently experimental and requires the feature flag + # --enable-pipeline-instances + instance_vars: + first: initial + number: "9000" + hello: HAL + - set_pipeline: instance-groups + file: concourse-examples/pipelines/pipeline-vars.yml + instance_vars: + first: second + number: "3000" + hello: WALLY-E + - set_pipeline: task-passing-artifact + file: concourse-examples/pipelines/task-passing-artifact.yml + - set_pipeline: time-triggered + file: concourse-examples/pipelines/time-triggered.yml + - set_pipeline: git-triggered + file: concourse-examples/pipelines/git-triggered.yml + - set_pipeline: manual-trigger + file: concourse-examples/pipelines/manually-triggered.yml + - set_pipeline: hooks + file: concourse-examples/pipelines/job-and-task-hooks.yml + - set_pipeline: golang-lib + file: concourse-examples/pipelines/golang-lib.yml + - set_pipeline: rails + file: concourse-examples/pipelines/rails-app-testing.yml + - set_pipeline: nodejs + file: concourse-examples/pipelines/nodejs-app-testing.yml + - set_pipeline: php + file: concourse-examples/pipelines/php-larvel-app-testing.yml + - set_pipeline: java + file: concourse-examples/pipelines/java.yml diff --git a/pipelines/task-passing-artifact.yml b/pipelines/task-passing-artifact.yml index dc65fe4..739dcc7 100644 --- a/pipelines/task-passing-artifact.yml +++ b/pipelines/task-passing-artifact.yml @@ -1,30 +1,30 @@ --- jobs: - - name: create-and-consume - public: true - plan: - - task: make-a-file - config: - platform: linux - image_resource: - type: registry-image - source: { repository: busybox } - run: - path: sh - args: - - -exc - - ls -la; echo "Created a file on $(date)" > ./files/created_file - outputs: - - name: files - - task: consume-the-file - config: - platform: linux - image_resource: - type: registry-image - source: { repository: busybox } - inputs: - - name: files - run: - path: cat - args: - - ./files/created_file +- name: create-and-consume + public: true + plan: + - task: make-a-file + config: + platform: linux + image_resource: + type: registry-image + source: { repository: busybox } + run: + path: sh + args: + - -exc + - ls -la; echo "Created a file on $(date)" > ./files/created_file + outputs: + - name: files + - task: consume-the-file + config: + platform: linux + image_resource: + type: registry-image + source: { repository: busybox } + inputs: + - name: files + run: + path: cat + args: + - ./files/created_file diff --git a/pipelines/time-triggered.yml b/pipelines/time-triggered.yml index a526821..4a3e48a 100644 --- a/pipelines/time-triggered.yml +++ b/pipelines/time-triggered.yml @@ -1,23 +1,23 @@ --- resources: - - name: every-30s - type: time - icon: clock-outline - source: - interval: 30s +- name: every-30s + type: time + icon: clock-outline + source: + interval: 30s jobs: - - name: job - public: true - plan: - - get: every-30s - trigger: true - - task: simple-task - config: - platform: linux - image_resource: - type: registry-image - source: { repository: busybox } - run: - path: echo - args: ["Hello, world!"] +- name: job + public: true + plan: + - get: every-30s + trigger: true + - task: simple-task + config: + platform: linux + image_resource: + type: registry-image + source: { repository: busybox } + run: + path: echo + args: ["Hello, world!"]