Skip to content
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

ci: fix gator cli build #2657

Merged
merged 4 commits into from
Mar 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: "1.20"

- name: Get tag
id: get_version
run: |
Expand Down Expand Up @@ -83,7 +88,9 @@ jobs:
make e2e-verify-release IMG=${{ env.IMAGE_REPO }}:${TAG} USE_LOCAL_IMG=false
- name: Build gator-cli
shell: bash
run: |
set -e
build() {
export GOOS="$(echo ${1} | cut -d '-' -f 1)"
export GOARCH="$(echo ${1} | cut -d '-' -f 2)"
Expand All @@ -97,11 +104,21 @@ jobs:
tar -czf ${FILENAME}.tar.gz gator*
popd
}
mkdir -p _dist
i=0
for os_arch_extension in $PLATFORMS; do
build ${os_arch_extension} &
build ${os_arch_extension} &
pids[${i}]=$!
((i=i+1))
done
wait
# wait for all pids
for pid in ${pids[*]}; do
wait $pid
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two thoughts

  • wondering if we want a specific timeout here, besides the overall timeout defined on line 19 in this file for all jobs;
  • did we want to fail the job if one of the pid's returns non zero?

Copy link
Member Author

@sozercan sozercan Mar 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • no specific timeout, just timeout for the pipeline itself
  • yea that is the proposed behavior in the PR (set -e). we are not doing that today so we didn't know release of gator failed

done
pushd _dist
# consolidate tar's sha256sum into a single file
find . -type f -name '*.tar.gz' | sort | xargs sha256sum >> sha256sums.txt
Expand Down