Skip to content

Commit

Permalink
MDBF-778 Allow building buildbot workers without a galera included
Browse files Browse the repository at this point in the history
To solve chicken/egg problem of providing galera
workers to build the galera-4 package.

nogalera defined as string due to
actions/runner#1483.

It defaults to true, so the few build images that
don't set it (mainly about to be EOL distros), or new
distros that accidently omit it won't fail.
  • Loading branch information
grooverdan committed Aug 22, 2024
1 parent 7a24126 commit 6caf5c7
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/bbw_build_container_rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@ jobs:
- dockerfile: rhel7.Dockerfile pip.Dockerfile
image: rhel7
platforms: linux/amd64
nogalera: false
- dockerfile: rhel.Dockerfile
image: ubi8
tag: rhel8
platforms: linux/amd64, linux/arm64/v8, linux/ppc64le, linux/s390x
nogalera: false
- dockerfile: rhel.Dockerfile pip.Dockerfile
image: ubi9
tag: rhel9
platforms: linux/amd64, linux/arm64/v8, linux/ppc64le, linux/s390x
nogalera: false
env:
BUILD_RHEL: false
DEPLOY_IMAGES: false
Expand Down Expand Up @@ -73,6 +76,9 @@ jobs:
run: |
cd ${{ env.WORKDIR }}
cat ${{ matrix.dockerfile }} qpress.Dockerfile buildbot-worker.Dockerfile >$GITHUB_WORKSPACE/Dockerfile
if [ "${{ matrix.nogalera }}" == true ]; then
sed -i -e '/ci.mariadb.org\/galera/d' -e '/WSREP_PROVIDER/d' -e '/galera-4/d' $GITHUB_WORKSPACE/Dockerfile
fi
cp -r qpress $GITHUB_WORKSPACE
- name: Check Dockerfile with hadolint
run: |
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/bbw_build_container_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ on:
files:
required: false
type: string
nogalera:
required: false
type: string
default: 'true'

jobs:
build:
Expand Down Expand Up @@ -67,6 +71,9 @@ jobs:
cd ${{ env.WORKDIR }}
cat ${{ inputs.dockerfile }} qpress.Dockerfile buildbot-worker.Dockerfile >$GITHUB_WORKSPACE/Dockerfile
cp -r qpress $GITHUB_WORKSPACE
if [ "${{ inputs.nogalera }}" == true ]; then
sed -i -e '/ci.mariadb.org\/galera/d' -e '/galera-4/d' -e '/WSREP_PROVIDER/d' $GITHUB_WORKSPACE/Dockerfile
fi
- name: Copy files on runner
if: ${{ inputs.files }}
Expand All @@ -78,8 +85,7 @@ jobs:
done
- name: No wsrep on 32 bit platforms
if: >
(contains(inputs.platforms, 'linux/386'))
if: contains(inputs.platforms, 'linux/386')
run: |
sed -i -e '/WSREP_PROVIDER/d' $GITHUB_WORKSPACE/Dockerfile
- name: Check Dockerfile with hadolint
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-centos-based.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ jobs:
include:
- image: almalinux:8
platforms: linux/amd64, linux/arm64/v8
nogalera: false
- image: rockylinux:8
platforms: linux/amd64, linux/arm64/v8
nogalera: false

uses: ./.github/workflows/bbw_build_container_template.yml
with:
dockerfile: centos.Dockerfile
image: ${{ matrix.image }}
platforms: ${{ matrix.platforms }}
nogalera: ${{ matrix.nogalera }}
secrets: inherit
4 changes: 4 additions & 0 deletions .github/workflows/build-centos.pip-based.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ jobs:
include:
- image: almalinux:9
platforms: linux/amd64, linux/arm64/v8
nogalera: false

- image: rockylinux:9
platforms: linux/amd64, linux/arm64/v8
nogalera: false

- image: quay.io/centos/centos:stream9
platforms: linux/amd64, linux/arm64/v8, linux/ppc64le
tag: centosstream9
runner: ubuntu-24.04
nogalera: false

uses: ./.github/workflows/bbw_build_container_template.yml
with:
Expand All @@ -44,4 +47,5 @@ jobs:
platforms: ${{ matrix.platforms }}
runner: ${{ matrix.runner }}
tag: ${{ matrix.tag }}
nogalera: ${{ matrix.nogalera }}
secrets: inherit
11 changes: 11 additions & 0 deletions .github/workflows/build-debian-based.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,41 +27,51 @@ jobs:
- image: debian:11
platforms: linux/amd64, linux/arm64/v8, linux/ppc64le
branch: 10.11
nogalera: false

