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]: skipping debug builds when not making a release #4496

Merged
merged 4 commits into from
Jun 4, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/ci-all-in-one-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18

- name: Build, test, and publish all-in-one image
run: bash scripts/build-all-in-one-image.sh
run: bash scripts/build-all-in-one-image.sh pr-only
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
20 changes: 12 additions & 8 deletions scripts/build-all-in-one-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ BRANCH=${BRANCH:?'missing BRANCH env var'}
# be overrided by passing architecture value to the script:
# `GOARCH=<target arch> ./scripts/build-all-in-one-image.sh`.
GOARCH=${GOARCH:-$(go env GOARCH)}

mode=${1-main}
expected_version="v16"
version=$(node --version)
major_version=${version%.*.*}

if [ "$major_version" = "$expected_version" ] ; then
echo "Node version is as expected: $version"
else
Expand Down Expand Up @@ -46,10 +47,13 @@ run_integration_test localhost:5000/$repo
bash scripts/build-upload-a-docker-image.sh -b -c all-in-one -d cmd/all-in-one -p "${platforms}" -t release


make build-all-in-one-debug GOOS=linux GOARCH=$GOARCH
repo=${repo}-debug
#build all-in-one-debug image locally for integration test
bash scripts/build-upload-a-docker-image.sh -l -b -c all-in-one-debug -d cmd/all-in-one -t debug
run_integration_test localhost:5000/$repo
#build all-in-one-debug image and upload to dockerhub/quay.io
bash scripts/build-upload-a-docker-image.sh -b -c all-in-one-debug -d cmd/all-in-one -t debug
#do not run debug image build when it is pr-only
if ["$mode" != "pr-only"]; then
make build-all-in-one-debug GOOS=linux GOARCH=$GOARCH
repo=${repo}-debug
#build all-in-one-debug image locally for integration test
bash scripts/build-upload-a-docker-image.sh -l -b -c all-in-one-debug -d cmd/all-in-one -t debug
run_integration_test localhost:5000/$repo
#build all-in-one-debug image and upload to dockerhub/quay.io
bash scripts/build-upload-a-docker-image.sh -b -c all-in-one-debug -d cmd/all-in-one -t debug
fi
5 changes: 4 additions & 1 deletion scripts/build-upload-docker-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ fi
for component in agent collector query ingester remote-storage
do
bash scripts/build-upload-a-docker-image.sh -b -c "jaeger-${component}" -d "cmd/${component}" -p "${platforms}" -t release
bash scripts/build-upload-a-docker-image.sh -b -c "jaeger-${component}-debug" -d "cmd/${component}" -t debug
if ["$mode" != "pr-only"]; then
#do not run debug image build when it is pr-only
bash scripts/build-upload-a-docker-image.sh -b -c "jaeger-${component}-debug" -d "cmd/${component}" -t debug
fi
done

bash scripts/build-upload-a-docker-image.sh -b -c jaeger-es-index-cleaner -d cmd/es-index-cleaner -p "${platforms}" -t release
Expand Down