Skip to content

Commit

Permalink
ci: moving fedora-rawhide workflow job to testing-farm
Browse files Browse the repository at this point in the history
  • Loading branch information
mcattamoredhat committed Jul 18, 2024
1 parent e96b113 commit a94c6ad
Show file tree
Hide file tree
Showing 13 changed files with 266 additions and 514 deletions.
431 changes: 40 additions & 391 deletions .github/workflows/fedora-rawhide.yml

Large diffs are not rendered by default.

224 changes: 112 additions & 112 deletions .github/workflows/trigger-fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,118 +15,118 @@ env:
UPDATES_URL_F39: https://dl.fedoraproject.org/pub/fedora/linux/updates/39

jobs:
#Disable Fedora Rawhide F41 jobs until osbuild-composer supports it
# check-compose:
# # Do not run this job on any fork repos
# if: github.repository == 'virt-s1/rhel-edge'
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
#
# - name: Check if fedora rawhide compose is new
# id: check_compose_id
# run: |
# curl -s "${COMPOSE_URL_rawhide}/COMPOSE_ID" --output COMPOSE_ID
# COMPOSE_ID=$(cat COMPOSE_ID)
# TESTED_COMPOSE=( $( cat compose/compose.fedora ) )
# if [[ " ${TESTED_COMPOSE[*]} " =~ "$COMPOSE_ID" ]]; then
# COMPOSE_ID="false"
# fi
#
# if [[ "$COMPOSE_ID" != "false" ]]; then
# gh pr list -R virt-s1/rhel-edge --state open --json title --jq '.[].title' > PR_LIST
# PR_LIST=$(cat PR_LIST)
# if [[ $PR_LIST == *"$COMPOSE_ID"* ]]; then
# echo "pr_running=true" >> $GITHUB_OUTPUT
# else
# echo "pr_running=false" >> $GITHUB_OUTPUT
# fi
#
# OSBUILD_VERSION=$(curl -s "${COMPOSE_URL_rawhide}/Everything/x86_64/os/Packages/o/" | grep -ioE ">osbuild-[0-9].*<" | tr -d "><")
# OSBUILD_COMPOSER_VERSION=$(curl -s "${COMPOSE_URL_rawhide}/Everything/x86_64/os/Packages/o/" | grep -ioE ">osbuild-composer-[0-9].*<" | tr -d "><")
# COMPOSER_CLI_VERSION=$(curl -s "${COMPOSE_URL_rawhide}/Everything/x86_64/os/Packages/w/" | grep -ioE ">weldr-client-[0-9].*<" | tr -d "><")
# echo "osbuild_version=$OSBUILD_VERSION" >> $GITHUB_OUTPUT
# echo "osbuild_composer_version=$OSBUILD_COMPOSER_VERSION" >> $GITHUB_OUTPUT
# echo "composer_cli_version=$COMPOSER_CLI_VERSION" >> $GITHUB_OUTPUT
#
# else
# echo "osbuild_version=Null" >> $GITHUB_OUTPUT
# echo "osbuild_composer_version=Null" >> $GITHUB_OUTPUT
# echo "composer_cli_version=Null" >> $GITHUB_OUTPUT
# fi
#
# echo "rawhide_compose=$COMPOSE_ID" >> $GITHUB_OUTPUT
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#
# outputs:
# rawhide_compose: ${{ steps.check_compose_id.outputs.rawhide_compose }}
# osbuild_version: ${{ steps.check_compose_id.outputs.osbuild_version }}
# osbuild_composer_version: ${{ steps.check_compose_id.outputs.osbuild_composer_version }}
# composer_cli_version: ${{ steps.check_compose_id.outputs.composer_cli_version }}
# pr_running: ${{ steps.check_compose_id.outputs.pr_running }}
#
# fedora-rawhide:
# needs: check-compose
# if: ${{ needs.check-compose.outputs.rawhide_compose != 'false' && needs.check-compose.outputs.pr_running == 'false' }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
#
# - name: Add new compose id in compose.fedora
# run: |
# compose_id="${{ needs.check-compose.outputs.rawhide_compose }}"
# echo $compose_id >> compose/compose.fedora
# cat compose/compose.fedora
#
# - name: Get current date
# id: date
# run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
#
# - name: Create Pull Request
# id: cpr
# uses: peter-evans/create-pull-request@v4
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# commit-message: "${{ needs.check-compose.outputs.rawhide_compose }} - ${{ steps.date.outputs.date }}"
# committer: cloudkitebot <[email protected]>
# author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
# branch: cpr
# branch-suffix: random
# delete-branch: true
# title: "${{ needs.check-compose.outputs.rawhide_compose }} - ${{ steps.date.outputs.date }}"
# labels: auto-merge,fedora-rawhide
# body: |
# Fedora rawhide compose ${{ needs.check-compose.outputs.rawhide_compose }}
# - Date: ${{ steps.date.outputs.date }}
# - Compose URL: ${{ env.COMPOSE_URL_rawhide }}
# - Packages:
# - ${{ needs.check-compose.outputs.osbuild_version }}
# - ${{ needs.check-compose.outputs.osbuild_composer_version }}
# - ${{ needs.check-compose.outputs.composer_cli_version }}
#
# - name: Enable Pull Request Automerge
# if: steps.cpr.outputs.pull-request-operation == 'created'
# uses: peter-evans/enable-pull-request-automerge@v2
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
# merge-method: rebase
#
# - name: Add a comment to trigger test workflow
# uses: peter-evans/create-or-update-comment@v2
# with:
# token: ${{ secrets.PAT }}
# issue-number: ${{ steps.cpr.outputs.pull-request-number }}
# body: /test-rawhide
#
# - name: Create a project card to track compose test result
# uses: peter-evans/create-or-update-project-card@v2
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# project-name: Fedora Compose Test
# column-name: Fedora-rawhide
# issue-number: ${{ steps.cpr.outputs.pull-request-number }}