- image: debian:12
platforms: linux/amd64, linux/arm64/v8, linux/ppc64le
branch: 10.11
tag: debian12
nogalera: false

- image: debian:12
platforms: linux/386
branch: 10.11
tag: debian12-386
nogalera: false

- image: debian:sid
platforms: linux/amd64, linux/arm64/v8, linux/ppc64le
branch: 10.11
nogalera: false

- image: debian:sid
platforms: linux/386
branch: 10.11
tag: debiansid-386
nogalera: false

- image: ubuntu:20.04
platforms: linux/amd64, linux/arm64/v8, linux/ppc64le, linux/s390x
branch: 10.11
nogalera: false

- image: ubuntu:22.04
platforms: linux/amd64, linux/arm64/v8, linux/ppc64le, linux/s390x
branch: 10.11
nogalera: false

- image: ubuntu:23.10
platforms: linux/amd64, linux/arm64/v8
branch: 10.11
nogalera: false

- image: ubuntu:24.04
platforms: linux/amd64, linux/arm64/v8, linux/ppc64le, linux/s390x
branch: 10.11
nogalera: false


uses: ./.github/workflows/bbw_build_container_template.yml
with:
Expand All @@ -70,4 +80,5 @@ jobs:
platforms: ${{ matrix.platforms }}
tag: ${{ matrix.tag }}
branch: ${{ matrix.branch }}
nogalera: ${{ matrix.nogalera }}
secrets: inherit
3 changes: 3 additions & 0 deletions .github/workflows/build-debian.msan-based.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ jobs:
branch: 10.11
tag: debian11-msan
clang_version: 15
nogalera: false

- image: debian:11
platforms: linux/amd64
branch: 10.11
tag: debian11-msan-clang-16
clang_version: 16
nogalera: false

uses: ./.github/workflows/bbw_build_container_template.yml
with:
Expand All @@ -45,4 +47,5 @@ jobs:
tag: ${{ matrix.tag }}
branch: ${{ matrix.branch }}
clang_version: ${{ matrix.clang_version }}
nogalera: ${{ matrix.nogalera }}
secrets: inherit
5 changes: 5 additions & 0 deletions .github/workflows/build-fedora-based.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,21 @@ jobs:
include:
- image: fedora:38
platforms: linux/amd64, linux/arm64/v8
nogalera: false

- image: fedora:39
platforms: linux/amd64, linux/arm64/v8
nogalera: false

- image: fedora:40
platforms: linux/amd64, linux/arm64/v8
nogalera: false

- image: fedora:40
platforms: linux/amd64
tag: fedora40-valgrind
install_valgrind: "true"
nogalera: false

uses: ./.github/workflows/bbw_build_container_template.yml
with:
Expand All @@ -44,4 +48,5 @@ jobs:
platforms: ${{ matrix.platforms }}
tag: ${{ matrix.tag }}
install_valgrind: ${{ matrix.install_valgrind }}
nogalera: ${{ matrix.nogalera }}
secrets: inherit
3 changes: 3 additions & 0 deletions .github/workflows/build-opensuse.pip-based.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,15 @@ jobs:
- image: opensuse/leap:15.6
platforms: linux/amd64
tag: opensuse15
nogalera: false

uses: ./.github/workflows/bbw_build_container_template.yml
with:
dockerfile: opensuse.Dockerfile pip.Dockerfile
image: ${{ matrix.image }}
platforms: ${{ matrix.platforms }}
tag: ${{ matrix.tag }}
nogalera: ${{ matrix.nogalera }}
files:
'[
{"name": "mariadb_zypper_expect", "source": "''$WORKDIR/mariadb_zypper_expect''", "target": "''$GITHUB_WORKSPACE''"}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-sles.pip-based.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ jobs:
- image: registry.suse.com/bci/bci-base:15.6
platforms: linux/amd64, linux/s390x
tag: sles15
nogalera: false

uses: ./.github/workflows/bbw_build_container_template.yml
with:
dockerfile: sles.Dockerfile pip.Dockerfile
image: ${{ matrix.image }}
platforms: ${{ matrix.platforms }}
tag: ${{ matrix.tag }}
nogalera: ${{ matrix.nogalera }}
files:
'[
{"name": "mariadb_zypper_expect", "source": "''$WORKDIR/mariadb_zypper_expect''", "target": "''$GITHUB_WORKSPACE''"}
Expand Down

0 comments on commit 6caf5c7

Please sign in to comment.