Compare commits

..

5 Commits

Author SHA1 Message Date
CrazyMax
408f7d5030
Merge 356f5313f1 into 4b0752a2b1 2023-08-09 00:01:44 +01:00
CrazyMax
356f5313f1
e2e: test buildx and buildkit edge
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-06-09 13:38:11 +02:00
CrazyMax
311cfdadd6
e2e: test buildx and buildkit edge
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-06-09 13:21:19 +02:00
CrazyMax
9006f61740
e2e: test buildx and buildkit edge
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-06-09 13:20:19 +02:00
CrazyMax
767df53376
e2e: test buildx and buildkit edge
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-06-09 13:04:53 +02:00
2 changed files with 52 additions and 35 deletions

View File

@ -19,12 +19,11 @@ on:
slug: slug:
required: false required: false
type: string type: string
username_secret: secrets:
username:
required: false required: false
type: string password:
password_secret:
required: false required: false
type: string
env: env:
HARBOR_VERSION: v2.7.0 HARBOR_VERSION: v2.7.0
@ -37,13 +36,12 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
include: buildx_version:
- - latest
buildx_version: latest - https://github.com/docker/buildx.git#master
buildkit_image: moby/buildkit:buildx-stable-1 buildkit_image:
- - moby/buildkit:buildx-stable-1
buildx_version: https://github.com/docker/buildx.git#master - moby/buildkit:master
buildkit_image: moby/buildkit:master
steps: steps:
- -
name: Checkout name: Checkout
@ -80,11 +78,11 @@ jobs:
id: meta id: meta
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: ${{ env.REGISTRY_SLUG || inputs.slug }} images: ${{ inputs.slug }}
tags: | tags: |
type=ref,event=branch,enable=${{ matrix.buildx_version == 'latest' && matrix.buildkit_image == 'moby/buildkit:buildx-stable-1' }} type=ref,event=branch
type=ref,event=tag,enable=${{ matrix.buildx_version == 'latest' && matrix.buildkit_image == 'moby/buildkit:buildx-stable-1' }} type=ref,event=tag
type=raw,gh-runid-${{ github.run_id }} type=raw,value=${{ inputs.tag }},enable=${{ inputs.tag != '' }}
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v2
@ -92,20 +90,20 @@ jobs:
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with: with:
version: ${{ matrix.buildx_version }} version: ${{ inputs.buildx-version || matrix.buildx_version }}
config: /tmp/buildkitd.toml config: /tmp/buildkitd.toml
buildkitd-flags: --debug --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host buildkitd-flags: --debug --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
driver-opts: | driver-opts: |
image=${{ matrix.buildkit_image }} image=${{ inputs.buildkit-image || matrix.buildkit_image }}
network=host network=host
- -
name: Login to Registry name: Login to Registry
if: github.event_name != 'pull_request' && (env.REGISTRY_USER || inputs.username_secret) != '' if: github.event_name != 'pull_request' && secrets.username != ''
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
registry: ${{ env.REGISTRY_FQDN || inputs.registry }} registry: ${{ inputs.registry }}
username: ${{ env.REGISTRY_USER || secrets[inputs.username_secret] }} username: ${{ secrets.username }}
password: ${{ env.REGISTRY_PASSWORD || secrets[inputs.password_secret] }} password: ${{ secrets.password }}
- -
name: Build and push name: Build and push
uses: ./ uses: ./
@ -116,14 +114,14 @@ jobs:
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.REGISTRY_SLUG || inputs.slug }}:master cache-from: type=registry,ref=${{ inputs.slug }}:master
cache-to: type=inline cache-to: type=inline
- -
name: Inspect image name: Inspect image
run: | run: |
docker pull ${{ env.REGISTRY_SLUG || inputs.slug }}:${{ steps.meta.outputs.version }} docker pull ${{ inputs.slug }}:${{ steps.meta.outputs.version }}
docker image inspect ${{ env.REGISTRY_SLUG || inputs.slug }}:${{ steps.meta.outputs.version }} docker image inspect ${{ inputs.slug }}:${{ steps.meta.outputs.version }}
- -
name: Check manifest name: Check manifest
run: | run: |
docker buildx imagetools inspect ${{ env.REGISTRY_SLUG || inputs.slug }}:${{ steps.meta.outputs.version }} --format '{{json .}}' docker buildx imagetools inspect ${{ inputs.slug }}:${{ steps.meta.outputs.version }} --format '{{json .}}'

View File

@ -2,6 +2,18 @@ name: e2e
on: on:
workflow_dispatch: workflow_dispatch:
inputs:
buildx-version:
description: 'Buildx version or Git context'
default: 'latest'
required: false
buildkit-image:
description: 'BuildKit image'
default: 'moby/buildkit:buildx-stable-1'
required: false
tag:
description: 'Additional tag to push'
required: false
schedule: schedule:
- cron: '0 10 * * *' - cron: '0 10 * * *'
push: push:
@ -12,7 +24,7 @@ on:
jobs: jobs:
build: build:
uses: ./.github/workflows/.e2e-run.yml runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -99,12 +111,19 @@ jobs:
name: Nexus name: Nexus
id: nexus id: nexus
type: local type: local
with: steps:
id: ${{ matrix.id }} -
type: ${{ matrix.type }} name: Set up env
name: ${{ matrix.name }} if: matrix.type == 'local'
registry: ${{ matrix.registry }} run: |
slug: ${{ matrix.slug }} cat ./.github/e2e/${{ matrix.id }}/env >> $GITHUB_ENV
username_secret: ${{ matrix.username_secret }} -
password_secret: ${{ matrix.password_secret }} uses: ./.github/workflows/.e2e-run.yml
secrets: inherit with:
id: ${{ matrix.id }}
type: ${{ matrix.type }}
name: ${{ matrix.name }}
registry: ${{ env.REGISTRY_FQDN || matrix.registry }}
slug: ${{ env.REGISTRY_SLUG || matrix.slug }}
username: ${{ env.REGISTRY_USER || secrets[matrix.username_secret] }}
password: ${{ env.REGISTRY_PASSWORD || secrets[matrix.password_secret] }}