forked from mightyshazam/azure-key-vault-controller
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
35 lines (29 loc) · 1.29 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
language: go
go:
- 1.12.x
sudo: 'required'
services:
- docker
env:
global:
- DEP_VERSION="0.5.0"
- OPERATOR_SDK_VERSION="v0.8.0"
before_install:
- curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep
- chmod +x $GOPATH/bin/dep
- curl -L -s https://github.com/operator-framework/operator-sdk/releases/download/${OPERATOR_SDK_VERSION}/operator-sdk-${OPERATOR_SDK_VERSION}-x86_64-linux-gnu -o operator-sdk && chmod +x operator-sdk && sudo mv operator-sdk /usr/local/bin/
install:
- dep ensure -v
before_script:
- GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/) # All the .go files, excluding vendor/
script:
- operator-sdk build awareoss/azure-key-vault-controller:latest
- if [[ "$TRAVIS_BRANCH" == "master" ]] && [ "$TRAVIS_PULL_REQUEST" == "false" ] ; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" &&
docker push awareoss/azure-key-vault-controller:latest ;
fi
- if [[ "$TRAVIS_TAG" ]] && [ "$TRAVIS_PULL_REQUEST" == "false" ] ; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" &&
docker tag awareoss/azure-key-vault-controller:latest awareoss/azure-key-vault-controller:$TRAVIS_TAG &&
docker push awareoss/azure-key-vault-controller:$TRAVIS_TAG ;
fi