-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): release docker image for PRs and master
Signed-off-by: Lorenzo Fontana <[email protected]>
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
language: go | ||
go: | ||
- 1.11.4 | ||
services: | ||
- docker | ||
script: | ||
- make _output/bin/kubectl-trace | ||
after_success: | ||
- ./hack/release-image.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
set -xeo pipefail | ||
|
||
# Script that builds the bpftrace image and releases | ||
# it to quay only if the request is coming from the main repo. | ||
|
||
make=$(command -v make) | ||
docker=$(command -v docker) | ||
|
||
$make image/build | ||
|
||
if [[ ! -z "$QUAY_TOKEN" ]]; then | ||
$docker login -u="fntlnz+travisci" -p="$QUAY_TOKEN" quay.io | ||
$make image/push | ||
|
||
if [[ "TRAVIS_BRANCH" == "master" ]]; then | ||
$make image/latest | ||
fi | ||
fi | ||
|