Skip to content

Commit 3005fde

Browse files
nixpanicMadhu-1
authored andcommitted
travis: group build/e2e testing in stages
This reduces the number of concurrent jobs that get executed. The "build test" jobs are relatively quick, and give developers the 1st feedback. Longer e2e testing now only happens once the build tests have passed. See-also: https://docs.travis-ci.com/user/build-stages/ Signed-off-by: Niels de Vos <[email protected]> (cherry picked from commit 43fbc00)
1 parent e1c919b commit 3005fde

File tree

1 file changed

+28
-19
lines changed

1 file changed

+28
-19
lines changed

.travis.yml

+28-19
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ before_script:
5353

5454
jobs:
5555
include:
56-
- name: static-check-make
56+
# two stages for testing, each stage runs its jobs in parallel, but stages
57+
# are run after each other, unless the last stage fails
58+
# - build testing
59+
# - e2e testing
60+
- stage: build testing
61+
name: static-check-make
5762
install:
5863
- gem install mdl
5964
- pip install --user --upgrade pip
@@ -73,42 +78,46 @@ jobs:
7378
- make go-test
7479
- make mod-check || travis_terminate 1;
7580

76-
- name: Build multi-architecture image for amd64 and arm64
81+
- stage: build testing
82+
name: containerized build
7783
script:
78-
- ./scripts/build-multi-arch-image.sh || travis_terminate 1;
84+
- make containerized-build || travis_terminate 1;
7985

80-
- name: containerized build
86+
- stage: build testing
87+
name: cephcsi on Arm64
88+
arch: arm64
8189
script:
82-
- make containerized-build || travis_terminate 1;
90+
- scripts/skip-doc-change.sh || travis_terminate 0;
91+
- make image-cephcsi || travis_terminate 1;
92+
# No CI test job is availabe for Arm64 now due to below issues
93+
# - k8s-csi sidecar images for Arm64 are not available
94+
# - Travis Arm64 CI job runs inside unprivileged LXD which blocks
95+
# launching minikube test environment
96+
- travis_terminate 0 # deploy only on x86
8397

84-
- name: cephcsi with kube 1.14.10
98+
- stage: e2e testing
99+
name: cephcsi with kube 1.14.10
85100
script:
86101
- scripts/skip-doc-change.sh || travis_terminate 0;
87102
- make image-cephcsi || travis_terminate 1;
88103
- scripts/travis-functest.sh v1.14.10 || travis_terminate 1;
89104

90-
- name: cephcsi with kube 1.15.6
105+
- stage: e2e testing
106+
name: cephcsi with kube 1.15.6
91107
script:
92108
- scripts/skip-doc-change.sh || travis_terminate 0;
93109
- make image-cephcsi || travis_terminate 1;
94110
- scripts/travis-functest.sh v1.15.6 || travis_terminate 1;
95111

96-
- name: cephcsi with kube 1.17.0
112+
- stage: e2e testing
113+
name: cephcsi with kube 1.17.0
97114
script:
98115
- scripts/skip-doc-change.sh || travis_terminate 0;
99116
- make image-cephcsi || travis_terminate 1;
100117
- scripts/travis-functest.sh v1.17.0 || travis_terminate 1;
101-
- name: cephcsi on Arm64
102-
arch: arm64
103-
script:
104-
- scripts/skip-doc-change.sh || travis_terminate 0;
105-
- make image-cephcsi || travis_terminate 1;
106-
# No CI test job is availabe for Arm64 now due to below issues
107-
# - k8s-csi sidecar images for Arm64 are not available
108-
# - Travis Arm64 CI job runs inside unprivileged LXD which blocks
109-
# launching minikube test environment
110-
- travis_terminate 0 # deploy only on x86
111-
- name: cephcsi helm charts with kube 1.17.0
118+
119+
- stage: e2e testing
120+
name: cephcsi helm charts with kube 1.17.0
112121
script:
113122
- scripts/skip-doc-change.sh || travis_terminate 0;
114123
- make image-cephcsi || travis_terminate 1;

0 commit comments

Comments
 (0)