From 7d89aaac8f72e94bb74e8192c3c425fb8ed9ce0f Mon Sep 17 00:00:00 2001 From: Krasimir Dermendzhiev Date: Tue, 26 Apr 2022 19:10:21 +0300 Subject: [PATCH] Fix buildx for multi-builder --- .github/workflows/build.yml | 2 ++ .github/workflows/pre-release.yml | 14 ++++++++------ .github/workflows/release.yml | 30 ++++++++++++++++-------------- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dbc060c56..f3aa29ee5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,8 @@ jobs: uses: docker/setup-buildx-action@v1 with: install: true + - name: Set Multi-Builder Docker Buildx + run: docker buildx create --use --name multi-builder --platform linux/arm64,linux/amd64 - name: Cache SonarCloud packages uses: actions/cache@v1 with: diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index fbeada337..1c8396f1e 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -47,6 +47,8 @@ jobs: uses: docker/setup-buildx-action@v1 with: install: true + - name: Set Multi-Builder Docker Buildx + run: docker buildx create --use --name multi-builder --platform linux/arm64,linux/amd64 - name: Maven Build run: mvn clean install - name: Docker Login @@ -75,11 +77,11 @@ jobs: - name: Push XSK for SAP Kyma Runtime run: | cd releng/sap-kyma-runtime - docker build -t dirigiblelabs/xsk-kyma-runtime-base -f Dockerfile-base . - docker build -t dirigiblelabs/xsk-kyma-runtime . - docker build -t dirigiblelabs/xsk-kyma-runtime-distro -f Dockerfile-distro . + docker build --load -t dirigiblelabs/xsk-kyma-runtime-base -f Dockerfile-base . docker push dirigiblelabs/xsk-kyma-runtime-base + docker build --load -t dirigiblelabs/xsk-kyma-runtime . docker push dirigiblelabs/xsk-kyma-runtime + docker build --load -t dirigiblelabs/xsk-kyma-runtime-distro -f Dockerfile-distro . docker push dirigiblelabs/xsk-kyma-runtime-distro cd ../../ - uses: buildpacks/github-actions/setup-pack@v4.1.0 @@ -128,11 +130,11 @@ jobs: - name: XSK Kyma Runtime Buildpack run: | cd releng/buildpacks/xsk-kyma-runtime/ - docker build -t dirigiblelabs/buildpacks-stack-base-xsk-kyma-runtime . --target base + docker build --load -t dirigiblelabs/buildpacks-stack-base-xsk-kyma-runtime . --target base docker push dirigiblelabs/buildpacks-stack-base-xsk-kyma-runtime - docker build -t dirigiblelabs/buildpacks-stack-run-xsk-kyma-runtime . --target run + docker build --load -t dirigiblelabs/buildpacks-stack-run-xsk-kyma-runtime . --target run docker push dirigiblelabs/buildpacks-stack-run-xsk-kyma-runtime - docker build -t dirigiblelabs/buildpacks-stack-build-xsk-kyma-runtime . --target build + docker build --load -t dirigiblelabs/buildpacks-stack-build-xsk-kyma-runtime . --target build docker push dirigiblelabs/buildpacks-stack-build-xsk-kyma-runtime cd buildpack/ find *.toml -type f -exec sed -i ''s/#{XSKVersion}#/latest/g'' {} \; diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae41d0f17..1599b1c36 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,6 +33,8 @@ jobs: uses: docker/setup-buildx-action@v1 with: install: true + - name: Set Multi-Builder Docker Buildx + run: docker buildx create --use --name multi-builder --platform linux/arm64,linux/amd64 - name: Maven Build run: mvn clean install - name: Docker Login @@ -61,11 +63,11 @@ jobs: - name: Push XSK for SAP Kyma Runtime run: | cd releng/sap-kyma-runtime - docker build -t dirigiblelabs/xsk-kyma-runtime-base -f Dockerfile-base . - docker build -t dirigiblelabs/xsk-kyma-runtime . - docker build -t dirigiblelabs/xsk-kyma-runtime-distro -f Dockerfile-distro . + docker build --load -t dirigiblelabs/xsk-kyma-runtime-base -f Dockerfile-base . docker push dirigiblelabs/xsk-kyma-runtime-base + docker build --load -t dirigiblelabs/xsk-kyma-runtime . docker push dirigiblelabs/xsk-kyma-runtime + docker build --load -t dirigiblelabs/xsk-kyma-runtime-distro -f Dockerfile-distro . docker push dirigiblelabs/xsk-kyma-runtime-distro cd ../../ - uses: buildpacks/github-actions/setup-pack@v4.1.0 @@ -113,19 +115,19 @@ jobs: cd ../../../../ - name: XSK Kyma Runtime Buildpack run: | - cd releng/buildpacks/xsk-kyma-runtime/ - docker build -t dirigiblelabs/buildpacks-stack-base-xsk-kyma-runtime . --target base - docker push dirigiblelabs/buildpacks-stack-base-xsk-kyma-runtime - docker build -t dirigiblelabs/buildpacks-stack-run-xsk-kyma-runtime . --target run - docker push dirigiblelabs/buildpacks-stack-run-xsk-kyma-runtime - docker build -t dirigiblelabs/buildpacks-stack-build-xsk-kyma-runtime . --target build - docker push dirigiblelabs/buildpacks-stack-build-xsk-kyma-runtime + cd releng/buildpacks/xsk-kyma/ + docker build --load -t dirigiblelabs/buildpacks-stack-base-xsk-kyma . --target base + docker push dirigiblelabs/buildpacks-stack-base-xsk-kyma + docker build --load -t dirigiblelabs/buildpacks-stack-run-xsk-kyma . --target run + docker push dirigiblelabs/buildpacks-stack-run-xsk-kyma + docker build --load -t dirigiblelabs/buildpacks-stack-build-xsk-kyma . --target build + docker push dirigiblelabs/buildpacks-stack-build-xsk-kyma cd buildpack/ find *.toml -type f -exec sed -i ''s/#{XSKVersion}#/latest/g'' {} \; - pack buildpack package dirigiblelabs/buildpacks-xsk-kyma-runtime --config ./package.toml - docker push dirigiblelabs/buildpacks-xsk-kyma-runtime - pack builder create dirigiblelabs/buildpacks-builder-xsk-kyma-runtime --config ./builder.toml - docker push dirigiblelabs/buildpacks-builder-xsk-kyma-runtime + pack buildpack package dirigiblelabs/buildpacks-xsk-kyma --config ./package.toml + docker push dirigiblelabs/buildpacks-xsk-kyma + pack builder create dirigiblelabs/buildpacks-builder-xsk-kyma --config ./builder.toml + docker push dirigiblelabs/buildpacks-builder-xsk-kyma cd ../../../../ - name: XSK Cloud Foundry Buildpack run: |