Skip to content

Commit

Permalink
Revert multi-arch support
Browse files Browse the repository at this point in the history
It's failing for a release and we don't have time to investigate it today.

This reverts commit e06ad66.
This reverts commit e1b97e6.
  • Loading branch information
ericwill committed Jan 20, 2021
1 parent e0bcefd commit 2b50055
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 101 deletions.
33 changes: 8 additions & 25 deletions .github/workflows/nightly-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone source code
uses: actions/checkout@v2
uses: actions/checkout@v1
with:
fetch-depth: 1

- name: Prepare
id: prep
run: |
SHORT_SHA1=$(git rev-parse --short HEAD)
echo ::set-output name=short_sha1::${SHORT_SHA1}
PLATFORMS=$(cat PLATFORMS)
echo ::set-output name=platforms::${PLATFORMS}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Login to quay.io
uses: docker/login-action@v1
with:
Expand All @@ -52,12 +37,10 @@ jobs:
run: /bin/bash arbitrary-users-patch/happy-path/build_happy_path_image.sh --push

- name: Build and push devfile image
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./build/dockerfiles/Dockerfile
target: registry
platforms: ${{ steps.prep.outputs.platforms }}
tags: quay.io/eclipse/che-devfile-registry:nightly,quay.io/eclipse/che-devfile-registry:${{ steps.prep.outputs.short_sha1 }}
push: true
run: |
SHORT_SHA1=$(git rev-parse --short HEAD)
docker build -t che-devfile-registry -f ./build/dockerfiles/Dockerfile --target registry .
docker tag che-devfile-registry quay.io/eclipse/che-devfile-registry:nightly
docker push quay.io/eclipse/che-devfile-registry:nightly
docker tag che-devfile-registry quay.io/eclipse/che-devfile-registry:${SHORT_SHA1}
docker push quay.io/eclipse/che-devfile-registry:${SHORT_SHA1}
74 changes: 31 additions & 43 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v1

- name: Shellcheck
run: |
Expand All @@ -28,9 +28,7 @@ jobs:
digest-validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/checkout@v1
- name: Run script which checks container image digest
run: |
sudo pip install yq
Expand All @@ -41,48 +39,38 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: 'Checkout Source Code'
uses: actions/checkout@v2

- name: Prepare
id: prep
run: |
PLATFORMS=$(cat PLATFORMS)
echo ::set-output name=platforms::${PLATFORMS}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- uses: actions/checkout@v1

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Cache docker layers
uses: actions/cache@v2
id: cache
uses: actions/cache@v1
with:
path: /tmp/.buildx-cache
key: v2-${{ github.head_ref }}

path: ./caches
key: v1-${{ github.head_ref }}

- name: Load docker layer cache
run: |
set +o pipefail
docker load -i ./caches/app.tar | true
- name: Build devfile registry
uses: docker/build-push-action@v2
with:
context: .
file: ./build/dockerfiles/Dockerfile
target: registry
platforms: ${{ steps.prep.outputs.platforms }}
tags: app
cache-from: "type=local,src=/tmp/.buildx-cache"
cache-to: "type=local,dest=/tmp/.buildx-cache"
push: false
run: |
docker build \
--cache-from=app \
-t app \
-f ./build/dockerfiles/Dockerfile \
--target registry .
- name: Cache docker layers
run: |
mkdir -p ./caches
docker save -o ./caches/app.tar app
- name: Build offline devfile registry
uses: docker/build-push-action@v2
with:
context: .
file: ./build/dockerfiles/Dockerfile
target: offline-registry
platforms: ${{ steps.prep.outputs.platforms }}
tags: app
cache-from: "type=local,src=/tmp/.buildx-cache"
push: false
run: |
docker build \
--cache-from=app \
-t app \
-f ./build/dockerfiles/Dockerfile \
--target offline-registry .

43 changes: 11 additions & 32 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone source code
uses: actions/checkout@v2
uses: actions/checkout@v1
with:
fetch-depth: 1
ref: release

- name: Prepare
id: prep
run: |
SHORT_SHA1=$(git rev-parse --short HEAD)
echo ::set-output name=short_sha1::${SHORT_SHA1}
VERSION=$(head -n 1 VERSION)
echo ::set-output name=version::${VERSION}
IMAGE=che-devfile-registry
echo ::set-output name=image::${IMAGE}
PLATFORMS=$(cat PLATFORMS)
echo ::set-output name=platforms::${PLATFORMS}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Login to Quay.io
uses: azure/docker-login@v1
with:
Expand All @@ -70,15 +51,13 @@ jobs:
/bin/bash arbitrary-users-patch/build_images.sh --push
- name: Build and push images
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./build/dockerfiles/Dockerfile
target: registry
build-args: |
PATCHED_IMAGES_TAG=${{ steps.prep.outputs.version }}
platforms: ${{ steps.prep.outputs.platforms }}
tags: quay.io/eclipse/${{ steps.prep.outputs.image }}:${{ steps.prep.outputs.version }},quay.io/eclipse/${{ steps.prep.outputs.image }}:${{ steps.prep.outputs.short_sha1 }}
push: true

run: |
SHORT_SHA1=$(git rev-parse --short HEAD)
VERSION=$(head -n 1 VERSION)
IMAGE=che-devfile-registry
DOCKERFILE_PATH=./build/dockerfiles/Dockerfile
docker build -t ${IMAGE} -f ${DOCKERFILE_PATH} --build-arg PATCHED_IMAGES_TAG=${VERSION} --target registry .
docker tag ${IMAGE} quay.io/eclipse/${IMAGE}:${SHORT_SHA1}
docker push quay.io/eclipse/${IMAGE}:${SHORT_SHA1}
docker tag ${IMAGE} quay.io/eclipse/${IMAGE}:${VERSION}
docker push quay.io/eclipse/${IMAGE}:${VERSION}
1 change: 0 additions & 1 deletion PLATFORMS

This file was deleted.

0 comments on commit 2b50055

Please sign in to comment.