Future proofing main with the tag split
Adding the split now so we can just bump a number in the future
This commit is contained in:
@@ -68,7 +68,7 @@ jobs:
|
||||
- task: acceptance-tests
|
||||
file: git-repo/ci/tasks/acceptance-tests.yml
|
||||
vars:
|
||||
branch: ((branch))
|
||||
ci-image-tag: ((ci-image-tag))
|
||||
on_success:
|
||||
in_parallel:
|
||||
- *slack-success-notification
|
||||
@@ -89,7 +89,7 @@ jobs:
|
||||
file: git-repo/ci/tasks/stage.yml
|
||||
vars:
|
||||
release-type: M
|
||||
branch: ((branch))
|
||||
ci-image-tag: ((ci-image-tag))
|
||||
- put: artifactory-repo
|
||||
params:
|
||||
<<: *artifactory-params
|
||||
@@ -107,7 +107,7 @@ jobs:
|
||||
file: git-repo/ci/tasks/stage.yml
|
||||
vars:
|
||||
release-type: RC
|
||||
branch: ((branch))
|
||||
ci-image-tag: ((ci-image-tag))
|
||||
- put: artifactory-repo
|
||||
params:
|
||||
<<: *artifactory-params
|
||||
@@ -125,7 +125,7 @@ jobs:
|
||||
file: git-repo/ci/tasks/stage.yml
|
||||
vars:
|
||||
release-type: RELEASE
|
||||
branch: ((branch))
|
||||
ci-image-tag: ((ci-image-tag))
|
||||
- put: artifactory-repo
|
||||
params:
|
||||
<<: *artifactory-params
|
||||
@@ -146,7 +146,7 @@ jobs:
|
||||
file: git-repo/ci/tasks/promote.yml
|
||||
vars:
|
||||
release-type: M
|
||||
branch: ((branch))
|
||||
ci-image-tag: ((ci-image-tag))
|
||||
|
||||
- name: promote-rc
|
||||
serial: true
|
||||
@@ -161,7 +161,7 @@ jobs:
|
||||
file: git-repo/ci/tasks/promote.yml
|
||||
vars:
|
||||
release-type: RC
|
||||
branch: ((branch))
|
||||
ci-image-tag: ((ci-image-tag))
|
||||
|
||||
- name: promote-release
|
||||
serial: true
|
||||
@@ -176,7 +176,7 @@ jobs:
|
||||
file: git-repo/ci/tasks/promote.yml
|
||||
vars:
|
||||
release-type: RELEASE
|
||||
branch: ((branch))
|
||||
ci-image-tag: ((ci-image-tag))
|
||||
|
||||
- name: sync-to-maven-central
|
||||
serial: true
|
||||
@@ -190,7 +190,7 @@ jobs:
|
||||
- task: sync-to-maven-central
|
||||
file: git-repo/ci/tasks/sync-to-maven-central.yml
|
||||
vars:
|
||||
branch: ((branch))
|
||||
ci-image-tag: ((ci-image-tag))
|
||||
|
||||
resource_types:
|
||||
- name: artifactory-resource
|
||||
@@ -256,7 +256,7 @@ resources:
|
||||
repository: ((corporate-harbor-registry))/((dockerhub-organization))/app-broker-ci
|
||||
username: ((corporate-harbor-robot-account.username))
|
||||
password: ((corporate-harbor-robot-account.password))
|
||||
tag: ((branch))
|
||||
tag: ((ci-image-tag))
|
||||
|
||||
- name: artifactory-repo
|
||||
type: artifactory-resource
|
||||
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
input_mapping:
|
||||
git-repo: pull-request
|
||||
vars:
|
||||
branch: ((branch))
|
||||
ci-image-tag: ((ci-image-tag))
|
||||
- name: run-acceptance-tests
|
||||
serial: true
|
||||
plan:
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
- task: acceptance-tests
|
||||
file: pull-request/ci/tasks/acceptance-tests.yml
|
||||
vars:
|
||||
branch: ((branch))
|
||||
ci-image-tag: ((ci-image-tag))
|
||||
input_mapping:
|
||||
git-repo: pull-request
|
||||
on_success:
|
||||
|
||||
@@ -6,7 +6,7 @@ image_resource:
|
||||
repository: ((corporate-harbor-registry))/((dockerhub-organization))/app-broker-ci
|
||||
username: ((corporate-harbor-robot-account.username))
|
||||
password: ((corporate-harbor-robot-account.password))
|
||||
tag: ((branch))
|
||||
tag: ((ci-image-tag))
|
||||
inputs:
|
||||
- name: git-repo
|
||||
- name: toolsmith-env
|
||||
|
||||
@@ -6,7 +6,7 @@ image_resource:
|
||||
repository: ((corporate-harbor-registry))/((dockerhub-organization))/app-broker-ci
|
||||
username: ((corporate-harbor-robot-account.username))
|
||||
password: ((corporate-harbor-robot-account.password))
|
||||
tag: ((branch))
|
||||
tag: ((ci-image-tag))
|
||||
inputs:
|
||||
- name: git-repo
|
||||
outputs:
|
||||
|
||||
@@ -6,7 +6,7 @@ image_resource:
|
||||
repository: ((corporate-harbor-registry))/((dockerhub-organization))/app-broker-ci
|
||||
username: ((corporate-harbor-robot-account.username))
|
||||
password: ((corporate-harbor-robot-account.password))
|
||||
tag: ((branch))
|
||||
tag: ((ci-image-tag))
|
||||
inputs:
|
||||
- name: git-repo
|
||||
- name: artifactory-repo
|
||||
|
||||
@@ -6,7 +6,7 @@ image_resource:
|
||||
repository: ((corporate-harbor-registry))/((dockerhub-organization))/app-broker-ci
|
||||
username: ((corporate-harbor-robot-account.username))
|
||||
password: ((corporate-harbor-robot-account.password))
|
||||
tag: ((branch))
|
||||
tag: ((ci-image-tag))
|
||||
inputs:
|
||||
- name: git-repo
|
||||
outputs:
|
||||
|
||||
@@ -6,7 +6,7 @@ image_resource:
|
||||
repository: ((corporate-harbor-registry))/((dockerhub-organization))/app-broker-ci
|
||||
username: ((corporate-harbor-robot-account.username))
|
||||
password: ((corporate-harbor-robot-account.password))
|
||||
tag: ((branch))
|
||||
tag: ((ci-image-tag))
|
||||
inputs:
|
||||
- name: git-repo
|
||||
- name: artifactory-repo
|
||||
|
||||
@@ -5,19 +5,22 @@ set -euo pipefail
|
||||
readonly FLY_TARGET="app-broker"
|
||||
readonly VERSION=1.5.x
|
||||
readonly BRANCH=main
|
||||
readonly CI_IMAGE_TAG=main
|
||||
|
||||
set_pipeline() {
|
||||
local pipeline_name pipeline_definition branch
|
||||
local pipeline_name pipeline_definition branch ci_image_tag
|
||||
pipeline_name="${1:?pipeline name must be provided}"
|
||||
pipeline_definition="${2:?pipeline definition file must be provided}"
|
||||
branch="${3:?branch must be provided}"
|
||||
ci_image_tag="${4:?ci_image_tag must be provided}"
|
||||
|
||||
echo "Setting $pipeline_name pipeline..."
|
||||
fly --target "$FLY_TARGET" set-pipeline \
|
||||
--pipeline "$pipeline_name" \
|
||||
--config "$pipeline_definition" \
|
||||
--load-vars-from config-concourse.yml \
|
||||
--var "branch=$branch"
|
||||
--var "branch=$branch" \
|
||||
--var "ci-image-tag=$ci_image_tag"
|
||||
}
|
||||
|
||||
main() {
|
||||
@@ -25,8 +28,8 @@ main() {
|
||||
|
||||
pushd "$(dirname "$0")/../ci" >/dev/null
|
||||
|
||||
set_pipeline "app-broker-$VERSION" pipeline.yml "$BRANCH"
|
||||
set_pipeline "app-broker-$VERSION-pr" pr-pipeline.yml "$BRANCH"
|
||||
set_pipeline "app-broker-$VERSION" pipeline.yml "$BRANCH" "$CI_IMAGE_TAG"
|
||||
set_pipeline "app-broker-$VERSION-pr" pr-pipeline.yml "$BRANCH" "$CI_IMAGE_TAG"
|
||||
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user