-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Build: Save build artifact and publish release #2633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 10 commits
a21b226
7fd5126
3c28ffd
73023f3
442f364
7ff0f07
65d34d9
9ee83f6
4e3a215
6327141
557e8ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| #!/bin/bash | ||
|
|
||
| # NOTE: please do not set trace mode (-x) | ||
| # as it will leak credentials in the logs. | ||
| set -e | ||
|
|
||
| if [[ -z "${CIRCLE_TAG:-}" ]]; then | ||
| echo "skipping non tag events" | ||
| exit 0 | ||
| fi | ||
|
|
||
| if [[ ! -f "${ENVOY_SRCDIR}/build_release_stripped/envoy" ]]; then | ||
| echo "could not locate envoy binary at path: ${ENVOY_SRCDIR}/build_release_stripped/envoy" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [[ -z "${GITHUB_TOKEN:-}" ]]; then | ||
| echo "environment variable GITHUB_TOKEN unset; cannot continue with publishing." | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [[ -z "${GITHUB_USER:-}" ]]; then | ||
| echo "environment variable GITHUB_USER unset; cannot continue with publishing." | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [[ -z "${GITHUB_REPO:-}" ]]; then | ||
| echo "environment variable GITHUB_REPO unset; cannot continue with publishing." | ||
| exit 1 | ||
| fi | ||
|
|
||
| wget https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2 -O /tmp/ghrelease.tar.bz2 | ||
| tar -xvjpf /tmp/ghrelease.tar.bz2 -C /tmp | ||
| cp /tmp/bin/linux/amd64/github-release /usr/local/bin/ghrelease | ||
| chmod +x /usr/local/bin/ghrelease | ||
|
|
||
| ghrelease release --tag "${CIRCLE_TAG:-}" --name "${CIRCLE_TAG:-}" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @taion809 From a cursory look, this appears to create a Github release? Currently, I think the process is roughly as follows:
So I think this needs to be changed to add the binary to the existing Github release, rather than creating a release, otherwise we'll need to revise the release process for Envoy. |
||
| ghrelease upload --tag "${CIRCLE_TAG:-}" --name "envoy-linux-amd64" --file "${ENVOY_SRCDIR}/build_release_stripped/envoy" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will be run on every repository event, resulting in a release created for every merge?
We've historically handled this by adding a check in the script to only publish/release for tag events. Here's an example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be fixed, great catch!