From 6556a039c4c7340a24cf3f89b42f63a03da6e0c8 Mon Sep 17 00:00:00 2001 From: guidowb Date: Fri, 28 Oct 2016 09:43:16 -0500 Subject: [PATCH] Concourse does not pick up new version of resource when generated within the same job --- ci/pipeline.yml | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/ci/pipeline.yml b/ci/pipeline.yml index b49239e5..175944cd 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -6,6 +6,7 @@ groups: jobs: - build-base-image - unit-tests + - bump-prerelease - package-tile-generator - install-tile-generator - build-tile @@ -226,7 +227,7 @@ jobs: text: '(master) Unit tests failed, check for details' username: Tile Generator -- name: package-tile-generator +- name: bump-prerelease plan: - aggregate: - get: base-pipeline-docker-image @@ -235,13 +236,27 @@ jobs: - get: tile-generator-repo passed: [ unit-tests ] trigger: true - - put: version - params: - pre: dev - - get: final-version - resource: version + - put: version params: - bump: final + pre: dev + +- name: package-tile-generator + disable_manual_trigger: true + plan: + - aggregate: + - get: base-pipeline-docker-image + passed: [ bump-prerelease ] + trigger: true + - get: tile-generator-repo + passed: [ bump-prerelease ] + trigger: true + - get: version + passed: [ bump-prerelease ] + trigger: true + - get: final-version + resource: version + params: + bump: final - task: build-package image: base-pipeline-docker-image config: @@ -253,11 +268,15 @@ jobs: outputs: - name: tile-generator-dist run: - dir: tile-generator-repo path: sh args: - - -c - - cp ../final-version/version version.txt && python setup.py sdist && cp dist/tile-generator-*.tar.gz ../tile-generator-dist/tile-generator-`cat version.txt`.tar.gz + - -exc + - | + cd tile-generator-repo + VERSION=`cat ../version/version` + cp ../final-version/version version.txt + python setup.py sdist + cp dist/tile-generator-*.tar.gz ../tile-generator-dist/tile-generator-${VERSION}.tar.gz on_failure: aggregate: - put: slack-alert