Skip to content

Commit

Permalink
Merge pull request #160 from crazy-max/docker-24.0_cherry-picks
Browse files Browse the repository at this point in the history
[docker/24.0 backport] cherry-picks
  • Loading branch information
crazy-max authored Aug 6, 2023
2 parents c26015b + aefeb36 commit bb13ceb
Show file tree
Hide file tree
Showing 60 changed files with 320 additions and 373 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,42 @@ jobs:
prepare:
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.pkgs.outputs.matrix }}
pkgs: ${{ steps.set.outputs.pkgs }}
fail-fast: ${{ steps.set.outputs.fail-fast }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Create matrix
id: pkgs
name: Set outputs
id: set
run: |
ghamatrix=$GHA_DEFAULT_MATRIX
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
ghamatrix=${{ inputs.pkgs }}
fi
pkgs=$(make gha-matrix GHA_MATRIX=$ghamatrix)
echo "matrix=$pkgs" >> $GITHUB_OUTPUT
echo "pkgs=$pkgs" >> $GITHUB_OUTPUT
if [ "${{ inputs.fail-fast }}" != "" ]; then
failfast=${{ inputs.fail-fast }}
else
failfast=true
fi
echo "fail-fast=$failfast" >> $GITHUB_OUTPUT
-
name: Show matrix
name: Show outputs
run: |
echo ${{ steps.pkgs.outputs.matrix }}
echo pkgs=${{ steps.set.outputs.pkgs }}
echo fail-fast=${{ steps.set.outputs.fail-fast }}
build:
runs-on: ubuntu-20.04
needs:
- prepare
strategy:
fail-fast: false
fail-fast: ${{ needs.prepare.outputs.fail-fast == 'true' }}
matrix:
pkg: ${{ fromJson(needs.prepare.outputs.matrix) }}
pkg: ${{ fromJson(needs.prepare.outputs.pkgs) }}
steps:
-
name: Checkout
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ jobs:
prepare:
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.pkgs.outputs.matrix }}
pkgs: ${{ steps.set.outputs.pkgs }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Create matrix
id: pkgs
name: Set outputs
id: set
run: |
pkgs=$(make gha-matrix GHA_MATRIX=all)
echo "matrix=$pkgs" >> $GITHUB_OUTPUT
echo "pkgs=$pkgs" >> $GITHUB_OUTPUT
-
name: Show matrix
name: Show outputs
run: |
echo ${{ steps.pkgs.outputs.matrix }}
echo pkgs=${{ steps.set.outputs.pkgs }}
build:
runs-on: ubuntu-20.04
Expand All @@ -45,7 +45,7 @@ jobs:
strategy:
fail-fast: true
matrix:
pkg: ${{ fromJson(needs.prepare.outputs.matrix) }}
pkg: ${{ fromJson(needs.prepare.outputs.pkgs) }}
steps:
-
name: Checkout
Expand Down Expand Up @@ -77,16 +77,16 @@ jobs:
- name: aws_graviton2
endpoint: tcp://${{ secrets.AWS_ARM64_HOST }}:1234
platforms: darwin/arm64,linux/arm64,linux/arm/v5,linux/arm/v6,linux/arm/v7,windows/arm64
- name: linuxone_s390x
endpoint: tcp://${{ secrets.LINUXONE_S390X_HOST }}:1234
platforms: linux/s390x
# - name: linuxone_s390x
# endpoint: tcp://${{ secrets.LINUXONE_S390X_HOST }}:1234
# platforms: linux/s390x
env:
BUILDER_NODE_1_AUTH_TLS_CACERT: ${{ secrets.AWS_ARM64_CACERT }}
BUILDER_NODE_1_AUTH_TLS_CERT: ${{ secrets.AWS_ARM64_CERT }}
BUILDER_NODE_1_AUTH_TLS_KEY: ${{ secrets.AWS_ARM64_KEY }}
BUILDER_NODE_2_AUTH_TLS_CACERT: ${{ secrets.LINUXONE_S390X_CACERT }}
BUILDER_NODE_2_AUTH_TLS_CERT: ${{ secrets.LINUXONE_S390X_CERT }}
BUILDER_NODE_2_AUTH_TLS_KEY: ${{ secrets.LINUXONE_S390X_KEY }}
# BUILDER_NODE_2_AUTH_TLS_CACERT: ${{ secrets.LINUXONE_S390X_CACERT }}
# BUILDER_NODE_2_AUTH_TLS_CERT: ${{ secrets.LINUXONE_S390X_CERT }}
# BUILDER_NODE_2_AUTH_TLS_KEY: ${{ secrets.LINUXONE_S390X_KEY }}
-
name: Build
run: |
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-buildx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
default: 'minimal'
required: false
type: string
fail-fast:
description: 'Fail fast'
default: true
required: false
type: boolean
push:
branches:
- 'main'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
default: 'minimal'
required: false
type: string
fail-fast:
description: 'Fail fast'
default: true
required: false
type: boolean
push:
branches:
- 'main'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-containerd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
default: 'minimal'
required: false
type: string
fail-fast:
description: 'Fail fast'
default: true
required: false
type: boolean
push:
branches:
- 'main'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-credential-helpers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
default: 'minimal'
required: false
type: string
fail-fast:
description: 'Fail fast'
default: true
required: false
type: boolean
push:
branches:
- 'main'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-docker-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
default: 'minimal'
required: false
type: string
fail-fast:
description: 'Fail fast'
default: true
required: false
type: boolean
push:
branches:
- 'main'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-docker-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
default: 'minimal'
required: false
type: string
fail-fast:
description: 'Fail fast'
default: true
required: false
type: boolean
push:
branches:
- 'main'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-sbom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
default: 'minimal'
required: false
type: string
fail-fast:
description: 'Fail fast'
default: true
required: false
type: boolean
push:
branches:
- 'main'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
default: 'minimal'
required: false
type: string
fail-fast:
description: 'Fail fast'
default: true
required: false
type: boolean
push:
branches:
- 'main'
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/manual-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: manual-build

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
workflow_dispatch:
inputs:
projects:
description: 'Projects to build (all or space separated list)'
default: 'all'
required: false
type: string
pkgs:
description: 'Packages to build (minimal, all or space separated list)'
default: 'minimal'
required: false
type: string
fail-fast:
description: 'Fail fast'
required: false
type: boolean

jobs:
prepare:
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.projects.outputs.matrix }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Create matrix
id: projects
run: |
if [ "${{ inputs.projects }}" = "all" ]; then
projects=$(find ./pkg -maxdepth 1 -type d -printf '%P ')
else
projects="${{ inputs.projects }}"
fi
projects=$(echo $projects | jq -cR 'split(" ")')
echo "matrix=$projects" >>${GITHUB_OUTPUT}
-
name: Show matrix
run: |
echo ${{ steps.projects.outputs.matrix }}
build:
uses: ./.github/workflows/.build.yml
needs:
- prepare
strategy:
fail-fast: false
matrix:
project: ${{ fromJson(needs.prepare.outputs.matrix) }}
with:
name: ${{ matrix.project }}
secrets: inherit
98 changes: 31 additions & 67 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,73 +12,37 @@ on:
- cron: '0 1 * * 0' # every sunday at 1am

