Skip to content

Commit

Permalink
Refactor: build linux artifacts only for PR
Browse files Browse the repository at this point in the history
Co-authored-by: Yuri Shkuro <[email protected]>
Signed-off-by: Eileen <[email protected]>
  • Loading branch information
Eileen-Yu and yurishkuro committed Mar 9, 2023
1 parent c33ae5c commit e6f11ce
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,16 @@ jobs:

- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18

- name: Build only linux/amd64 docker image for Pull Request
if: github.ref_name != 'main'
run: bash scripts/build-upload-docker-images.sh
env:
PLATFORMS: "linux/amd64"
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}

- name: Build and upload all docker images
if: github.ref_name == 'main'
run: bash scripts/build-upload-docker-images.sh
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
15 changes: 9 additions & 6 deletions scripts/build-upload-docker-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@

set -euxf -o pipefail

# build multi-arch docker images by default
platforms="${PLATFORMS:-linux/amd64,linux/s390x,linux/ppc64le,linux/arm64}"

make create-baseimg-debugimg

# build multi-arch binaries
make build-binaries-linux
make build-binaries-s390x
make build-binaries-ppc64le
make build-binaries-arm64

# build multi-arch docker images
platforms="linux/amd64,linux/s390x,linux/ppc64le,linux/arm64"
# build multi-arch binaries
if [ "$platforms" = "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" ]; then
make build-binaries-s390x
make build-binaries-ppc64le
make build-binaries-arm64
fi

# build/upload raw and debug images of Jaeger backend components
for component in agent collector query ingester remote-storage
Expand Down

0 comments on commit e6f11ce

Please sign in to comment.