Skip to content

Commit

Permalink
updating wercker.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fd committed May 10, 2016
1 parent f2dfd03 commit c5b05be
Showing 1 changed file with 29 additions and 16 deletions.
45 changes: 29 additions & 16 deletions wercker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ${WERCKER_OUTPUT_DIR}/bin/k8s-linux-amd64/k8s ./cmd/k8s
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ${WERCKER_OUTPUT_DIR}/bin/k8s-darwin-amd64/k8s ./cmd/k8s
deploy:
prerelease:
steps:
- script:
name: "Pull secrets"
Expand All @@ -31,21 +31,34 @@ deploy:
name: "Push release"
code: |
mkdir -p dist
if [[ "$WERCKER_DEPLOYTARGET_NAME" == "prerelease" ]]; then
VERSION="$(v5n store bump k8s rc)"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-linux-amd64/k8s "$VERSION"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-darwin-amd64/k8s "$VERSION"
tar -C bin/k8s-linux-amd64 -f dist/k8s-linux-amd64.tar.gz -cz .
tar -C bin/k8s-darwin-amd64 -f dist/k8s-darwin-amd64.tar.gz -cz .
ghr -u fd -r k8s-utils -c $WERCKER_GIT_COMMIT --replace --prerelease "v$VERSION" ./dist
else
VERSION="$(v5n store bump k8s final+patch)"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-linux-amd64/k8s "$VERSION"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-darwin-amd64/k8s "$VERSION"
tar -C bin/k8s-linux-amd64 -f dist/k8s-linux-amd64.tar.gz -cz .
tar -C bin/k8s-darwin-amd64 -f dist/k8s-darwin-amd64.tar.gz -cz .
ghr -u fd -r k8s-utils -c $WERCKER_GIT_COMMIT --replace "v$VERSION" ./dist
fi
VERSION="$(v5n store bump k8s rc)"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-linux-amd64/k8s "$VERSION"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-darwin-amd64/k8s "$VERSION"
tar -C bin/k8s-linux-amd64 -f dist/k8s-linux-amd64.tar.gz -cz .
tar -C bin/k8s-darwin-amd64 -f dist/k8s-darwin-amd64.tar.gz -cz .
ghr -u fd -r k8s-utils -c $WERCKER_GIT_COMMIT --replace --prerelease "v$VERSION" ./dist
- mbrevda/[email protected]:
token: $WRK_TOKEN
application_id: $WRK_APP
message: Triggered from k8s

stable:
steps:
- script:
name: "Pull secrets"
code: |
curl -# https://gist.githubusercontent.com/fd/354eed3ebf924565741f0df980d11741/raw/sec.pem | sec dec | tar -C $HOME -x
eval "$(install-creds)"
- script:
name: "Push release"
code: |
mkdir -p dist
VERSION="$(v5n store bump k8s final+patch)"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-linux-amd64/k8s "$VERSION"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-darwin-amd64/k8s "$VERSION"
tar -C bin/k8s-linux-amd64 -f dist/k8s-linux-amd64.tar.gz -cz .
tar -C bin/k8s-darwin-amd64 -f dist/k8s-darwin-amd64.tar.gz -cz .
ghr -u fd -r k8s-utils -c $WERCKER_GIT_COMMIT --replace "v$VERSION" ./dist
- mbrevda/[email protected]:
token: $WRK_TOKEN
application_id: $WRK_APP
Expand Down

0 comments on commit c5b05be

Please sign in to comment.