1
+ os : linux
2
+ dist : xenial
3
+
1
4
language : go
2
5
3
6
go :
@@ -42,15 +45,17 @@ jobs:
42
45
# see the ci/infra/providers/CREDENTIALS.md for details on the credentials
43
46
- stage : End-to-end tests
44
47
name : " e2e tests in Google Cloud (GKE)"
45
- if : type = cron OR tag IS present
48
+ # Run on cron jobs, tagged releases or any builds where commit message contains "test-gke"
49
+ if : (type IN (cron, api) OR (tag =~ ^v) OR (commit_message =~ test-gke) OR (commit_message =~ test-cloud)) AND NOT (commit_message =~ skip-gke OR commit_message =~ skip-cloud)
46
50
env :
47
51
- CLUSTER_PROVIDER="gke"
48
52
- CLUSTER_MACHINE="e2-standard-8"
49
53
- CLUSTER_REUSE=1
50
54
script : make ci/cluster-setup ci/e2e
51
55
52
56
- name : " e2e tests in Azure (AKS)"
53
- if : type = cron OR tag IS present
57
+ # Run on cron jobs, tagged releases or any builds where commit message contains "test-azure"
58
+ if : (type IN (cron, api) OR (tag =~ ^v) OR (commit_message =~ test-azure) OR (commit_message =~ test-cloud)) AND NOT (commit_message =~ skip-azure OR commit_message =~ skip-cloud)
54
59
env :
55
60
- CLUSTER_PROVIDER="azure"
56
61
- CLUSTER_REUSE=1
@@ -63,79 +68,39 @@ jobs:
63
68
# ####################################################
64
69
# stage 3: push images
65
70
# ####################################################
66
- - stage : Publish artifacts
67
- name : " Publish artifacts to GitHub"
68
- if : tag IS present
69
- env :
70
- - AMB_OPER_TAG="$TRAVIS_TAG"
71
- - REL_REGISTRY="docker.io/datawire"
72
- deploy :
73
- - provider : script
74
- on :
75
- all_branches : true
76
- script : make ci/release
77
- # publish YAMLs to GitHub releases
78
- # `make ci/release` should have left everything in build/artifacts/*
79
- - provider : releases
80
- on :
81
- branch : master
82
- api_key :
83
- secure : XFAZ+q3B7TL7ae0lK6Nl4RCkYxknZ0gZ44g/aR5zOcTkAuJ9049vOUol7UQT9ZyRMMOigfma5IQRFqcQlHBPnBRGkuHFGqxx48Kw1pvLRR3BhIYG0aSyDR3ZnI0eEkaKzui1zKBC5R03DK1NpVl+muomNDWgsEb9M9qn7onYQPMfCi4ZZ8x/ev5GtXlHPrCh4O/m51X0nLoVMsvFaogNiiwKtS/sWlLTiY9DWwACF5yY58Q65l3GNiLaIQCIvdU3losq08KJViIE8qBNojCRr+zLXluOlpgVb7ozZ3vWNephuHZoRIvW8hH8MTgaiuDh+XGlbTNlLBrJAF43CPZLQdzZdLMp74XRx90OkXHA8p6crBoQRa5Q7/MhV0pswdMcSKnHIe9dRkkPiGmDGXFg5WAchI6egGskAD4SAZMmiXBoj8TcjtyDa4NExakebrrU/XzvU951teAk2czNs1yoXTDfrpgDiIfI7PaIXgUGJi8VjkuwgSZ8uU1EQNwrvhikngbtFKnzM7I2KGr3nIE9cTxxo81PWoElrGAarArQZjARJp1z2myTqPiUi3FcvFOmaeOZbTvHc2kt2Z5iZCJ4Np/YwmXL7pCjijxbb8MB6MrQLv96woX0do/lDDsq8tXrRRoxGqpRzvBtLWHVMw55aKrbnvfnic1HGwyMZnFex+E=
84
- file_glob : true
85
- file : build/artifacts/*
86
- skip_cleanup : true
87
-
88
- - name : " Publish image to Docker.io"
89
- if : tag IS present
71
+ - stage : Push images to repositories
72
+ name : " Push images to repositories"
73
+ if : (branch =~ ^v) AND (tag =~ ^v) AND (type != pull_request) AND NOT (commit_message =~ skip-push)
90
74
env :
91
- - AMB_OPER_TAG="$TRAVIS_TAG"
92
- - REL_REGISTRY="docker.io/datawire"
75
+ - AMB_OPER_IMAGE_TAG="$TRAVIS_TAG"
93
76
deploy :
94
77
# publish images to Docker.io
95
78
# NOTE: make sure DOCKER_USERNAME/DOCKER_PASSWORD have values for a bot
96
79
- provider : script
97
80
on :
98
81
all_branches : true
99
- script : make ci/release ci/publish-image
100
-
101
- - name : " Push images to Quay.io"
102
- if : tag IS present
103
- env :
104
- - AMB_OPER_TAG="$TRAVIS_TAG"
105
- - DOCKER_USERNAME="$QUAY_USERNAME"
106
- - DOCKER_PASSWORD="$QUAY_PASSWORD"
107
- - REL_REGISTRY="quay.io/datawire"
108
- deploy :
82
+ script : REL_REGISTRY="docker.io/datawire" make ci/publish-image
109
83
# publish images to Quay.io
110
84
# NOTE: make sure DOCKER_USERNAME/DOCKER_PASSWORD have values for a bot
111
85
# (from https://quay.io/repository/datawire/ambassador-operator?tab=settings)
112
86
- provider : script
113
87
on :
114
- branch : master
115
- script : make ci/release ci/publish-image
116
-
117
- - name : " Push images to Azure ACR"
118
- if : tag IS present
119
- env :
120
- - AMB_OPER_TAG="$TRAVIS_TAG"
121
- - CLUSTER_REGISTRY="datawire"
122
- - CLUSTER_PROVIDER="azure"
123
- - AZ_RES_GRP="DefaultResourceGroup-EUS"
124
- deploy :
88
+ all_branches : true
89
+ script : DOCKER_USERNAME="$QUAY_USERNAME" DOCKER_PASSWORD="$QUAY_PASSWORD" REL_REGISTRY="quay.io/datawire" make ci/publish-image
125
90
- provider : script
126
91
on :
127
- branch : master
128
- env :
129
- script : make ci/cluster-setup ci/release ci/publish-image-cloud/azure
92
+ all_branches : true
93
+ script : CLUSTER_PROVIDER="azure" CLUSTER_REGISTRY="datawire" AZ_RES_GRP="DefaultResourceGroup-EUS" make ci/cluster-setup ci/publish-image-cloud/azure
130
94
131
95
# ####################################################
132
96
# stage 4: publish artifacts
133
97
# ####################################################
134
98
- stage : Publish artifacts
135
- name : " Publish artifacts to GitHub "
136
- if : tag IS present
99
+ name : " Publish artifacts"
100
+ if : (branch =~ ^v) AND ( tag =~ ^v) AND (type != pull_request) AND NOT (commit_message =~ skip-publish)
137
101
env :
138
- - AMB_OPER_TAG="$TRAVIS_TAG"
102
+ - AMB_OPER_IMAGE_TAG="$TRAVIS_TAG"
103
+ - REL_REGISTRY="docker.io/datawire"
139
104
deploy :
140
105
- provider : script
141
106
on :
@@ -151,30 +116,21 @@ jobs:
151
116
file_glob : true
152
117
file : build/artifacts/*
153
118
skip_cleanup : true
154
-
155
- - name : " Publish Helm Chart"
156
- if : tag IS present
157
- env :
158
- - AMB_OPER_TAG="$TRAVIS_TAG"
159
- - DOCKER_USERNAME="$QUAY_USERNAME"
160
- - DOCKER_PASSWORD="$QUAY_PASSWORD"
161
- - REL_REGISTRY="quay.io/datawire"
162
- deploy :
163
119
# publish helm chart
164
120
# NOTE: needs AWS_ACCESS_KEY_ID, AWS_BUCKET and AWS_SECRET_ACCESS_KEY (from keybase)
165
121
- provider : script
166
122
on :
167
- branch : master
123
+ all_branches : true
168
124
script : make ci/cluster-setup ci/publish-chart
169
125
170
126
# ####################################################
171
127
# stage 5: smoke tests
172
128
# ####################################################
173
129
- stage : Smoke tests
174
- name : " Smoke tests for KIND "
175
- if : tag IS present
130
+ name : " Smoke tests"
131
+ if : (branch =~ ^v) AND ( tag =~ ^v) AND NOT (commit_message =~ skip-smoke)
176
132
env :
177
- - AMB_OPER_TAG ="$TRAVIS_TAG"
133
+ - AMB_OPER_IMAGE_TAG ="$TRAVIS_TAG"
178
134
deploy :
179
135
- provider : script
180
136
on :
0 commit comments