Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update quay organization for images and support multiplatform container base #472

Merged
merged 2 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
rpmbuild:
runs-on: ubuntu-latest
container:
image: quay.io/hirte/build-base:latest
image: quay.io/bluechi/build-base:latest
env:
ARTIFACTS_DIR: exported-artifacts
steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
name: Common
runs-on: ubuntu-latest
container:
image: quay.io/hirte/build-base:latest
image: quay.io/bluechi/build-base:latest

steps:
- name: Checkout sources
Expand All @@ -63,7 +63,7 @@ jobs:
name: C
runs-on: ubuntu-latest
container:
image: quay.io/hirte/build-base:latest
image: quay.io/bluechi/build-base:latest

steps:
- name: Checkout sources
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
name: Python
runs-on: ubuntu-latest
container:
image: quay.io/hirte/build-base:latest
image: quay.io/bluechi/build-base:latest

steps:
- name: Checkout sources
Expand All @@ -129,7 +129,7 @@ jobs:
name:
runs-on: ubuntu-latest
container:
image: quay.io/hirte/build-base:latest
image: quay.io/bluechi/build-base:latest

steps:
- name: Checkout sources
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: Publish bluechi on PyPi
runs-on: ubuntu-latest
container:
image: quay.io/hirte/build-base:latest
image: quay.io/bluechi/build-base:latest

steps:
- name: Checkout sources
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
test:
runs-on: ubuntu-latest
container:
image: quay.io/hirte/build-base:latest
image: quay.io/bluechi/build-base:latest

steps:
- name: Checkout sources
Expand Down
26 changes: 26 additions & 0 deletions build-scripts/build-containers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash -xe
# SPDX-License-Identifier: GPL-2.0-or-later

SCRIPT_DIR=$( realpath "$0" )
SCRIPT_DIR=$(dirname "$SCRIPT_DIR")/
CONTAINER_FILE_DIR=$SCRIPT_DIR"../tests/containers/"

PLATFORMS=linux/amd64,linux/arm64

function build_base(){
podman build --no-cache \
--platform ${PLATFORMS} \
-f ${CONTAINER_FILE_DIR}build-base \
--manifest quay.io/bluechi/build-base .
}

function integration_test_base(){
podman build --no-cache \
--platform ${PLATFORMS} \
-f ${CONTAINER_FILE_DIR}integration-test-base \
--manifest quay.io/bluechi/integration-test-base .
}

echo "Building containers and manifest for $1"
echo ""
$1
15 changes: 14 additions & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,17 @@ The `integration-test-base` file describes the builder base image that is publis

Both, `integration-test-local` as well as `integration-test-snapshot`, are based on the builder base image for the integration tests and contain compiled products and configurations for integration testing.

**_NOTE:_** Currently, the images are pushed manually to the quay.io container repository. If any updates are required, please reach out to the [code owners](../.github/CODEOWNERS).
### Updating container images in registry

Currently, the base images are pushed manually to the [bluechi on quay.io](https://quay.io/organization/bluechi) organization and its repositories. If any updates are required, please reach out to the [code owners](../.github/CODEOWNERS).

**Note to codeowners:**

The base images [build-base](./containers/build-base) and [integration-test-base](./containers/integration-test-base) can be built for multiple platforms (arm64 and amd64) using the [build-containers.sh](../build-scripts/build-containers.sh) script. It'll build images for the given platforms as well as a manifest with the same name, which can then be pushed to the registry. From the root directory of the project run the following commands:

```bash
# building and publishing build-base image
bash build-scripts/build-containers.sh build_base
podman login -u="someuser" -p="topsecret" quay.io
podman manifest push quay.io/bluechi/build-base:latest docker://quay.io/bluechi/build-base:latest
```
2 changes: 1 addition & 1 deletion tests/containers/build-base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/centos/centos:stream9
FROM --platform=$TARGETPLATFORM quay.io/centos/centos:stream9

# CRB is required for meson
# EPEL is required for lcov, python3-flake8, python3-html2text and codespell
Expand Down
2 changes: 1 addition & 1 deletion tests/containers/integration-test-base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/centos/centos:stream9
FROM --platform=$TARGETPLATFORM quay.io/centos/centos:stream9

RUN dnf upgrade --refresh -y --nodocs && \
dnf install --nodocs \
Expand Down
2 changes: 1 addition & 1 deletion tests/containers/integration-test-local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/hirte/integration-test-base:latest
FROM quay.io/bluechi/integration-test-base:latest

RUN mkdir -p /tmp/bluechi-rpms
COPY ./bluechi-rpms /tmp/bluechi-rpms
Expand Down
2 changes: 1 addition & 1 deletion tests/containers/integration-test-snapshot
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/hirte/integration-test-base:latest
FROM quay.io/bluechi/integration-test-base:latest

RUN dnf install -y --repo hirte-snapshot \
--repofrompath hirte-snapshot,https://download.copr.fedorainfracloud.org/results/mperina/hirte-snapshot/centos-stream-9-$(uname -m)/ \
Expand Down