Skip to content

Instantly share code, notes, and snippets.

@flenter
Last active August 29, 2015 14:28
Show Gist options
  • Save flenter/bfb789ed28ff58a733a3 to your computer and use it in GitHub Desktop.
Save flenter/bfb789ed28ff58a733a3 to your computer and use it in GitHub Desktop.
multiple deploy targets
box: tcnksm/gox:1.4.2
build:
steps:
- install-packages:
packages: openssh-client
- termie/glide-build:
build: false
- script:
name: go vet
code: |
go get golang.org/x/tools/cmd/vet
go vet *.go
- golint
- script:
name: go test
code: go test
deploy:
box: ubuntu:12.04
# default steps
steps:
- s3sync:
source-dir: "."
delete-removed: false
bucket-url: $AWS_BUCKET_URL/
key-id: $AWS_ACCESS_KEY_ID
key-secret: $AWS_SECRET_ACCESS_KEY
# steps for a deploy target named `beta`
beta:
- script:
name: version
code: |
export WERCKER_VERSION=$(./latest/linux_amd64/tool --version | awk '{print $3}')
echo $WERCKER_VERSION
./latest/linux_amd64/tool version --json > ./latest/version.json
- s3sync:
source-dir: "./latest"
delete-removed: false
bucket-url: $DOWNLOADS_BUCKET_URL/beta/
key-id: $AWS_ACCESS_KEY_ID
key-secret: $AWS_SECRET_ACCESS_KEY
# steps for the `stable` deploy target
stable:
- script:
name: version
code: |
export WERCKER_VERSION=$(./latest/linux_amd64/tool --version | awk '{print $3}')
echo $WERCKER_VERSION
./latest/linux_amd64/tool version --json > ./latest/version.json
- s3sync:
source-dir: "./latest"
delete-removed: false
bucket-url: $DOWNLOADS_BUCKET_URL/stable/
key-id: $AWS_ACCESS_KEY_ID
key-secret: $AWS_SECRET_ACCESS_KEY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment