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