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

[CI:BUILD] Podman FCOS image from main #19477

Merged
merged 1 commit into from
Sep 1, 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
17 changes: 17 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@


# Execute the podman integration tests on all primary platforms and release
windows_smoke_test_task:

Check warning on line 575 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L575

task "Windows Smoke Test" depends on task "Build Each Commit", but their only_if conditions are different

Check warning on line 575 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L575

task "Windows Smoke Test" depends on task "Windows Cross", but their only_if conditions are different

Check warning on line 575 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L575

task "Windows Smoke Test" depends on task "Alt Arch. Cross", but their only_if conditions are different

Check warning on line 575 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L575

task "Windows Smoke Test" depends on task "Build Each Commit", but their only_if conditions are different

Check warning on line 575 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L575

task "Windows Smoke Test" depends on task "Windows Cross", but their only_if conditions are different

Check warning on line 575 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L575

task "Windows Smoke Test" depends on task "Alt Arch. Cross", but their only_if conditions are different
name: "Windows Smoke Test"
alias: windows_smoke_test
# Only run for non-docs/copr PRs and non-release branch builds
Expand Down Expand Up @@ -930,6 +930,22 @@
always: *logs_artifacts


#fcos_image_build_task:
# Only a test. Does not push built images.
# Image push to quay will be handled by GHA in
# .github/workflows/fcos-podman-next-build.yml
#name: "Test Build FCOS image $CTXDIR"
#alias: fcos_image_build
#only_if: $CIRRUS_PR != '' && $CIRRUS_BASE_BRANCH == 'main' && $CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*'
#env:
# <<: *stdenvars
# CTXDIR: contrib/podman-next/fcos-podmanimage
# TEST_FLAVOR: "fcos_image_build"
#gce_instance: *standardvm
#setup_script: *setup
#main_script: *main


# This task is critical. It updates the "last-used by" timestamp stored
# in metadata for all VM images. This mechanism functions in tandem with
# an out-of-band pruning operation to remove disused VM images.
Expand Down Expand Up @@ -965,7 +981,7 @@
# Status aggregator for all tests. This task simply ensures a defined
# set of tasks all passed, and allows confirming that based on the status
# of this task.
success_task:

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "bindings", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "swagger", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "docker-py_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "unit_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "apiv2_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "compose_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "local_integration_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "remote_integration_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "container_integration_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "rootless_integration_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "podman_machine", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "podman_machine_aarch64", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "local_system_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "local_system_test_aarch64", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "remote_system_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "remote_system_test_aarch64", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "rootless_system_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "rootless_remote_system_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "minikube_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "buildah_bud_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "rootless_buildah_bud_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "upgrade_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "Validate fedora-38 Build", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "Validate rawhide Build", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "Validate fedora-38-aarch64 Build", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "Build Each Commit", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "Windows Cross", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "Alt Arch. Cross", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "Verify Win Installer Build", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "OSX Cross", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "FreeBSD Cross", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "Windows Smoke Test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "bindings", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "swagger", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "docker-py_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "unit_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "apiv2_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "compose_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "local_integration_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "remote_integration_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "container_integration_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "rootless_integration_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "podman_machine", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "podman_machine_aarch64", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "local_system_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "local_system_test_aarch64", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "remote_system_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "remote_system_test_aarch64", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "rootless_system_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "rootless_remote_system_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "minikube_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "buildah_bud_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "rootless_buildah_bud_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "upgrade_test", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "Validate fedora-38 Build", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "Validate rawhide Build", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "Validate fedora-38-aarch64 Build", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "Build Each Commit", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "Windows Cross", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "Alt Arch. Cross", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "Verify Win Installer Build", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "OSX Cross", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "FreeBSD Cross", but their only_if conditions are different

Check warning on line 984 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L984

