This repository has been archived by the owner on May 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 385
/
.travis.yml
150 lines (150 loc) · 5.06 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
language: generic
notifications:
email: # We are using secure strings to workaround travis sending emails for forks
- secure: "JiJEb1Fm7YPbgOz6VOuJ/07PU/lyKK+v6yUrjEl9TiT6zApN6EHO+Q7Z8OcAN4Q6o11DSRrhYr3+eomXwu5VXiFBPUk0EI9Z1msx4z0Oi104gfS4Kna3b3PGgvFptm7cKPlByVL46rmNssukLoqIX7zU5ceBQ7nETJxan/fwfatQzPzFHksysNQPzCnuPdZLhzDiZuwIhINcEAA9/D4SI6nmS17v2wygo8oNSo2xV2kfgSxJFzUmgt55WA17Y5VyIkATyEfBRpvPAtvhNjrjQcUruX2EICJaEAmO/873z2uQbp3/REtpNFykSsNhC1sE77fZhiZ+vU94zjneEOVF+vJyAlRbBuV/HML00AsWF4gqHLsfoNguSAX7bS8rAr67bzw+6cB5eX3hkjSnY7q+75eipk3e8FO4p9RhdjidlQcLvvmj2URq48PsePIUPZhJVZBfgwwIuCvYDrAZPb9yHj3X5uGHveI6Wwl6o9dpxmTfnT3rLBON2LfOsHe/HRFNbI+EVtH10dP/oMq9SQOqX+C6chuy4kjMIqUDN/n+eVPhHCKpDuaNde0vSMt9ZB+YFHiGjXoV+YhYZEnY+/LZAUhZDyO/gm3aZ1PiFvPISCZ9oSthnkzKGI7O3SuBSokDvnkLtVJCOw61nOekcmKoHPAS8dVUms4FPJMPkOkujmM="
sudo: required
services:
- docker
cache:
directories:
# ${GOPATH}/pkg is mounted in DOCKER_CMD in Makefile
- .pkg
# golang cache is mounted in DOCKER_CMD in Makefile
- .cache
stages:
- test
- name: deploy
if: type != pull_request
- name: push-chart
# require the tag name to match a regular expression
if: tag =~ ^v
before_install:
- |
if [[ -z "$TRAVIS_COMMIT_RANGE" ]]; then
# Builds triggered by initial commit of a new branch.
DOCS_ONLY=0
else
DOCS_REGEX='(OWNERS|LICENSE)|(\.md$)|(^docs/)|(^docsite/)'
[[ -z "$(git diff --name-only $TRAVIS_COMMIT_RANGE | grep -vE $DOCS_REGEX)" ]]
DOCS_ONLY=$?
fi
if [[ $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+[a-z]*((-beta.[0-9]+)|(-(r|R)(c|C)[0-9]+))?$ ]]; then
export DEPLOY_TYPE=release
elif [[ $TRAVIS_BRANCH == "master" ]]; then
export DEPLOY_TYPE=master
else
export DEPLOY_TYPE=none-$TRAVIS_TAG-$TRAVIS_BRANCH
fi
jobs:
fast_finish: true
include:
# CI Build
- stage: test
name: verify
script:
- |
if (( $DOCS_ONLY == 0 )); then
echo "Running verify-docs"
make verify-docs
else
echo "Running full build"
# make sure code quality is good and proper
# generate the output binaries for server and client
# ensure the tests build
make verify build svcat build-integration
fi
env: GO_VERSION=1.13
# Doc Site svc-cat.io
- stage: test
name: docs
script:
- |
make docs
env: DOCS=true
# Deploy service-catalog on release
- stage: deploy
name: SC release - amd64
script: skip
deploy:
skip_cleanup: true
provider: script
script: contrib/hack/ci/publish-svc-cat.sh --arch amd64
on:
repo: kubernetes-sigs/service-catalog
all_branches: true
condition: $DEPLOY_TYPE == release
- stage: deploy
name: SC release - arm
script: skip
deploy:
skip_cleanup: true
provider: script
script: contrib/hack/ci/publish-svc-cat.sh --arch arm
on:
repo: kubernetes-sigs/service-catalog
all_branches: true
condition: $DEPLOY_TYPE == release
- stage: deploy
name: SC release - arm64
script: skip
deploy:
skip_cleanup: true
provider: script
script: contrib/hack/ci/publish-svc-cat.sh --arch arm64
on:
repo: kubernetes-sigs/service-catalog
all_branches: true
condition: $DEPLOY_TYPE == release
- stage: deploy
name: SC release - ppc64le
script: skip
deploy:
skip_cleanup: true
provider: script
script: contrib/hack/ci/publish-svc-cat.sh --arch ppc64le
on:
repo: kubernetes-sigs/service-catalog
all_branches: true
condition: $DEPLOY_TYPE == release
- stage: deploy
name: SC release - s390x
script: skip
deploy:
skip_cleanup: true
provider: script
script: contrib/hack/ci/publish-svc-cat.sh --arch s390x
on:
repo: kubernetes-sigs/service-catalog
all_branches: true
condition: $DEPLOY_TYPE == release
# Deploy service-catalog after merge to master
- stage: deploy
name: SC master - amd64
script: skip
deploy:
skip_cleanup: true
provider: script
script: contrib/hack/ci/publish-svc-cat.sh
on:
repo: kubernetes-sigs/service-catalog
all_branches: true
condition: $DEPLOY_TYPE == master
# Deploy svcat on release
- stage: deploy
name: SVCAT
script: skip
deploy:
skip_cleanup: true
provider: script
script: contrib/hack/ci/publish-svcat-cli.sh
on:
repo: kubernetes-sigs/service-catalog
all_branches: true
- stage: push-chart
script:
- |
set -e
openssl aes-256-cbc -K $encrypted_99eda037369e_key -iv $encrypted_99eda037369e_iv -in \
contrib/hack/ci/assets/chart_key.enc -out contrib/hack/ci/assets/chart_key -d
chmod 400 contrib/hack/ci/assets/chart_key
contrib/hack/ci/publish-helm-chart.sh