jobs:
buildx:
uses: ./.github/workflows/.release.yml
with:
name: buildx
envs: |
NIGHTLY_BUILD=1
secrets: inherit

compose:
uses: ./.github/workflows/.release.yml
needs: buildx
with:
name: compose
envs: |
NIGHTLY_BUILD=1
secrets: inherit

containerd:
uses: ./.github/workflows/.release.yml
needs: compose
with:
name: containerd
envs: |
NIGHTLY_BUILD=1
secrets: inherit

credential-helpers:
uses: ./.github/workflows/.release.yml
needs: containerd
with:
name: credential-helpers
envs: |
NIGHTLY_BUILD=1
secrets: inherit

docker-cli:
uses: ./.github/workflows/.release.yml
needs: credential-helpers
with:
name: docker-cli
envs: |
NIGHTLY_BUILD=1
secrets: inherit

docker-engine:
uses: ./.github/workflows/.release.yml
needs: docker-cli
with:
name: docker-engine
envs: |
NIGHTLY_BUILD=1
secrets: inherit

sbom:
uses: ./.github/workflows/.release.yml
needs: docker-engine
with:
name: sbom
envs: |
NIGHTLY_BUILD=1
secrets: inherit

scan:
uses: ./.github/workflows/.release.yml
needs: sbom
with:
name: scan
prepare:
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.projects.outputs.matrix }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Create matrix
id: projects
run: |
projects=$(find ./pkg -maxdepth 1 -type d -printf '%P ')
projects=$(echo $projects | jq -cR 'split(" ")')
echo "matrix=$projects" >>${GITHUB_OUTPUT}
-
name: Show matrix
run: |
echo ${{ steps.projects.outputs.matrix }}
build:
uses: ./.github/workflows/.release.yml
needs:
- prepare
strategy:
fail-fast: false
max-parallel: 1
matrix:
project: ${{ fromJson(needs.prepare.outputs.matrix) }}
with:
name: ${{ matrix.project }}
envs: |
NIGHTLY_BUILD=1
secrets: inherit
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ include common/packages.mk

GHA_MATRIX ?= minimal
ifeq ($(GHA_MATRIX),minimal)
GHA_RELEASES := debian10 debian11 debian12 ubuntu1804 ubuntu2004 ubuntu2204 ubuntu2304 centos7 centos9 oraclelinux7 fedora37 static
GHA_RELEASES := debian10 debian11 debian12 ubuntu2004 ubuntu2204 ubuntu2304 centos7 centos9 oraclelinux7 fedora37 fedora38 static
else ifeq ($(GHA_MATRIX),all)
GHA_RELEASES := $(PKG_DEB_RELEASES) $(PKG_RPM_RELEASES) static
else
Expand Down
Loading

0 comments on commit bb13ceb

Please sign in to comment.