Skip to content

Commit 0593906

Browse files
committed
Initial changes for migration to CFF Concourse
1 parent 1edad0e commit 0593906

12 files changed

Lines changed: 516 additions & 757 deletions

File tree

ci/configure.sh

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,25 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4+
REPO_ROOT="$( cd "$( dirname "${0}" )/.." && pwd )"
5+
46
function err_echo() {
57
# echo to STDERR
68
# generally used for human-facing logging to preserve STDOUT as a channel for data that might be piped elsewhere.
79
>&2 echo -e "$@"
810
}
911

12+
if ! rendered_pipeline=$(ytt -f "${REPO_ROOT}/ci/pipeline.yml"); then
13+
err_echo "\n\n ytt render failed, please check for template errors above."
14+
exit 1
15+
fi
1016

11-
REPO_ROOT="$( cd "$( dirname "${0}" )/.." && pwd )"
12-
13-
function main() {
14-
15-
local rendered_pipeline
16-
if ! rendered_pipeline=$(ytt -f "${REPO_ROOT}/ci/pipeline.yml"); then
17-
err_echo "\n\n ytt render failed, please check for template errors above."
18-
exit 1
19-
fi
20-
21-
#getting a yaml error w/ a line number? uncomment the below to find it more quickly.
22-
#echo "$rendered_pipeline" > ./render.yaml
23-
24-
fly -t "${CONCOURSE_TARGET:=bosh-ecosystem}" set-pipeline \
25-
-p bbr-cli \
26-
-c <(echo "$rendered_pipeline")
27-
28-
}
17+
if [ -n "${DEBUG:-}" ]; then
18+
rendered_pipeline="${REPO_ROOT}/ci/pipeline-rendered.yml"
19+
err_echo "DEBUG: Writing rendered YTT pipeline.yml to\n => '${rendered_pipeline}'"
20+
echo "${rendered_pipeline}" > "${rendered_pipeline}"
21+
fi
2922

30-
main "$@"
23+
fly -t "${CONCOURSE_TARGET:=bosh}" set-pipeline \
24+
-p bbr-cli \
25+
-c <(echo "$rendered_pipeline")

0 commit comments

Comments
 (0)