Skip to content

Commit 229f303

Browse files
committed
feat(integration): build images before integration tests
Signed-off-by: Lorenzo Fontana <[email protected]>
1 parent 77700ca commit 229f303

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ services:
99
script:
1010
- make test
1111
- make _output/bin/kubectl-trace
12+
- ./hack/ci-build-image.sh
1213
- make integration
1314
after_success:
14-
- ./hack/release-image.sh
15+
- ./hack/ci-release-image.sh

hack/ci-build-image.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
set -xeo pipefail
3+
4+
make=$(command -v make)
5+
6+
makeopts=""
7+
if [[ ! -z "$TRAVIS_PULL_REQUEST_BRANCH" ]]; then
8+
makeopts="-e GIT_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH image/build"
9+
fi
10+
11+
$make $makeopts image/build

hack/release-image.sh renamed to hack/ci-release-image.sh

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ if [[ ! -z "$TRAVIS_PULL_REQUEST_BRANCH" ]]; then
1212
makeopts="-e GIT_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH image/build"
1313
fi
1414

15-
$make $makeopts image/build
16-
1715
if [[ ! -z "$QUAY_TOKEN" ]]; then
1816
$docker login -u="fntlnz+travisci" -p="$QUAY_TOKEN" quay.io
1917
$make $makeopts image/push

0 commit comments

Comments
 (0)