Skip to content

Commit

Permalink
make it idempotent
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <[email protected]>
  • Loading branch information
pavolloffay committed Aug 17, 2021
1 parent fd6e177 commit 6ab36f3
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 14 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci-all-in-one-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ jobs:

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

- run: make prepare-docker-buildx

- name: Build, test, and publish all-in-one image
run: bash scripts/build-all-in-one-image.sh
env:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci-crossdock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ jobs:

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

- run: make prepare-docker-buildx

- name: Build, test, and publish ${{ matrix.steps.name }} image
run: ${{ matrix.steps.cmd }}
env:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ jobs:

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

- run: make prepare-docker-buildx

- name: Build and upload all docker images
run: bash scripts/build-upload-docker-images.sh
env:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci-hotrod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ jobs:

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

- run: make prepare-docker-buildx

- name: Build, test, and publish hotrod image
run: bash scripts/hotrod-integration-test.sh
env:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ jobs:

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

- run: make prepare-docker-buildx

- name: Build and upload all docker images
run: bash scripts/build-upload-docker-images.sh
env:
Expand Down
8 changes: 4 additions & 4 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ PLATFORMS := linux/amd64,linux/s390x,linux/ppc64le,linux/arm64

create-baseimg-debugimg: create-baseimg create-debugimg

create-baseimg:
create-baseimg: prepare-docker-buildx
docker buildx build -t $(BASE_IMAGE) --push \
--build-arg root_image=$(ROOT_IMAGE) \
--build-arg cert_image=$(CERT_IMAGE) \
--platform=$(PLATFORMS) \
docker/base

create-debugimg:
create-debugimg: prepare-docker-buildx
docker buildx build -t $(DEBUG_IMAGE) --push \
--build-arg golang_image=$(GOLANG_IMAGE) \
--platform=$(PLATFORMS) \
docker/debug

.PHONY: prepare-docker-buildx
prepare-docker-buildx:
docker buildx create --use --name=jaeger-build --buildkitd-flags="--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host" --driver-opt="network=host"
docker run --rm -d -p 5000:5000 --name registry registry:2
docker buildx inspect jaeger-build > /dev/null || docker buildx create --use --name=jaeger-build --buildkitd-flags="--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host" --driver-opt="network=host"
docker inspect registry > /dev/null || docker run --rm -d -p 5000:5000 --name registry registry:2

.PHONY: clean-docker-buildx
clean-docker-buildx:
Expand Down

0 comments on commit 6ab36f3

Please sign in to comment.