-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Migrate release process to github actions
This completely replaces the existing Travis-based scripts with Github Actions. - Images now built by CI will receive a docker tag corresponding to their git tag - Go release is called when any tag is pushed, which will use Github Actions to create the Github Release, and uploads cross-compiled Go binaries to it.
- Loading branch information
Showing
9 changed files
with
106 additions
and
48 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
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
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,17 @@ | ||
#!/usr/bin/env bash | ||
set -xeo pipefail | ||
|
||
git_ref=$1 # github.ref format: refs/REMOTE/REF | ||
# eg, refs/heads/BRANCH | ||
# refs/tags/v0.9.6-pre | ||
|
||
git_base_ref=$(basename ${git_ref}) | ||
|
||
make=$(command -v make) | ||
|
||
if [[ ! -z "${git_base_ref}" ]]; then | ||
makeopts="-e GIT_BRANCH=${git_base_ref} ${makeopts}" | ||
fi | ||
|
||
$make $makeopts image/build | ||
$make $makeopts image/build-init |
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,31 @@ | ||
#!/usr/bin/env bash | ||
set -xeo pipefail | ||
|
||
# Script that builds and releases images to quay.io | ||
# It is expected to be run from github actions. | ||
# The secret "QUAY_TOKEN" is expected to be set, with access to a quay.io repository | ||
# The environment variable "QUAY_BOT_USER" can be used to override the default bot username | ||
GIT_ORG=${GIT_ORG:-iovisor} | ||
QUAY_BOT_USER=${QUAY_BOT_USER:-kubectltrace_buildbot} | ||
|
||
git_ref=$1 # github.ref format: refs/REMOTE/REF | ||
# eg, refs/heads/BRANCH | ||
# refs/tags/v0.9.6-pre | ||
git_base_ref=$(basename ${git_ref}) | ||
|
||
make=$(command -v make) | ||
docker=$(command -v docker) | ||
|
||
makeopts="" | ||
if [[ ! -z "${git_base_ref}" ]]; then | ||
makeopts="-e GIT_BRANCH=${git_base_ref} ${makeopts}" | ||
fi | ||
|
||
if [[ ! -z "$QUAY_TOKEN" ]]; then | ||
$docker login -u="${GIT_ORG}+${QUAY_BOT_USER}" -p="$QUAY_TOKEN" quay.io | ||
$make $makeopts image/push | ||
|
||
if [[ "${git_ref_id}" = "master" ]] && [[ "${git_base_ref}" = "" ]]; then | ||
$make $makeopts image/latest | ||
fi | ||
fi |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.