-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yi He
committed
Oct 17, 2024
1 parent
4906223
commit 8d8263c
Showing
35 changed files
with
15 additions
and
1,668 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,47 +24,6 @@ jobs: | |
|
||
- run: sudo dnf install -y gh | ||
|
||
- name: Check RHEL 8.8 compose | ||
id: check_compose_id_88 | ||
run: | | ||
curl -s ${COMPOSE_URL_88}/latest-RHEL-8.8.0/STATUS --output STATUS_88 | ||
STATUS_88=$(cat STATUS_88) | ||
if [[ "$STATUS_88" == "FINISHED" ]]; then | ||
curl -s ${COMPOSE_URL_88}/latest-RHEL-8.8.0/COMPOSE_ID --output COMPOSE_ID_88 | ||
COMPOSE_ID_88=$(cat COMPOSE_ID_88) | ||
TESTED_COMPOSE_88=( $( cat compose/compose.88 ) ) | ||
if [[ " ${TESTED_COMPOSE_88[*]} " =~ "$COMPOSE_ID_88" ]]; then | ||
COMPOSE_ID_88="false" | ||
fi | ||
else | ||
COMPOSE_ID_88="false" | ||
fi | ||
if [[ "$COMPOSE_ID_88" != "false" ]]; then | ||
gh pr list -R virt-s1/rhel-edge --state open --json title --jq '.[].title' > PR_LIST_88 | ||
PR_LIST_88=$(cat PR_LIST_88) | ||
if [[ $PR_LIST_88 == *"$COMPOSE_ID_88"* ]]; then | ||
echo "pr_running_88=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "pr_running_88=false" >> $GITHUB_OUTPUT | ||
fi | ||
OSBUILD_VERSION_88=$(curl -s "${COMPOSE_URL_88}/${COMPOSE_ID_88}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-[0-9].*<" | tr -d "><") | ||
OSBUILD_COMPOSER_VERSION_88=$(curl -s "${COMPOSE_URL_88}/${COMPOSE_ID_88}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-composer-[0-9].*<" | tr -d "><") | ||
COMPOSER_CLI_VERSION_88=$(curl -s "${COMPOSE_URL_88}/${COMPOSE_ID_88}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">weldr-client-[0-9].*<" | tr -d "><") | ||
echo "osbuild_version_88=$OSBUILD_VERSION_88" >> $GITHUB_OUTPUT | ||
echo "osbuild_composer_version_88=$OSBUILD_COMPOSER_VERSION_88" >> $GITHUB_OUTPUT | ||
echo "composer_cli_version_88=$COMPOSER_CLI_VERSION_88" >> $GITHUB_OUTPUT | ||
else | ||
echo "osbuild_version_88=Null" >> $GITHUB_OUTPUT | ||
echo "osbuild_composer_version_88=Null" >> $GITHUB_OUTPUT | ||
echo "composer_cli_version_88=Null" >> $GITHUB_OUTPUT | ||
fi | ||
echo "rhel88_compose=$COMPOSE_ID_88" >> $GITHUB_OUTPUT | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Check RHEL 8.10 compose | ||
id: check_compose_id_810 | ||
run: | | ||
|
@@ -107,78 +66,12 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
outputs: | ||
rhel88_compose: ${{ steps.check_compose_id_88.outputs.rhel88_compose }} | ||
rhel810_compose: ${{ steps.check_compose_id_810.outputs.rhel810_compose }} | ||
osbuild_version_88: ${{ steps.check_compose_id_88.outputs.osbuild_version_88 }} | ||
osbuild_composer_version_88: ${{ steps.check_compose_id_88.outputs.osbuild_composer_version_88 }} | ||
composer_cli_version_88: ${{ steps.check_compose_id_88.outputs.composer_cli_version_88 }} | ||
osbuild_version_810: ${{ steps.check_compose_id_810.outputs.osbuild_version_810 }} | ||
osbuild_composer_version_810: ${{ steps.check_compose_id_810.outputs.osbuild_composer_version_810 }} | ||
composer_cli_version_810: ${{ steps.check_compose_id_810.outputs.composer_cli_version_810 }} | ||
pr_running_88: ${{ steps.check_compose_id_88.outputs.pr_running_88 }} | ||
pr_running_810: ${{ steps.check_compose_id_810.outputs.pr_running_810 }} | ||
|
||
rhel-8-8: | ||
needs: check-compose | ||
if: ${{ needs.check-compose.outputs.rhel88_compose != 'false' && needs.check-compose.outputs.pr_running_88 == 'false' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Add new compose id in compose.88 | ||
run: | | ||
compose_id="${{ needs.check-compose.outputs.rhel88_compose }}" | ||
echo $compose_id >> compose/compose.88 | ||
cat compose/compose.88 | ||
- 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.rhel88_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.rhel88_compose }} - ${{ steps.date.outputs.date }}" | ||
labels: auto-merge,RHEL-8.8.0 | ||
body: | | ||
RHEL 8.8 compose ${{ needs.check-compose.outputs.rhel88_compose }} | ||
- Date: ${{ steps.date.outputs.date }} | ||
- Packages: | ||
- ${{ needs.check-compose.outputs.osbuild_version_88 }} | ||
- ${{ needs.check-compose.outputs.osbuild_composer_version_88 }} | ||
- ${{ needs.check-compose.outputs.composer_cli_version_88 }} | ||
- 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@v1 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
issue-number: ${{ steps.cpr.outputs.pull-request-number }} | ||
body: /test-rhel-8-8 | ||
|
||
- 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-8-8 | ||
issue-number: ${{ steps.cpr.outputs.pull-request-number }} | ||
|
||
rhel-8-10: | ||
needs: check-compose | ||
if: ${{ needs.check-compose.outputs.rhel810_compose != 'false' && needs.check-compose.outputs.pr_running_810 == 'false' }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ on: | |
- cron: '0 20 * * *' | ||
|
||
env: | ||
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" | ||
COMPOSE_URL_95: "http://${{ secrets.DOWNLOAD_NODE }}/rhel-9/nightly/RHEL-9" | ||
|
||
|
@@ -25,47 +24,6 @@ jobs: | |
|
||
- run: sudo dnf install -y gh | ||
|
||
- name: Check RHEL 9.3 compose | ||
id: check_compose_id_93 | ||
run: | | ||
curl -s ${COMPOSE_URL_93}/latest-RHEL-9.3.0/STATUS --output STATUS_93 | ||
STATUS_93=$(cat STATUS_93) | ||
if [[ "$STATUS_93" == "FINISHED" ]]; then | ||
curl -s ${COMPOSE_URL_93}/latest-RHEL-9.3.0/COMPOSE_ID --output COMPOSE_ID_93 | ||
COMPOSE_ID_93=$(cat COMPOSE_ID_93) | ||
TESTED_COMPOSE_93=( $( cat compose/compose.93 ) ) | ||
if [[ " ${TESTED_COMPOSE_93[*]} " =~ "$COMPOSE_ID_93" ]]; then | ||
COMPOSE_ID_93="false" | ||
fi | ||
else | ||
COMPOSE_ID_93="false" | ||
fi | ||
if [[ "$COMPOSE_ID_93" != "false" ]]; then | ||
gh pr list -R virt-s1/rhel-edge --state open --json title --jq '.[].title' > PR_LIST_93 | ||
PR_LIST_93=$(cat PR_LIST_93) | ||
if [[ $PR_LIST_93 == *"$COMPOSE_ID_93"* ]]; then | ||
echo "pr_running_93=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "pr_running_93=false" >> $GITHUB_OUTPUT | ||
fi | ||
OSBUILD_VERSION_93=$(curl -s "${COMPOSE_URL_93}/${COMPOSE_ID_93}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-[0-9].*<" | tr -d "><") | ||
OSBUILD_COMPOSER_VERSION_93=$(curl -s "${COMPOSE_URL_93}/${COMPOSE_ID_93}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-composer-[0-9].*<" | tr -d "><") | ||
COMPOSER_CLI_VERSION_93=$(curl -s "${COMPOSE_URL_93}/${COMPOSE_ID_93}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">weldr-client-[0-9].*<" | tr -d "><") | ||
echo "osbuild_version_93=$OSBUILD_VERSION_93" >> $GITHUB_OUTPUT | ||
echo "osbuild_composer_version_93=$OSBUILD_COMPOSER_VERSION_93" >> $GITHUB_OUTPUT | ||
echo "composer_cli_version_93=$COMPOSER_CLI_VERSION_93" >> $GITHUB_OUTPUT | ||
else | ||
echo "osbuild_version_93=Null" >> $GITHUB_OUTPUT | ||
echo "osbuild_composer_version_93=Null" >> $GITHUB_OUTPUT | ||
echo "composer_cli_version_93=Null" >> $GITHUB_OUTPUT | ||
fi | ||
echo "rhel93_compose=$COMPOSE_ID_93" >> $GITHUB_OUTPUT | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Check RHEL 9.4 compose | ||
id: check_compose_id_94 | ||
run: | | ||
|
@@ -149,83 +107,17 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
outputs: | ||
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_93: ${{ steps.check_compose_id_93.outputs.osbuild_version_93 }} | ||
osbuild_composer_version_93: ${{ steps.check_compose_id_93.outputs.osbuild_composer_version_93 }} | ||
composer_cli_version_93: ${{ steps.check_compose_id_93.outputs.composer_cli_version_93 }} | ||
osbuild_version_94: ${{ steps.check_compose_id_94.outputs.osbuild_version_94 }} | ||
osbuild_composer_version_94: ${{ steps.check_compose_id_94.outputs.osbuild_composer_version_94 }} | ||
composer_cli_version_94: ${{ steps.check_compose_id_94.outputs.composer_cli_version_94 }} | ||
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_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-3: | ||
needs: check-compose | ||
if: ${{ needs.check-compose.outputs.rhel93_compose != 'false' && needs.check-compose.outputs.pr_running_93 == 'false' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Add new compose id in compose.93 | ||
run: | | ||
compose_id="${{ needs.check-compose.outputs.rhel93_compose }}" | ||
echo $compose_id >> compose/compose.93 | ||
cat compose/compose.93 | ||
- 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.rhel93_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.rhel93_compose }} - ${{ steps.date.outputs.date }}" | ||
labels: auto-merge,RHEL-9.3.0 | ||
body: | | ||
RHEL 9.3 compose ${{ needs.check-compose.outputs.rhel93_compose }} | ||
- Date: ${{ steps.date.outputs.date }} | ||
- Packages: | ||
- ${{ needs.check-compose.outputs.osbuild_version_93 }} | ||
- ${{ needs.check-compose.outputs.osbuild_composer_version_93 }} | ||
- ${{ needs.check-compose.outputs.composer_cli_version_93 }} | ||
- 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@v1 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
issue-number: ${{ steps.cpr.outputs.pull-request-number }} | ||
body: /test-rhel-9-3 | ||
|
||
- 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-3 | ||
issue-number: ${{ steps.cpr.outputs.pull-request-number }} | ||
|
||
rhel-9-4: | ||
needs: check-compose | ||
if: ${{ needs.check-compose.outputs.rhel94_compose != 'false' && needs.check-compose.outputs.pr_running_94 == 'false' }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,10 +11,6 @@ env: | |
COMPOSE_URL_rawhide: https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide | ||
COMPOSE_URL_F41: https://dl.fedoraproject.org/pub/fedora/linux/development/41 | ||
UPDATES_URL_F41: https://dl.fedoraproject.org/pub/fedora/linux/development/41 | ||
COMPOSE_URL_F40: https://dl.fedoraproject.org/pub/fedora/linux/releases/40 | ||
UPDATES_URL_F40: https://dl.fedoraproject.org/pub/fedora/linux/updates/40 | ||
# COMPOSE_URL_F39: https://dl.fedoraproject.org/pub/fedora/linux/releases/39 | ||
# UPDATES_URL_F39: https://dl.fedoraproject.org/pub/fedora/linux/updates/39 | ||
|
||
jobs: | ||
|
||
|
@@ -199,73 +195,3 @@ jobs: | |
project-name: Fedora Compose Test | ||
column-name: Fedora-41 | ||
issue-number: ${{ steps.cpr.outputs.pull-request-number }} | ||
|
||
fedora-40: | ||
# Do not need check-compose and make "workflow_dispatch" work for this job | ||
if: github.repository == 'virt-s1/rhel-edge' && github.event.schedule != '0 4 * * *' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get package version | ||
id: package_version | ||
run: | | ||
curl -s "${COMPOSE_URL_F40}/COMPOSE_ID" --output COMPOSE_ID_F40 | ||
COMPOSE_ID_F40=$(cat COMPOSE_ID_F40) | ||
OSBUILD_VERSION_F40=$(curl -s "${UPDATES_URL_F40}/Everything/x86_64/Packages/o/" | grep -ioE ">osbuild-[0-9].*<" | tr -d "><") | ||
OSBUILD_COMPOSER_VERSION_F40=$(curl -s "${UPDATES_URL_F40}/Everything/x86_64/Packages/o/" | grep -ioE ">osbuild-composer-[0-9].*<" | tr -d "><") | ||
COMPOSER_CLI_VERSION_F40=$(curl -s "${COMPOSE_URL_F40}/Everything/x86_64/os/Packages/w/" | grep -ioE ">weldr-client-[0-9].*<" | tr -d "><") | ||
echo "osbuild_version_f40=$OSBUILD_VERSION_F40" >> $GITHUB_OUTPUT | ||
echo "osbuild_composer_version_f40=$OSBUILD_COMPOSER_VERSION_F40" >> $GITHUB_OUTPUT | ||
echo "composer_cli_version_f40=$COMPOSER_CLI_VERSION_F40" >> $GITHUB_OUTPUT | ||
echo "f40_compose=$COMPOSE_ID_F40" >> $GITHUB_OUTPUT | ||
- name: Add new compose id in compose.f40 | ||
run: | | ||
compose_id="${{ steps.package_version.outputs.f40_compose }}" | ||
echo $compose_id >> compose/compose.f40 | ||
cat compose/compose.f40 | ||
- 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: "Fedora 40 Daily Compose Test - ${{ 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: " Fedora 40 Daily Compose Test- ${{ steps.date.outputs.date }}" | ||
labels: DO_NOT_MERGE,fedora-40 | ||
body: | | ||
Fedora 40 compose ${{ steps.package_version.outputs.f40_compose }} | ||
- Date: ${{ steps.date.outputs.date }} | ||
- Compose URL: ${{ env.COMPOSE_URL_F40 }} | ||
- Updates URL: ${{ env.UPDATES_URL_F40 }} | ||
- Packages: | ||
- ${{ steps.package_version.outputs.osbuild_version_f40 }} | ||
- ${{ steps.package_version.outputs.osbuild_composer_version_f40 }} | ||
- ${{ steps.package_version.outputs.composer_cli_version_f40 }} | ||
- 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-f40 | ||
|
||
- 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-40 | ||
issue-number: ${{ steps.cpr.outputs.pull-request-number }} |
Oops, something went wrong.