check-compose:
# Do not run this job on any fork repos
if: github.repository == 'virt-s1/rhel-edge'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Check if fedora rawhide compose is new
id: check_compose_id
run: |
curl -s "${COMPOSE_URL_rawhide}/COMPOSE_ID" --output COMPOSE_ID
COMPOSE_ID=$(cat COMPOSE_ID)
TESTED_COMPOSE=( $( cat compose/compose.fedora ) )
if [[ " ${TESTED_COMPOSE[*]} " =~ "$COMPOSE_ID" ]]; then
COMPOSE_ID="false"
fi
if [[ "$COMPOSE_ID" != "false" ]]; then
gh pr list -R virt-s1/rhel-edge --state open --json title --jq '.[].title' > PR_LIST
PR_LIST=$(cat PR_LIST)
if [[ $PR_LIST == *"$COMPOSE_ID"* ]]; then
echo "pr_running=true" >> $GITHUB_OUTPUT
else
echo "pr_running=false" >> $GITHUB_OUTPUT
fi
OSBUILD_VERSION=$(curl -s "${COMPOSE_URL_rawhide}/Everything/x86_64/os/Packages/o/" | grep -ioE ">osbuild-[0-9].*<" | tr -d "><")
OSBUILD_COMPOSER_VERSION=$(curl -s "${COMPOSE_URL_rawhide}/Everything/x86_64/os/Packages/o/" | grep -ioE ">osbuild-composer-[0-9].*<" | tr -d "><")
COMPOSER_CLI_VERSION=$(curl -s "${COMPOSE_URL_rawhide}/Everything/x86_64/os/Packages/w/" | grep -ioE ">weldr-client-[0-9].*<" | tr -d "><")
echo "osbuild_version=$OSBUILD_VERSION" >> $GITHUB_OUTPUT
echo "osbuild_composer_version=$OSBUILD_COMPOSER_VERSION" >> $GITHUB_OUTPUT
echo "composer_cli_version=$COMPOSER_CLI_VERSION" >> $GITHUB_OUTPUT
else
echo "osbuild_version=Null" >> $GITHUB_OUTPUT
echo "osbuild_composer_version=Null" >> $GITHUB_OUTPUT
echo "composer_cli_version=Null" >> $GITHUB_OUTPUT
fi
echo "rawhide_compose=$COMPOSE_ID" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

outputs:
rawhide_compose: ${{ steps.check_compose_id.outputs.rawhide_compose }}
osbuild_version: ${{ steps.check_compose_id.outputs.osbuild_version }}
osbuild_composer_version: ${{ steps.check_compose_id.outputs.osbuild_composer_version }}
composer_cli_version: ${{ steps.check_compose_id.outputs.composer_cli_version }}
pr_running: ${{ steps.check_compose_id.outputs.pr_running }}

