Skip to content

Commit

Permalink
ci/cd: Fix arm builds
Browse files Browse the repository at this point in the history
Signed-off-by: Petu Eusebiu <[email protected]>
  • Loading branch information
eusebiu-constantin-petu-dbk committed May 25, 2022
1 parent dcdeb93 commit 5aa75f5
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 4 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ jobs:
matrix:
os: [linux, darwin]
arch: [amd64, arm64]
include:
- arch: arm64
base-image-name: arm64v8/alpine
- arch: amd64
base-image-name: alpine
steps:
- name: Check out the repo
uses: actions/checkout@v2
Expand All @@ -122,6 +127,7 @@ jobs:
OS=${{ matrix.os }}
ARCH=${{ matrix.arch }}
REPO_NAME=zot-${{ matrix.os }}-${{ matrix.arch }}
BASE_IMAGE_NAME=${{ matrix.base-image-name }}
url: docker://ghcr.io/${{ github.repository_owner }}
tags: ${{ github.event.release.tag_name }} latest
username: ${{ github.actor }}
Expand All @@ -130,6 +136,12 @@ jobs:
run: |
if [[ $OS == "linux" && $ARCH == "amd64" ]]; then
docker run -d ghcr.io/${{ github.repository_owner }}/zot-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}
curl --connect-timeout 5 \
--max-time 10 \
--retry 6 \
--retry-max-time 60 \
'http://localhost:5000/v2/'
docker kill $(docker ps -q)
fi
env:
OS: ${{ matrix.os }}
Expand All @@ -138,6 +150,12 @@ jobs:
run: |
if [[ $OS == "linux" && $ARCH == "amd64" ]]; then
podman run -d ghcr.io/${{ github.repository_owner }}/zot-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}
curl --connect-timeout 5 \
--max-time 10 \
--retry 6 \
--retry-max-time 60 \
'http://localhost:5000/v2/'
podman kill $(podman ps -q)
fi
env:
OS: ${{ matrix.os }}
Expand All @@ -152,6 +170,7 @@ jobs:
ARCH=${{ matrix.arch }}
EXT=-minimal
REPO_NAME=zot-minimal-${{ matrix.os }}-${{ matrix.arch }}
BASE_IMAGE_NAME=${{ matrix.base-image-name }}
url: docker://ghcr.io/${{ github.repository_owner }}
tags: ${{ github.event.release.tag_name }} latest
username: ${{ github.actor }}
Expand All @@ -160,6 +179,12 @@ jobs:
run: |
if [[ $OS == "linux" && $ARCH == "amd64" ]]; then
docker run -d ghcr.io/${{ github.repository_owner }}/zot-minimal-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}
curl --connect-timeout 5 \
--max-time 10 \
--retry 6 \
--retry-max-time 60 \
'http://localhost:5000/v2/'
docker kill $(docker ps -q)
fi
env:
OS: ${{ matrix.os }}
Expand All @@ -168,6 +193,12 @@ jobs:
run: |
if [[ $OS == "linux" && $ARCH == "amd64" ]]; then
podman run -d ghcr.io/${{ github.repository_owner }}/zot-minimal-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}
curl --connect-timeout 5 \
--max-time 10 \
--retry 6 \
--retry-max-time 60 \
'http://localhost:5000/v2/'
podman kill $(docker ps -q)
fi
env:
OS: ${{ matrix.os }}
Expand All @@ -181,6 +212,7 @@ jobs:
OS=${{ matrix.os }}
ARCH=${{ matrix.arch }}
REPO_NAME=zxp-${{ matrix.os }}-${{ matrix.arch }}
BASE_IMAGE_NAME=${{ matrix.base-image-name }}
url: docker://ghcr.io/${{ github.repository_owner }}
tags: ${{ github.event.release.tag_name }} latest
username: ${{ github.actor }}
Expand Down Expand Up @@ -210,6 +242,7 @@ jobs:
OS=${{ matrix.os }}
ARCH=${{ matrix.arch }}
REPO_NAME=zb-${{ matrix.os }}-${{ matrix.arch }}
BASE_IMAGE_NAME=${{ matrix.base-image-name }}
url: docker://ghcr.io/${{ github.repository_owner }}
tags: ${{ github.event.release.tag_name }} latest
username: ${{ github.actor }}
Expand Down
2 changes: 1 addition & 1 deletion stacker-conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ build:
"${{REPO_NAME:zot}}":
from:
type: docker
url: docker://alpine:3
url: docker://${{BASE_IMAGE_NAME:alpine}}:${{BASE_IMAGE_TAG:3}}
import:
- stacker://build/go/src/github.com/project-zot/zot/bin/zot-${{OS}}-${{ARCH}}
- stacker://build/go/src/github.com/project-zot/zot/config.json
Expand Down
2 changes: 1 addition & 1 deletion stacker-zb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ build:
"${{REPO_NAME:zb}}":
from:
type: docker
url: docker://alpine:3
url: docker://${{BASE_IMAGE_NAME:alpine}}:${{BASE_IMAGE_TAG:3}}
import:
- stacker://build/go/src/github.com/project-zot/zot/bin/zb-${{OS}}-${{ARCH}}
run: |
Expand Down
2 changes: 1 addition & 1 deletion stacker-zxp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ build:
"${{REPO_NAME:zxp}}":
from:
type: docker
url: docker://alpine:3
url: docker://${{BASE_IMAGE_NAME:alpine}}:${{BASE_IMAGE_TAG:3}}
import:
- stacker://build/go/src/github.com/project-zot/zot/bin/zxp-${{OS}}-${{ARCH}}
- stacker://build/go/src/github.com/project-zot/zot/config.json
Expand Down
2 changes: 1 addition & 1 deletion stacker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ build:
"${{REPO_NAME:zot}}":
from:
type: docker
url: docker://alpine:3
url: docker://${{BASE_IMAGE_NAME:alpine}}:${{BASE_IMAGE_TAG:3}}
import:
- stacker://build/go/src/github.com/project-zot/zot/bin/zot-${{OS}}-${{ARCH}}${{EXT:}}
- stacker://build/go/src/github.com/project-zot/zot/config.json
Expand Down

0 comments on commit 5aa75f5

Please sign in to comment.