task "Total Success" depends on task "Windows Smoke Test", but their only_if conditions are different
name: "Total Success"
alias: success
# N/B: ALL tasks must be listed here, minus their '_task' suffix.
Expand Down Expand Up @@ -1001,6 +1017,7 @@
- buildah_bud_test
- rootless_buildah_bud_test
- upgrade_test
#- fcos_image_build
- meta
container: &smallcontainer
image: ${CTR_FQIN}
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/fcos-podman-next-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build FCOS image with packages from rhcontainerbot/podman-next

on:
push:
branches:
- main
lsm5 marked this conversation as resolved.
Show resolved Hide resolved

env:
IMAGE_NAME: fcos
IMAGE_TAGS: latest next podman-next ${{ github.sha }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: I don't really see a need for next or podman-next, since latest will be effectively the exact same thing.

Also Minor: Using a "naked" commit sha as a tag makes me slightly uncomfortable. It makes sense as an annotation or label for sure. But any lay-person looking at an image named "fcos" on quay, will likely have no clue what the sha belongs to. I'm not 100% on what the intended use of this image is, but I would think something like the full podman version would be more helpful.

Since you're setting an expiration of these tags, it's fine to fixup this stuff later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, now that I think of it, someone browsing: quay.io/podman/fcos and looking at the tag latest would assume it's stable, like for example: fedora:latest points to fedora's latest release. Maybe latest should be removed. If I gotta choose between next and podman-next, I'll choose podman-next.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya, `podman-next' is way more meaningful than 'latest'

IMAGE_REGISTRY: quay.io/podman
COPR_OWNER: rhcontainerbot
COPR_PROJECT: podman-next

jobs:
fcos-podman-next-image-build:
runs-on: ubuntu-latest

steps:
- name: Set up wait-for-copr
run: |
pip3 install git+https://github.com/packit/wait-for-copr.git@main

- name: Wait for successful podman-next build with the latest commit
run: |
# TODO: add this in the Containerfile itself or as a --build-arg
wait-for-copr --owner ${{ env.COPR_OWNER }} --project ${{ env.COPR_PROJECT }} podman $(git rev-parse --short ${{ github.sha }})
echo "podman-next build successful."

- name: Check out code
uses: actions/checkout@v3

- name: Build FCOS Image
id: build_image
# Ref: https://github.com/redhat-actions/buildah-build
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}
tags: ${{env.IMAGE_TAGS }}
containerfiles: |
./contrib/podman-next/fcos-podmanimage/Containerfile .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor-nit: There's no need to do the | line-wrapping thing for a single line.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's what the redhat-action doc used, so I used the same. I can remove it in followup


