Skip to content

Commit

Permalink
ci: disable rhel-9.0 workflow job
Browse files Browse the repository at this point in the history
  • Loading branch information
mcattamoredhat committed Jun 11, 2024
1 parent 5d6cfc2 commit 31f72f5
Showing 1 changed file with 0 additions and 108 deletions.
108 changes: 0 additions & 108 deletions .github/workflows/trigger-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
- cron: '0 20 * * *'

env:
COMPOSE_URL_90: "http://${{ secrets.DOWNLOAD_NODE }}/rhel-9/nightly/updates/RHEL-9"
COMPOSE_URL_92: "http://${{ secrets.DOWNLOAD_NODE }}/rhel-9/nightly/updates/RHEL-9"
COMPOSE_URL_93: "http://${{ secrets.DOWNLOAD_NODE }}/rhel-9/nightly/updates/RHEL-9"
COMPOSE_URL_94: "http://${{ secrets.DOWNLOAD_NODE }}/rhel-9/nightly/updates/RHEL-9"
Expand All @@ -27,47 +26,6 @@ jobs:

- run: sudo dnf install -y gh

- name: Check RHEL 9.0 compose
id: check_compose_id_90
run: |
curl -s ${COMPOSE_URL_90}/latest-RHEL-9.0.0/STATUS --output STATUS_90
STATUS_90=$(cat STATUS_90)
if [[ "$STATUS_90" == "FINISHED" ]]; then
curl -s ${COMPOSE_URL_90}/latest-RHEL-9.0.0/COMPOSE_ID --output COMPOSE_ID_90
COMPOSE_ID_90=$(cat COMPOSE_ID_90)
TESTED_COMPOSE_90=( $( cat compose/compose.90 ) )
if [[ " ${TESTED_COMPOSE_90[*]} " =~ "$COMPOSE_ID_90" ]]; then
COMPOSE_ID_90="false"
fi
else
COMPOSE_ID_90="false"
fi
if [[ "$COMPOSE_ID_90" != "false" ]]; then
gh pr list -R virt-s1/rhel-edge --state open --json title --jq '.[].title' > PR_LIST_90
PR_LIST_90=$(cat PR_LIST_90)
if [[ $PR_LIST_90 == *"$COMPOSE_ID_90"* ]]; then
echo "pr_running_90=true" >> $GITHUB_OUTPUT
else
echo "pr_running_90=false" >> $GITHUB_OUTPUT
fi
OSBUILD_VERSION_90=$(curl -s "${COMPOSE_URL_90}/${COMPOSE_ID_90}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-[0-9].*<" | tr -d "><")
OSBUILD_COMPOSER_VERSION_90=$(curl -s "${COMPOSE_URL_90}/${COMPOSE_ID_90}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-composer-[0-9].*<" | tr -d "><")
COMPOSER_CLI_VERSION_90=$(curl -s "${COMPOSE_URL_90}/${COMPOSE_ID_90}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">weldr-client-[0-9].*<" | tr -d "><")
echo "osbuild_version_90=$OSBUILD_VERSION_90" >> $GITHUB_OUTPUT
echo "osbuild_composer_version_90=$OSBUILD_COMPOSER_VERSION_90" >> $GITHUB_OUTPUT
echo "composer_cli_version_90=$COMPOSER_CLI_VERSION_90" >> $GITHUB_OUTPUT
else
echo "osbuild_version_90=Null" >> $GITHUB_OUTPUT
echo "osbuild_composer_version_90=Null" >> $GITHUB_OUTPUT
echo "composer_cli_version_90=Null" >> $GITHUB_OUTPUT
fi
echo "rhel90_compose=$COMPOSE_ID_90" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check RHEL 9.2 compose
id: check_compose_id_92
run: |
Expand Down Expand Up @@ -233,14 +191,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

outputs:
rhel90_compose: ${{ steps.check_compose_id_90.outputs.rhel90_compose }}
rhel92_compose: ${{ steps.check_compose_id_92.outputs.rhel92_compose }}
rhel93_compose: ${{ steps.check_compose_id_93.outputs.rhel93_compose }}
rhel94_compose: ${{ steps.check_compose_id_94.outputs.rhel94_compose }}
rhel95_compose: ${{ steps.check_compose_id_95.outputs.rhel95_compose }}
osbuild_version_90: ${{ steps.check_compose_id_90.outputs.osbuild_version_90 }}
osbuild_composer_version_90: ${{ steps.check_compose_id_90.outputs.osbuild_composer_version_90 }}
composer_cli_version_90: ${{ steps.check_compose_id_90.outputs.composer_cli_version_90 }}
osbuild_version_92: ${{ steps.check_compose_id_92.outputs.osbuild_version_92 }}
osbuild_composer_version_92: ${{ steps.check_compose_id_92.outputs.osbuild_composer_version_92 }}
composer_cli_version_92: ${{ steps.check_compose_id_92.outputs.composer_cli_version_92 }}
Expand All @@ -253,73 +207,11 @@ jobs:
osbuild_version_95: ${{ steps.check_compose_id_95.outputs.osbuild_version_95 }}
osbuild_composer_version_95: ${{ steps.check_compose_id_95.outputs.osbuild_composer_version_95 }}
composer_cli_version_95: ${{ steps.check_compose_id_95.outputs.composer_cli_version_95 }}
pr_running_90: ${{ steps.check_compose_id_90.outputs.pr_running_90 }}
pr_running_92: ${{ steps.check_compose_id_92.outputs.pr_running_92 }}
pr_running_93: ${{ steps.check_compose_id_93.outputs.pr_running_93 }}
pr_running_94: ${{ steps.check_compose_id_94.outputs.pr_running_94 }}
pr_running_95: ${{ steps.check_compose_id_95.outputs.pr_running_95 }}

rhel-9-0:
needs: check-compose
if: ${{ needs.check-compose.outputs.rhel90_compose != 'false' && needs.check-compose.outputs.pr_running_90 == 'false' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Add new compose id in compose.90
run: |
compose_id="${{ needs.check-compose.outputs.rhel90_compose }}"
echo $compose_id >> compose/compose.90
cat compose/compose.90
- 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.rhel90_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.rhel90_compose }} - ${{ steps.date.outputs.date }}"
labels: auto-merge,RHEL-9.0.0
body: |
RHEL 9.0 compose ${{ needs.check-compose.outputs.rhel90_compose }}
- Date: ${{ steps.date.outputs.date }}
- Packages:
- ${{ needs.check-compose.outputs.osbuild_version_90 }}
- ${{ needs.check-compose.outputs.osbuild_composer_version_90 }}
- ${{ needs.check-compose.outputs.composer_cli_version_90 }}
- 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-rhel-9-0

- 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: RHEL Compose Test
column-name: RHEL-9-0
issue-number: ${{ steps.cpr.outputs.pull-request-number }}

rhel-9-2:
needs: check-compose
if: ${{ needs.check-compose.outputs.rhel92_compose != 'false' && needs.check-compose.outputs.pr_running_92 == 'false' }}
Expand Down

0 comments on commit 31f72f5

Please sign in to comment.