forked from redhat-developer/service-binding-operator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
52 lines (45 loc) · 1.54 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
go_import_path: github.com/redhat-developer/service-binding-operator
sudo: required
dist: xenial
language: go
go:
- 1.13.x
git:
depth: false
env:
global:
- SDK_VERSION="0.15.2"
- GO111MODULE=on
- USER="redhat-developer"
- EMAIL="[email protected]"
- REPO="service-binding-operator"
- FILES="./tmp/manifests/*"
- GH_REPO="github.com/${USER}/${REPO}.git"
- GH_REMOTE_REPO="github.com/${USER}/service-binding-operator-manifests"
before_install:
# Install deps
- sudo apt-get update -y
- sudo apt-get install software-properties-common -y
- sudo add-apt-repository ppa:deadsnakes/ppa -y
- sudo apt-get update -y
- sudo apt-get install python3.7 -y
- sudo apt-get install python3.7-venv -y
# Download Operator SDK
- curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/v${SDK_VERSION}/operator-sdk-v${SDK_VERSION}-x86_64-linux-gnu && chmod +x operator-sdk && mv operator-sdk $GOPATH/bin/
script:
# Run merge-to-master-release
- if [ "$TRAVIS_BRANCH" = "master" ]; then
make merge-to-master-release &&
make push-to-manifest-repo &&
make push-bundle-to-quay || exit 1;
fi
after_success:
- MESSAGE=($TRAVIS_COMMIT)
- git clone git://${GH_REMOTE_REPO}
- cp -r ${FILES} ./service-binding-operator-manifests
- cd service-binding-operator-manifests
- git config user.email ${EMAIL}
- git config user.name ${USER}
- git add .
- git commit -m ${MESSAGE}
- git push "https://${GITHUB_TOKEN}@${GH_REMOTE_REPO}" master > /dev/null 2>&1