- name: Push to Quay
id: push-to-quay
# Ref: https://github.com/redhat-actions/push-to-registry
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ secrets.QUAY_PODMAN_USERNAME }}
password: ${{ secrets.QUAY_PODMAN_PASSWORD }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as a reminder: It would be really great to have some kind of notification if the job fails. Basically nobody pays any attention to the 'Actions' tab of the repo. and it seems important to know if the build fails for some reason.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remind me, do you know of a failure notification mechanism in GHA?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only way I know to do this is like https://github.com/containers/podman/blob/main/.github/workflows/discussion_lock.yml#L57-L68 but maybe there's a way to send an in-app notification? I never looked into it.

38 changes: 38 additions & 0 deletions .packit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash

# This script handles any custom processing of the spec file using the `fix-spec-file`
# action in .packit.yaml.

set -eox pipefail

PACKAGE=podman

# Set path to rpm spec file
SPEC_FILE=rpm/$PACKAGE.spec

# Get Version from HEAD
VERSION=$(grep '^const RawVersion' version/rawversion/version.go | cut -d\" -f2)

# RPM Version can't take "-"
RPM_VERSION=$(echo $VERSION | sed -e 's/-/~/')

# Generate source tarball from HEAD
git-archive-all -C $(git rev-parse --show-toplevel) --prefix=$PACKAGE-$VERSION/ rpm/$PACKAGE-$VERSION.tar.gz

# RPM Spec modifications

# Use the Version from HEAD in rpm spec
sed -i "s/^Version:.*/Version: $RPM_VERSION/" $SPEC_FILE

# Use Packit's supplied variable in the Release field in rpm spec.
sed -i "s/^Release:.*/Release: $PACKIT_RPMSPEC_RELEASE%{?dist}/" $SPEC_FILE

# Ensure last part of the release string is the git shortcommit without a
# prepended "g"
sed -i "/^Release: $PACKIT_RPMSPEC_RELEASE%{?dist}/ s/\(.*\)g/\1/" $SPEC_FILE

# Use above generated tarball as Source in rpm spec
sed -i "s/^Source0:.*.tar.gz/Source0: $PACKAGE-$VERSION.tar.gz/" $SPEC_FILE

# Update setup macro to use the correct build dir
sed -i "s/^%autosetup.*/%autosetup -Sgit -n %{name}-$VERSION/" $SPEC_FILE
5 changes: 5 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ specfile_path: rpm/podman.spec
upstream_tag_template: v{version}

srpm_build_deps:
- git-archive-all
- make

actions:
fix-spec-file:
- "bash .packit.sh"

jobs:
- job: copr_build
trigger: pull_request
Expand Down
7 changes: 7 additions & 0 deletions contrib/cirrus/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,13 @@ function _run_gitlab() {
return $ret
}

# TODO: enable fcos_image_build task in cirrus
#function _run_fcos_image_build() {
# # FIXME: Doesn't seem to grab CTXDIR from .cirrus.yml
# CTXDIR="contrib/podman-next/fcos-podmanimage"
# podman build -t quay.io/podman/fcos:podman-next $CTXDIR
#}

# Name pattern for logformatter output file, derived from environment
function output_name() {
# .cirrus.yml defines this as a short readable string for web UI
Expand Down
2 changes: 2 additions & 0 deletions contrib/cirrus/setup_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ case "$TEST_FLAVOR" in
swagger)
make .install.swagger
;;
#fcos_image_build)
# ;;
release) ;;
*) die_unknown TEST_FLAVOR
esac
Expand Down
19 changes: 19 additions & 0 deletions contrib/podman-next/fcos-podmanimage/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM quay.io/fedora/fedora-coreos:stable

# Setup the podman-next copr repo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello, we wanted to have a specific tag pushed on the registry (in addition to a rolling tag like latest, next, whatever but I don't see expiration using quay.expires-after LABEL being set ?

https://access.redhat.com/documentation/fr-fr/red_hat_quay/3/html/use_red_hat_quay/working_with_tags#setting_tag_expiration_from_a_dockerfile

images won't expire ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would the tag be? The short commit ID maybe?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, i'll add those too, thanks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I didn't know about the quay.expires-after mechanism, assumed you had to set that via their API. Neat! Should that be something like +6months or something else?

Copy link
Contributor

@benoitf benoitf Aug 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

short git id would be fine, about expiry time I have no strong opinion. but I'm not sure I will try to get development versions before a major release.
So if you release every 3 months then it might be the good window

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm setting expiry to 30d for now. Regarding tags, looks like those can be handled in the GHA file.

# The source file for the dnf repo may say `rawhide` but it's release
# agnostic and `rawhide` in the name is unlikely to change compared
# with URLs containing fedora release numbers.
ADD https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/fedora-rawhide/rhcontainerbot-podman-next-fedora-rawhide.repos /etc/yum.repos.d/rhcontainerbot-podman-next-fedora.repo
ADD https://download.copr.fedorainfracloud.org/results/rhcontainerbot/podman-next/pubkey.gpg /etc/pki/rpm-gpg/rhcontainerbot-podman-next-fedora.gpg

# Replace aardvark-dns, conmon, crun, netavark, podman, containers-common
# Remove moby-engine, containerd, runc
# Note: Currently does not result in a size reduction for the container image
RUN rpm-ostree override replace --experimental --freeze \
--from repo="copr:copr.fedorainfracloud.org:rhcontainerbot:podman-next" \
aardvark-dns crun netavark podman containers-common containers-common-extra && \
rpm-ostree override remove moby-engine containerd runc && \
ostree container commit

LABEL quay.expires-after=30d