mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-07 13:55:20 +00:00
* Add script for pushing container images via Travis Signed-off-by: Nolan Brubaker <brubakern@vmware.com> * Explain the latest tag logic Signed-off-by: Nolan Brubaker <brubakern@vmware.com> * Add travis integration to deployment * ensure $BRANCH is always the same value (borrowed from Sonobuoy) * get gcloud SDK installed (borrowed from Sonobuoy) * use deploy step to run GCR push script (borrowed from Sonobuoy) * use gcloud's docker to do the image building/pushing * placeholders for secure values * rename $LATEST to $HIGHEST to more accurately reflect what it is Signed-off-by: Nolan Brubaker <brubakern@vmware.com> * Add encrypted GCR creds Signed-off-by: Nolan Brubaker <brubakern@vmware.com> * Remove unused env section Signed-off-by: Nolan Brubaker <brubakern@vmware.com> * Rearrange logic so that there's only one make call Signed-off-by: Nolan Brubaker <brubakern@vmware.com> * Review feedback Signed-off-by: Nolan Brubaker <brubakern@vmware.com> * Update gcloud and OS for Travis environment Signed-off-by: Nolan Brubaker <brubakern@vmware.com> * Remove redundant make dependencies verify and test targets already run on the ci target, which must pass before deploy. Signed-off-by: Nolan Brubaker <brubakern@vmware.com> * Re-encrypt file after testing Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
32 lines
863 B
YAML
32 lines
863 B
YAML
dist: xenial
|
|
language: go
|
|
|
|
go:
|
|
- 1.12.x
|
|
|
|
sudo: required
|
|
|
|
services:
|
|
- docker
|
|
|
|
script:
|
|
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
|
|
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$TRAVIS_PULL_REQUEST, BRANCH=$BRANCH"
|
|
- hack/ci-check.sh
|
|
|
|
# gcloud sdk is needed to upload docker images, but we want an updated version
|
|
# Do this outside our script so that it's clearly separated in the logs
|
|
before_deploy:
|
|
- sudo apt-get remove google-cloud-sdk
|
|
- if [ ! -d ${HOME}/google-cloud-sdk ]; then curl https://sdk.cloud.google.com | bash
|
|
/dev/stdin --disable-prompts; fi
|
|
- export PATH=${HOME}/google-cloud-sdk/bin:$PATH && echo "$PATH"
|
|
|
|
deploy:
|
|
- provider: script
|
|
skip_cleanup: true
|
|
script: hack/gcr-push.sh
|
|
on:
|
|
repo: heptio/velero
|
|
all_branches: true
|