Skip to content

Commit

Permalink
feat(integration): build images before integration tests
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenzo Fontana <[email protected]>
  • Loading branch information
fntlnz committed Jan 9, 2019
1 parent 77700ca commit 229f303
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
script:
- make test
- make _output/bin/kubectl-trace
- ./hack/ci-build-image.sh
- make integration
after_success:
- ./hack/release-image.sh
- ./hack/ci-release-image.sh
11 changes: 11 additions & 0 deletions hack/ci-build-image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -xeo pipefail

make=$(command -v make)

makeopts=""
if [[ ! -z "$TRAVIS_PULL_REQUEST_BRANCH" ]]; then
makeopts="-e GIT_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH image/build"
fi

$make $makeopts image/build
2 changes: 0 additions & 2 deletions hack/release-image.sh → hack/ci-release-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ if [[ ! -z "$TRAVIS_PULL_REQUEST_BRANCH" ]]; then
makeopts="-e GIT_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH image/build"
fi

$make $makeopts image/build

if [[ ! -z "$QUAY_TOKEN" ]]; then
$docker login -u="fntlnz+travisci" -p="$QUAY_TOKEN" quay.io
$make $makeopts image/push
Expand Down

0 comments on commit 229f303

Please sign in to comment.