-
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
1 parent
e96a000
commit ce2f164
Showing
14 changed files
with
0 additions
and
305 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -8,7 +8,6 @@ on: | |
|
||
env: | ||
COMPOSE_URL_CS9: https://odcs.stream.centos.org/production/ | ||
COMPOSE_URL_CS10: https://odcs.stream.centos.org/stream-10/production/ | ||
|
||
jobs: | ||
check-compose: | ||
|
@@ -59,58 +58,12 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Check CentOS Stream 10 compose | ||
id: check_compose_id_cs10 | ||
run: | | ||
CURRENT_COMPOSE_CS10=$(curl -s "${COMPOSE_URL_CS10}/" | grep -ioE ">CentOS-Stream-10-.*/<" | tr -d '>/<' | tail -1) | ||
curl -s ${COMPOSE_URL_CS10}/${CURRENT_COMPOSE_CS10}/STATUS --output STATUS_CS10 | ||
STATUS_CS10=$(cat STATUS_CS10) | ||
if [[ "$STATUS_CS10" == "FINISHED" ]]; then | ||
COMPOSE_ID_CS10=$CURRENT_COMPOSE_CS10 | ||
TESTED_COMPOSE_CS10=( $( cat compose/compose.cs10 ) ) | ||
if [[ " ${TESTED_COMPOSE_CS10[*]} " =~ "$COMPOSE_ID_CS10" ]]; then | ||
COMPOSE_ID_CS10="false" | ||
fi | ||
else | ||
COMPOSE_ID_CS10="false" | ||
fi | ||
if [[ "$COMPOSE_ID_CS10" != "false" ]]; then | ||
gh pr list -R virt-s1/rhel-edge --state open --json title --jq '.[].title' > PR_LIST_CS10 | ||
PR_LIST_CS10=$(cat PR_LIST_CS10) | ||
if [[ $PR_LIST_CS10 == *"$COMPOSE_ID_CS10"* ]]; then | ||
echo "pr_running_cs10=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "pr_running_cs10=false" >> $GITHUB_OUTPUT | ||
fi | ||
OSBUILD_VERSION_CS10=$(curl -s "${COMPOSE_URL_CS10}/${COMPOSE_ID_CS10}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-[0-9].*<" | tr -d "><") | ||
OSBUILD_COMPOSER_VERSION_CS10=$(curl -s "${COMPOSE_URL_CS10}/${COMPOSE_ID_CS10}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-composer-[0-9].*<" | tr -d "><") | ||
COMPOSER_CLI_VERSION_CS10=$(curl -s "${COMPOSE_URL_CS10}/${COMPOSE_ID_CS10}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">weldr-client-[0-9].*<" | tr -d "><") | ||
echo "osbuild_version_cs10=$OSBUILD_VERSION_CS10" >> $GITHUB_OUTPUT | ||
echo "osbuild_composer_version_cs10=$OSBUILD_COMPOSER_VERSION_CS10" >> $GITHUB_OUTPUT | ||
echo "composer_cli_version_cs10=$COMPOSER_CLI_VERSION_CS10" >> $GITHUB_OUTPUT | ||
else | ||
echo "osbuild_version_cs10=Null" >> $GITHUB_OUTPUT | ||
echo "osbuild_composer_version_cs10=Null" >> $GITHUB_OUTPUT | ||
echo "composer_cli_version_cs10=Null" >> $GITHUB_OUTPUT | ||
fi | ||
echo "cs10_compose=$COMPOSE_ID_CS10" >> $GITHUB_OUTPUT | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
outputs: | ||
cs9_compose: ${{ steps.check_compose_id_cs9.outputs.cs9_compose }} | ||
osbuild_version_cs9: ${{ steps.check_compose_id_cs9.outputs.osbuild_version_cs9 }} | ||
osbuild_composer_version_cs9: ${{ steps.check_compose_id_cs9.outputs.osbuild_composer_version_cs9 }} | ||
composer_cli_version_cs9: ${{ steps.check_compose_id_cs9.outputs.composer_cli_version_cs9 }} | ||
pr_running_cs9: ${{ steps.check_compose_id_cs9.outputs.pr_running_cs9 }} | ||
cs10_compose: ${{ steps.check_compose_id_cs10.outputs.cs10_compose }} | ||
osbuild_version_cs10: ${{ steps.check_compose_id_cs10.outputs.osbuild_version_cs10 }} | ||
osbuild_composer_version_cs10: ${{ steps.check_compose_id_cs10.outputs.osbuild_composer_version_cs10 }} | ||
composer_cli_version_cs10: ${{ steps.check_compose_id_cs10.outputs.composer_cli_version_cs10 }} | ||
pr_running_cs10: ${{ steps.check_compose_id_cs10.outputs.pr_running_cs10 }} | ||
|
||
centos-stream-9: | ||
needs: check-compose | ||
|
@@ -166,56 +119,3 @@ jobs: | |
issue-number: ${{ steps.cpr.outputs.pull-request-number }} | ||
body: /test-cs9 | ||
|
||
centos-stream-10: | ||
needs: check-compose | ||
if: ${{ needs.check-compose.outputs.cs10_compose != 'false' && needs.check-compose.outputs.pr_running_cs10 == 'false' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Add new compose id in compose.cs10 | ||
run: | | ||
compose_id="${{ needs.check-compose.outputs.cs10_compose }}" | ||
echo $compose_id >> compose/compose.cs10 | ||
cat compose/compose.cs10 | ||
- 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.cs10_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.cs10_compose }} - ${{ steps.date.outputs.date }}" | ||
labels: auto-merge,CentOS-Stream-10 | ||
body: | | ||
CentOS Stream 10 compose ${{ needs.check-compose.outputs.cs10_compose }} | ||
- Date: ${{ steps.date.outputs.date }} | ||
- Compose URL: "${{ env.COMPOSE_URL_CS10 }}/${{ needs.check-compose.outputs.cs10_compose }}" | ||
- Packages: | ||
- ${{ needs.check-compose.outputs.osbuild_version_cs10 }} | ||
- ${{ needs.check-compose.outputs.osbuild_composer_version_cs10 }} | ||
- ${{ needs.check-compose.outputs.composer_cli_version_cs10 }} | ||
- 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-cs10 |
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.