fedora-rawhide:
needs: check-compose
if: ${{ needs.check-compose.outputs.rawhide_compose != 'false' && needs.check-compose.outputs.pr_running == 'false' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Add new compose id in compose.fedora
run: |
compose_id="${{ needs.check-compose.outputs.rawhide_compose }}"
echo $compose_id >> compose/compose.fedora
cat compose/compose.fedora
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "${{ needs.check-compose.outputs.rawhide_compose }} - ${{ steps.date.outputs.date }}"
committer: cloudkitebot <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
branch: cpr
branch-suffix: random
delete-branch: true
title: "${{ needs.check-compose.outputs.rawhide_compose }} - ${{ steps.date.outputs.date }}"
labels: auto-merge,fedora-rawhide
body: |
Fedora rawhide compose ${{ needs.check-compose.outputs.rawhide_compose }}
- Date: ${{ steps.date.outputs.date }}
- Compose URL: ${{ env.COMPOSE_URL_rawhide }}
- Packages:
- ${{ needs.check-compose.outputs.osbuild_version }}
- ${{ needs.check-compose.outputs.osbuild_composer_version }}
- ${{ needs.check-compose.outputs.composer_cli_version }}
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: rebase

- name: Add a comment to trigger test workflow
uses: peter-evans/create-or-update-comment@v2
with:
token: ${{ secrets.PAT }}
issue-number: ${{ steps.cpr.outputs.pull-request-number }}
body: /test-rawhide

- name: Create a project card to track compose test result
uses: peter-evans/create-or-update-project-card@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
project-name: Fedora Compose Test
column-name: Fedora-rawhide
issue-number: ${{ steps.cpr.outputs.pull-request-number }}

fedora-40:
# Do not need check-compose and make "workflow_dispatch" work for this job
Expand Down
12 changes: 12 additions & 0 deletions arm-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,18 @@ case "$TEST_OS" in
BOOT_LOCATION="https://dl.fedoraproject.org/pub/fedora/linux/releases/40/Everything/aarch64/os/"
SYSROOT_RO="true"
;;
"fedora-41")
IMAGE_TYPE="iot-commit"
cp tools/user-data "$CLOUD_INIT_DIR"
OS_VARIANT="fedora-rawhide"
OSTREE_REF="fedora/41/${ARCH}/iot"
GUEST_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/aarch64/images"
GUEST_IMAGE_NAME=$(curl -s "${GUEST_IMAGE_URL}/" | grep -ioE ">Fedora-Cloud-Base-Generic\.aarch64.*.qcow2<" | tr -d '><')
USER_IN_COMMIT="false"
EMBEDDED_CONTAINER="false"
BOOT_LOCATION="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/aarch64/os/"
SYSROOT_RO="true"
;;
*)
echo "unsupported distro: ${ID}-${VERSION_ID}"
exit 1;;
Expand Down
11 changes: 11 additions & 0 deletions arm-ignition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,17 @@ case "$TEST_OS" in
ANSIBLE_OS_NAME="fedora-iot"
REF_PREFIX="fedora-iot"
;;
"fedora-41")
OS_VARIANT="fedora-unknown"
cp tools/user-data "$CLOUD_INIT_DIR"
OSTREE_REF="fedora/41/${ARCH}/iot"
CONTAINER_IMAGE_TYPE=iot-container
SIMPLIFIED_IMAGE_TYPE=iot-simplified-installer
GUEST_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/aarch64/images"
GUEST_IMAGE_NAME=$(curl -s "${GUEST_IMAGE_URL}/" | grep -ioE ">Fedora-Cloud-Base-Generic\.aarch64.*.qcow2<" | tr -d '><')
ANSIBLE_OS_NAME="fedora-iot"
REF_PREFIX="fedora-iot"
;;
*)
echo "unsupported distro: ${ID}-${VERSION_ID}"
exit 1;;
Expand Down
14 changes: 14 additions & 0 deletions arm-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,20 @@ case "$TEST_OS" in
ANSIBLE_OS_NAME="fedora"
SYSROOT_RO="true"
;;
"fedora-41")
OS_VARIANT="fedora-rawhide"
cp tools/user-data "$CLOUD_INIT_DIR"
OSTREE_REF="fedora/41/${ARCH}/iot"
CONTAINER_IMAGE_TYPE=iot-container
INSTALLER_IMAGE_TYPE=iot-installer
GUEST_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/aarch64/images"
GUEST_IMAGE_NAME=$(curl -s "${GUEST_IMAGE_URL}/" | grep -ioE ">Fedora-Cloud-Base-Generic\.aarch64.*.qcow2<" | tr -d '><')
EMBEDDED_CONTAINER="false"
CONTAINER_PUSHING_FEAT="false"
QUAY_REPO=""
ANSIBLE_OS_NAME="fedora"
SYSROOT_RO="true"
;;
*)
echo "unsupported distro: ${ID}-${VERSION_ID}"
exit 1;;
Expand Down
6 changes: 6 additions & 0 deletions arm-minimal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ case "$TEST_OS" in
GUEST_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/releases/40/Cloud/aarch64/images"
GUEST_IMAGE_NAME=$(curl -s "${GUEST_IMAGE_URL}/" | grep -ioE ">Fedora-Cloud-Base-Generic\.aarch64.*.qcow2<" | tr -d '><')
;;
"fedora-41")
OS_VARIANT="fedora-rawhide"
cp tools/user-data "$CLOUD_INIT_DIR"
GUEST_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/aarch64/images"
GUEST_IMAGE_NAME=$(curl -s "${GUEST_IMAGE_URL}/" | grep -ioE ">Fedora-Cloud-Base-Generic\.aarch64.*.qcow2<" | tr -d '><')
;;
*)
echo "unsupported distro: ${ID}-${VERSION_ID}"
exit 1;;
Expand Down
12 changes: 12 additions & 0 deletions arm-raw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,18 @@ case "$TEST_OS" in
REF_PREFIX="fedora-iot"
SYSROOT_RO="true"
;;
"fedora-41")
OS_VARIANT="fedora-rawhide"
cp tools/user-data "$CLOUD_INIT_DIR"
OSTREE_REF="fedora/41/${ARCH}/iot"
CONTAINER_IMAGE_TYPE=iot-container
RAW_IMAGE_TYPE=iot-raw-image
GUEST_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/aarch64/images"
GUEST_IMAGE_NAME=$(curl -s "${GUEST_IMAGE_URL}/" | grep -ioE ">Fedora-Cloud-Base-Generic\.aarch64.*.qcow2<" | tr -d '><')
ANSIBLE_OS_NAME="fedora-iot"
REF_PREFIX="fedora-iot"
SYSROOT_RO="true"
;;
*)
echo "unsupported distro: ${ID}-${VERSION_ID}"
exit 1;;
Expand Down
11 changes: 11 additions & 0 deletions arm-rebase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,17 @@ case "$TEST_OS" in
BOOT_LOCATION="https://dl.fedoraproject.org/pub/fedora/linux/releases/40/Everything/aarch64/os/"
SYSROOT_RO="true"
;;
"fedora-41")
IMAGE_TYPE="iot-commit"
cp tools/user-data "$CLOUD_INIT_DIR"
OS_VARIANT="fedora-rawhide"
OSTREE_REF="fedora/41/${ARCH}/iot"
OSTREE_REBASE_REF="fedora/xx/${ARCH}/iot"
GUEST_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/aarch64/images"
GUEST_IMAGE_NAME=$(curl -s "${GUEST_IMAGE_URL}/" | grep -ioE ">Fedora-Cloud-Base-Generic\.aarch64.*.qcow2<" | tr -d '><')
BOOT_LOCATION="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/aarch64/os/"
SYSROOT_RO="true"
;;
*)
echo "unsupported distro: ${ID}-${VERSION_ID}"
exit 1;;
Expand Down
12 changes: 12 additions & 0 deletions arm-simplified.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,18 @@ case "$TEST_OS" in
REF_PREFIX="fedora-iot"
SYSROOT_RO="true"
;;
"fedora-41")
OS_VARIANT="fedora-rawhide"
cp tools/user-data "$CLOUD_INIT_DIR"
OSTREE_REF="fedora/41/${ARCH}/iot"
CONTAINER_IMAGE_TYPE=iot-container
SIMPLIFIED_IMAGE_TYPE=iot-simplified-installer
GUEST_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/aarch64/images"
GUEST_IMAGE_NAME=$(curl -s "${GUEST_IMAGE_URL}/" | grep -ioE ">Fedora-Cloud-Base-Generic\.aarch64.*.qcow2<" | tr -d '><')
ANSIBLE_OS_NAME="fedora-iot"
REF_PREFIX="fedora-iot"
SYSROOT_RO="true"
;;
*)
echo "unsupported distro: ${ID}-${VERSION_ID}"
exit 1;;
Expand Down
5 changes: 5 additions & 0 deletions minimal-raw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ case "${ID}-${VERSION_ID}" in
MINIMAL_RAW_DECOMPRESSED=disk.raw
MINIMAL_RAW_FILENAME=disk.raw.xz
;;
"fedora-41")
OS_VARIANT="fedora-rawhide"
MINIMAL_RAW_DECOMPRESSED=disk.raw
MINIMAL_RAW_FILENAME=disk.raw.xz
;;
*)
echo "unsupported distro: ${ID}-${VERSION_ID}"
exit 1;;
Expand Down
9 changes: 9 additions & 0 deletions ostree-ng.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,15 @@ case "${ID}-${VERSION_ID}" in
CONTAINER_IMAGE_TYPE=fedora-iot-container
INSTALLER_IMAGE_TYPE=fedora-iot-installer
OSTREE_REF="fedora-iot/40/${ARCH}/iot"
OS_VARIANT="fedora-unknown"
ANSIBLE_OS_NAME="fedora-iot"
SYSROOT_RO="true"
DIRS_FILES_CUSTOMIZATION="true"
;;
"fedora-41")
CONTAINER_IMAGE_TYPE=fedora-iot-container
INSTALLER_IMAGE_TYPE=fedora-iot-installer
OSTREE_REF="fedora-iot/41/${ARCH}/iot"
OS_VARIANT="fedora-rawhide"
ANSIBLE_OS_NAME="fedora-iot"
SYSROOT_RO="true"
Expand Down
Loading

0 comments on commit a94c6ad

Please sign in to comment.