From 0ada8475e317f0c542374991d3d8e053cb7d9d4e Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Thu, 21 May 2020 11:06:52 +0200 Subject: [PATCH 01/10] New buildx + matrix build --- .github/workflows/ci.yaml | 9 ++++++--- .github/workflows/pr.yaml | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cfd5725..6330e6d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,6 +15,9 @@ on: jobs: docker-build: runs-on: ubuntu-latest + strategy: + matrix: + platform: [linux/amd64, linux/s390x] env: IMAGE_FULL: quay.io/eclipse/che-workspace-loader:next CACHE_IMAGE_FULL: docker.io/cheincubator/che-workspace-loader:cache @@ -22,9 +25,9 @@ jobs: - uses: actions/checkout@v2 name: Checkout che-workspace-loader source code - name: Docker Buildx - uses: crazy-max/ghaction-docker-buildx@v1.4.0 + uses: crazy-max/ghaction-docker-buildx@v1.6.1 with: - version: v0.3.1 + buildx-version: v0.4.1 - name: "Docker prepare" run: docker image prune -a -f - name: "Docker Quay.io Login" @@ -32,6 +35,6 @@ jobs: - name: "Docker docker.io Login" run: docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" -p "${{ secrets.DOCKERHUB_PASSWORD }}" docker.io - name: "Docker build" - run: docker buildx build --platform linux/amd64,linux/s390x --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" --cache-to="type=registry,ref=${CACHE_IMAGE_FULL},mode=max" -t ${IMAGE_FULL} -f apache.Dockerfile --push . + run: docker buildx build --platform ${{ matrix.platform}} --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" --cache-to="type=registry,ref=${CACHE_IMAGE_FULL},mode=max" -t ${IMAGE_FULL} -f apache.Dockerfile --push . - name: "Docker Logout" run: docker logout diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 924faab..6313462 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -15,6 +15,9 @@ on: jobs: docker-build: runs-on: ubuntu-latest + strategy: + matrix: + platform: [linux/amd64, linux/s390x] env: IMAGE_FULL: quay.io/eclipse/che-workspace-loader:next CACHE_IMAGE_FULL: docker.io/cheincubator/che-workspace-loader:cache @@ -22,10 +25,10 @@ jobs: - uses: actions/checkout@v2 name: Checkout che-workspace-loader source code - name: Docker Buildx - uses: crazy-max/ghaction-docker-buildx@v1.4.0 + uses: crazy-max/ghaction-docker-buildx@v1.6.1 with: - version: v0.3.1 + buildx-version: v0.4.1 - name: "Docker prepare" run: docker image prune -a -f - name: "Docker build" - run: docker buildx build --platform linux/amd64,linux/s390x --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" -t ${IMAGE_FULL} -f apache.Dockerfile . + run: docker buildx build --platform ${{ matrix.platform}} -t ${IMAGE_FULL} -f apache.Dockerfile . \ No newline at end of file From 6ea22dd9770fd63065f77feb7f23bfaa71ef7e15 Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Thu, 21 May 2020 11:13:37 +0200 Subject: [PATCH 02/10] fixup! New buildx + matrix build Signed-off-by: Sergii Kabashniuk --- .github/workflows/ci.yaml | 1 + .github/workflows/pr.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6330e6d..de2bbef 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,6 +16,7 @@ jobs: docker-build: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: platform: [linux/amd64, linux/s390x] env: diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 6313462..49f93cc 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -16,6 +16,7 @@ jobs: docker-build: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: platform: [linux/amd64, linux/s390x] env: From 6bb51ceb0baf2d11b7b12b28be96b99d03c34e07 Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Thu, 21 May 2020 11:25:42 +0200 Subject: [PATCH 03/10] fixup! fixup! New buildx + matrix build Signed-off-by: Sergii Kabashniuk --- .github/workflows/pr.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 49f93cc..9aaf65e 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -19,6 +19,7 @@ jobs: fail-fast: false matrix: platform: [linux/amd64, linux/s390x] + layerscaching: [true, false] env: IMAGE_FULL: quay.io/eclipse/che-workspace-loader:next CACHE_IMAGE_FULL: docker.io/cheincubator/che-workspace-loader:cache @@ -31,5 +32,10 @@ jobs: buildx-version: v0.4.1 - name: "Docker prepare" run: docker image prune -a -f - - name: "Docker build" - run: docker buildx build --platform ${{ matrix.platform}} -t ${IMAGE_FULL} -f apache.Dockerfile . \ No newline at end of file + - name: "Docker build without cache" + if: ${{ matrix.layerscaching== 'false'}} + run: docker buildx build --platform ${{ matrix.platform}} -t ${IMAGE_FULL} -f apache.Dockerfile . + - name: "Docker build with cache" + if: ${{ matrix.layerscaching== 'true'}} + run: docker buildx build --platform ${{ matrix.platform}} --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" -t ${IMAGE_FULL} -f apache.Dockerfile . + \ No newline at end of file From cd26ffdee6260f8deedeba249011db91d4e6707e Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Thu, 21 May 2020 11:27:17 +0200 Subject: [PATCH 04/10] fixup! fixup! fixup! New buildx + matrix build Signed-off-by: Sergii Kabashniuk --- .github/workflows/pr.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 9aaf65e..2913779 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -33,9 +33,8 @@ jobs: - name: "Docker prepare" run: docker image prune -a -f - name: "Docker build without cache" - if: ${{ matrix.layerscaching== 'false'}} + if: ${{ matrix.layerscaching == 'false'}} run: docker buildx build --platform ${{ matrix.platform}} -t ${IMAGE_FULL} -f apache.Dockerfile . - name: "Docker build with cache" - if: ${{ matrix.layerscaching== 'true'}} + if: ${{ matrix.layerscaching == 'true'}} run: docker buildx build --platform ${{ matrix.platform}} --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" -t ${IMAGE_FULL} -f apache.Dockerfile . - \ No newline at end of file From 3862ecac062565263775f52d16c91654648b88a3 Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Thu, 21 May 2020 11:29:34 +0200 Subject: [PATCH 05/10] fixup! fixup! fixup! fixup! New buildx + matrix build Signed-off-by: Sergii Kabashniuk --- .github/workflows/pr.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 2913779..184bcae 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -30,11 +30,9 @@ jobs: uses: crazy-max/ghaction-docker-buildx@v1.6.1 with: buildx-version: v0.4.1 - - name: "Docker prepare" - run: docker image prune -a -f - name: "Docker build without cache" - if: ${{ matrix.layerscaching == 'false'}} + if: ${{ matrix.layerscaching == false}} run: docker buildx build --platform ${{ matrix.platform}} -t ${IMAGE_FULL} -f apache.Dockerfile . - name: "Docker build with cache" - if: ${{ matrix.layerscaching == 'true'}} + if: ${{ matrix.layerscaching == true}} run: docker buildx build --platform ${{ matrix.platform}} --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" -t ${IMAGE_FULL} -f apache.Dockerfile . From 72e5414c42b4a8a9a998bab24563b99e3b2501f9 Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Thu, 21 May 2020 11:44:41 +0200 Subject: [PATCH 06/10] fixup! fixup! fixup! fixup! fixup! New buildx + matrix build Signed-off-by: Sergii Kabashniuk --- .github/workflows/ci.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index de2bbef..df5492b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,8 +29,6 @@ jobs: uses: crazy-max/ghaction-docker-buildx@v1.6.1 with: buildx-version: v0.4.1 - - name: "Docker prepare" - run: docker image prune -a -f - name: "Docker Quay.io Login" run: docker login -u "${{ secrets.QUAY_USERNAME }}" -p "${{ secrets.QUAY_PASSWORD }}" quay.io - name: "Docker docker.io Login" From 88ae5ca5a008cb51a6f76f036aa9d1fd1420635d Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Thu, 21 May 2020 11:54:00 +0200 Subject: [PATCH 07/10] fixup! fixup! fixup! fixup! fixup! fixup! New buildx + matrix build Signed-off-by: Sergii Kabashniuk --- .github/workflows/ci.yaml | 2 ++ .github/workflows/pr.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index df5492b..de2bbef 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,6 +29,8 @@ jobs: uses: crazy-max/ghaction-docker-buildx@v1.6.1 with: buildx-version: v0.4.1 + - name: "Docker prepare" + run: docker image prune -a -f - name: "Docker Quay.io Login" run: docker login -u "${{ secrets.QUAY_USERNAME }}" -p "${{ secrets.QUAY_PASSWORD }}" quay.io - name: "Docker docker.io Login" diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 184bcae..8946a05 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -30,6 +30,8 @@ jobs: uses: crazy-max/ghaction-docker-buildx@v1.6.1 with: buildx-version: v0.4.1 + - name: "Docker prepare" + run: docker image prune -a -f - name: "Docker build without cache" if: ${{ matrix.layerscaching == false}} run: docker buildx build --platform ${{ matrix.platform}} -t ${IMAGE_FULL} -f apache.Dockerfile . From 0c399f5b90dbb008238941eea49eafe2c22d33fc Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Thu, 21 May 2020 13:10:15 +0200 Subject: [PATCH 08/10] fixup! fixup! fixup! fixup! fixup! fixup! fixup! New buildx + matrix build Signed-off-by: Sergii Kabashniuk --- .github/workflows/pr.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 8946a05..11caab0 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -34,7 +34,15 @@ jobs: run: docker image prune -a -f - name: "Docker build without cache" if: ${{ matrix.layerscaching == false}} - run: docker buildx build --platform ${{ matrix.platform}} -t ${IMAGE_FULL} -f apache.Dockerfile . + uses: nick-invision/retry@v1 + with: + timeout_minutes: 10 + max_attempts: 3 + command: docker buildx build --platform ${{ matrix.platform}} -t ${IMAGE_FULL} -f apache.Dockerfile . - name: "Docker build with cache" if: ${{ matrix.layerscaching == true}} - run: docker buildx build --platform ${{ matrix.platform}} --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" -t ${IMAGE_FULL} -f apache.Dockerfile . + uses: nick-invision/retry@v1 + with: + timeout_minutes: 10 + max_attempts: 3 + command: docker buildx build --platform ${{ matrix.platform}} --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" -t ${IMAGE_FULL} -f apache.Dockerfile . From 356c2ae2b7729d75bafaf42cba14737070694a6d Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Thu, 21 May 2020 13:44:25 +0200 Subject: [PATCH 09/10] fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! New buildx + matrix build Signed-off-by: Sergii Kabashniuk --- .github/workflows/pr.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 11caab0..dd866f1 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -37,12 +37,12 @@ jobs: uses: nick-invision/retry@v1 with: timeout_minutes: 10 - max_attempts: 3 + max_attempts: 5 command: docker buildx build --platform ${{ matrix.platform}} -t ${IMAGE_FULL} -f apache.Dockerfile . - name: "Docker build with cache" if: ${{ matrix.layerscaching == true}} uses: nick-invision/retry@v1 with: timeout_minutes: 10 - max_attempts: 3 + max_attempts: 5 command: docker buildx build --platform ${{ matrix.platform}} --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" -t ${IMAGE_FULL} -f apache.Dockerfile . From 39aa0b83f278027fc7777430094654afec77b9ba Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Thu, 21 May 2020 15:10:16 +0200 Subject: [PATCH 10/10] fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! New buildx + matrix build Signed-off-by: Sergii Kabashniuk --- .github/workflows/ci.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index de2bbef..99291b4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -35,7 +35,11 @@ jobs: run: docker login -u "${{ secrets.QUAY_USERNAME }}" -p "${{ secrets.QUAY_PASSWORD }}" quay.io - name: "Docker docker.io Login" run: docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" -p "${{ secrets.DOCKERHUB_PASSWORD }}" docker.io - - name: "Docker build" - run: docker buildx build --platform ${{ matrix.platform}} --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" --cache-to="type=registry,ref=${CACHE_IMAGE_FULL},mode=max" -t ${IMAGE_FULL} -f apache.Dockerfile --push . + - name: "Docker build with cache" + uses: nick-invision/retry@v1 + with: + timeout_minutes: 20 + max_attempts: 5 + command: docker buildx build --platform ${{ matrix.platform}} --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" --cache-to="type=registry,ref=${CACHE_IMAGE_FULL},mode=max" -t ${IMAGE_FULL} -f apache.Dockerfile --push . - name: "Docker Logout" run: docker logout