1
1
os : linux
2
- language : go
3
- go_import_path : github.com/operator-framework/operator-sdk
4
2
dist : xenial
5
3
4
+ # Install python3 and utilities dependencies
5
+ addons :
6
+ apt :
7
+ packages :
8
+ - " python3"
9
+ - " python3-pip"
10
+
6
11
# Python 3.6 is the default Python when language: python.
7
12
# But when not language: python, Python 3 can not be used by default.
8
13
# There is pip (/usr/bin/pip), but not pip3.
11
16
global :
12
17
- PATH=/opt/python/3.6.7/bin:$PATH
13
18
14
- # Install python3 and utilities dependencies
15
- addons :
16
- apt :
17
- packages :
18
- - " python3"
19
- - " python3-pip"
19
+ language : go
20
+ go :
21
+ - 1.15.x
22
+ go_import_path : github.com/operator-framework/operator-sdk
20
23
21
24
cache :
22
25
directories :
23
- - $HOME/.cache/go-build
24
-
25
- go :
26
- - 1.15.x
26
+ - ${HOME}/.cache/go-build
27
+ - $(go env GOPATH)/pkg/mod
27
28
28
29
# The `x_base_steps` top-level key is unknown to travis,
29
30
# so we can use it to create a bunch of common build step
30
31
# YAML anchors which we use in our build jobs.
31
32
x_base_steps :
32
33
# Base go, ansbile, and helm job
33
34
- &test
34
- env :
35
- # before_install for jobs that require go builds and do not run for doc-only changes
36
35
before_install :
37
36
# hack/ci/check-doc-only-update.sh needs to be sourced so
38
37
# that it can properly exit the test early with success
39
38
- source hack/ci/check-doc-only-update.sh
40
39
- git fetch origin --unshallow --tags
41
- after_success :
42
- - echo "Tests passed"
43
40
after_failure :
44
- - echo "Tests failed"
45
41
- kubectl get all --all-namespaces
46
42
- kubectl get events --all-namespaces --field-selector=type=Warning
47
43
services :
@@ -51,10 +47,6 @@ x_base_steps:
51
47
- &deploy
52
48
before_install :
53
49
- git fetch origin --unshallow --tags
54
- after_success :
55
- - echo "Image build succeeded, and docker image tagged and pushed to repository"
56
- after_failure :
57
- - echo "Image build, docker image tagging, or docker image pushing to repository failed"
58
50
services :
59
51
- docker
60
52
@@ -66,10 +58,6 @@ x_base_steps:
66
58
# We need /etc/docker to be accessible to non-root users.
67
59
# See https://github.com/moby/moby/pull/37847.
68
60
- sudo chmod 0755 /etc/docker
69
- after_success :
70
- - echo "Manifest list push to registry succeeded"
71
- after_failure :
72
- - echo "Manifest list creation or push to registry failed"
73
61
services :
74
62
- docker
75
63
@@ -88,38 +76,38 @@ jobs:
88
76
89
77
# Run the sanity tests
90
78
- stage : check
91
- name : Sanity Tests
79
+ name : sanity
92
80
before_install :
93
81
- git fetch origin --unshallow --tags
94
82
script :
95
83
- make test-sanity
96
84
97
85
# Run website checks
98
- - name : Doc Checks
86
+ - name : doc links
99
87
script :
100
88
- make test-links
101
89
102
90
# # Operator test stage jobs ##
103
91
104
92
# Build and test ansible and test ansible using molecule
105
93
- stage : test
94
+ name : ansible e2e
106
95
<< : *test
107
- name : Ansible on Kubernetes
108
96
before_script :
109
97
- pip3 install --upgrade setuptools pip
110
98
- pip install --user ansible~=2.9.13
111
99
script :
112
100
- make test-e2e-ansible test-e2e-ansible-molecule
113
101
114
102
# Test subcommands
115
- - << : *test
116
- name : Subcommands and Integration on Kubernetes
103
+ - name : subcommand and integration
104
+ << : *test
117
105
script :
118
106
- make test-e2e-integration
119
107
120
108
# Build and test go
121
- - << : *test
122
- name : Go on Kubernetes
109
+ - name : go unit and e2e
110
+ << : *test
123
111
before_script :
124
112
- (cd / && go get github.com/mattn/goveralls)
125
113
script :
@@ -129,48 +117,48 @@ jobs:
129
117
- $GOPATH/bin/goveralls -service=travis-ci -coverprofile=coverage.out -repotoken=$COVERALLS_TOKEN
130
118
131
119
# Build and test helm
132
- - << : *test
133
- name : Helm on Kubernetes
120
+ - name : helm e2e
121
+ << : *test
134
122
script : make test-e2e-helm
135
123
136
124
# # Image deploy/push stage jobs ##
137
125
138
126
# Build and deploy arm64 docker images
139
127
- stage : deploy
140
- << : *deploy
141
- name : Docker images for arm64
128
+ name : build and push images
142
129
arch : arm64
130
+ << : *deploy
143
131
script :
144
- - make image-build-ansible image-build-helm image-build-scorecard-test image-build-scorecard-test-kuttl image-build-sdk
145
- - make image-push-ansible image-push-helm image-push-scorecard-test image-push-scorecard-test-kuttl image-push-sdk
132
+ - make image-build
133
+ - make -f release/Makefile image-push
146
134
147
135
# Build and deploy amd64 docker images
148
- - << : *deploy
149
- name : Docker images for amd64
136
+ - name : build and push images
150
137
arch : amd64
138
+ << : *deploy
151
139
script :
152
- - make image-build-ansible image-build-helm image-build-scorecard-test image-build-scorecard-test-kuttl image-build-sdk
153
- - make image-push-ansible image-push-helm image-push-scorecard-test image-push-scorecard-test-kuttl image-push-sdk
140
+ - make image-build
141
+ - make -f release/Makefile image-push
154
142
155
143
# Build and deploy ppc64le docker images
156
- - << : *deploy
157
- name : Docker images for ppc64le
144
+ - name : build and push images
158
145
arch : ppc64le
146
+ << : *deploy
159
147
script :
160
- - make image-build-ansible image-build-helm image-build-scorecard-test image-build-scorecard-test-kuttl image-build-sdk
161
- - make image-push-ansible image-push-helm image-push-scorecard-test image-push-scorecard-test-kuttl image-push-sdk
148
+ - make image-build
149
+ - make -f release/Makefile image-push
162
150
163
151
# Build and deploy s390x docker images
164
- - << : *deploy
165
- name : Docker images for s390x
152
+ - name : build and push images
166
153
arch : s390x
154
+ << : *deploy
167
155
script :
168
- - make image-build-ansible image-build-helm image-build-scorecard-test image-build-sdk
169
- - make image-push-ansible image-push-helm image-push-scorecard-test image-push-sdk
156
+ # Use targets directly since kuttl doesn't support s390x.
157
+ - make image/ansible-operator image/helm-operator image/operator-sdk image/scorecard-test
158
+ - make -f release/Makefile image-push/ansible-operator image-push/helm-operator image-push/operator-sdk image-push/scorecard-test
170
159
171
160
# Build and deploy ansible multi-arch manifest list
172
161
- stage : deploy-manifest-multiarch
162
+ name : push manifest lists
173
163
<< : *manifest-deploy
174
- name : Manifest lists
175
- script :
176
- - make image-push-ansible-multiarch image-push-helm-multiarch image-push-scorecard-test-multiarch image-push-scorecard-test-kuttl-multiarch image-push-sdk-multiarch
164
+ script : make -f release/Makefile image-push-multiarch
0 commit comments