Skip to content

Commit

Permalink
build with go1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic committed Oct 28, 2018
1 parent 0b1f709 commit b50f835
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ meta:
name: (( param "Please provide the git name for automated commits" ))

go:
version: 1.9
version: "1.10"
module: (( concat "github.com/" meta.github.owner "/" meta.github.repo ))
cmd_module: (( grab meta.go.module ))
binary: (( grab meta.github.repo ))
Expand Down
41 changes: 39 additions & 2 deletions ci/repipe
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,40 @@ usage() {
echo Command line arguments:
echo "no-fly Do not execute any fly commands"
echo "save-manifest Save manifest to file save-manifest"
echo "validate Validatei pipeline instead of set pipeline"
echo "validate Validate pipeline instead of set pipeline"
echo "validate-strict Validate pipeline with strict mode"
echo "non-interactive Run set-pipeline in non-interactive mode"
echo "open Open pipeline dashboard to browser (if possible)"
}

open_pipeline() {
url=$(show_pipeline_url)
cleanup
if [[ -x /usr/bin/open ]]; then
exec /usr/bin/open "$url"
else
echo "Sorry, but I was not able to automagically open"
echo "your Concourse Pipeline in the browser."
echo
echo "Here's a link you can click on, though:"
echo
echo " $url"
echo
exit 0;
fi
}

show_pipeline_url() {
spruce merge --skip-eval pipeline.yml ${settings_file} > .deploy.yml
concourse_url=$(spruce json .deploy.yml | jq -r ".meta.url")
team=$(spruce json .deploy.yml | jq -r ".meta.team // \"main\"")
pipeline=$(spruce merge --skip-eval \
--cherry-pick meta.pipeline \
--cherry-pick meta.name \
.deploy.yml | spruce merge - | spruce json | jq -r ".meta.pipeline")

echo "$concourse_url/teams/$team/pipelines/$pipeline"
exit 0
}

for arg do
Expand All @@ -50,6 +81,8 @@ for arg do
validate) VALIDATE_PIPELINE="normal" ;;
validate-strict|validate_strict) VALIDATE_PIPELINE="strict" ;;
non-interactive|non_interactive) NON_INTERACTIVE="--non-interactive" ;;
url) SHOW_PIPELINE_URL="yes" ;;
open) OPEN_PIPELINE="yes" ;;
help|-h|--help) usage; exit 0 ;;
*) echo Invalid argument
usage
Expand All @@ -58,7 +91,7 @@ for arg do
done

cd $(dirname $BASH_SOURCE[0])
echo "Working in $(pwd)"
echo >&2 "Working in $(pwd)"
need_command spruce

# Allow for target-specific settings
Expand All @@ -73,6 +106,10 @@ echo >&2 "Using settings found in ${settings_file}"

set -e
trap "cleanup" QUIT TERM EXIT INT

[[ -n ${SHOW_PIPELINE_URL} ]] && { show_pipeline_url; exit 0; }
[[ -n ${OPEN_PIPELINE} ]] && { open_pipeline; exit 0; }

spruce merge pipeline.yml ${settings_file} > .deploy.yml
PIPELINE=$(spruce json .deploy.yml | jq -r '.meta.pipeline // ""')
if [[ -z ${PIPELINE} ]]; then
Expand Down
1 change: 0 additions & 1 deletion ci/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ meta:
initial_version: 0.5.0

go:
version: "1.9"
binary: eden
cmd_module: .

Expand Down

0 comments on commit b50f835

Please sign in to comment.