Skip to content

Commit

Permalink
Add script to create concourse pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
royclarkson committed Oct 1, 2021
1 parent 1cb89ab commit a5a0e1f
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions scripts/set-pipelines.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash

set -euo pipefail

readonly FLY_TARGET="scosb"
readonly GITHUB_REPO="https://github.com/spring-cloud/spring-cloud-open-service-broker"

set_pipeline() {
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:-$branch}"

echo "Setting $pipeline_name pipeline..."
fly --target "$FLY_TARGET" set-pipeline \
--pipeline "$pipeline_name" \
--config "$pipeline_definition" \
--load-vars-from config-concourse.yml \
--var "github-repo=$GITHUB_REPO" \
--var "branch=$branch" \
--var "ci-image-tag=$ci_image_tag"
}

main() {
fly -t scosb sync

pushd "$(dirname "$0")/../ci" >/dev/null

set_pipeline scosb-3.3.x pipeline.yml 3.3.x

popd >/dev/null
}

main

0 comments on commit a5a0e1f

Please sign in to comment.