forked from keycloak/keycloak
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testing Keycloak with nightly Quarkus releases (keycloak#23407)
Closes keycloak#23322 Signed-off-by: Peter Zaoral <[email protected]>
- Loading branch information
Showing
7 changed files
with
108 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
set -xeuo pipefail | ||
|
||
git checkout -b new-quarkus-next origin/main | ||
|
||
if ! grep -q '<repositories>' pom.xml; then | ||
sed -i '/<\/project>/i \ | ||
<repositories> \ | ||
</repositories>' pom.xml | ||
fi | ||
|
||
# Insert the <repository> element before the closing </repositories> tag | ||
sed -i '/<\/repositories>/i \ | ||
<repository> \ | ||
<id>sonatype-snapshots</id> \ | ||
<name>Sonatype Snapshots</name> \ | ||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url> \ | ||
<snapshots> \ | ||
<enabled>true</enabled> \ | ||
<updatePolicy>daily</updatePolicy> \ | ||
</snapshots> \ | ||
<releases> \ | ||
<enabled>false</enabled> \ | ||
</releases> \ | ||
</repository>' pom.xml | ||
|
||
./mvnw -B versions:set-property -Dproperty=quarkus.version -DnewVersion=999-SNAPSHOT | ||
./mvnw -B versions:set-property -Dproperty=quarkus.build.version -DnewVersion=999-SNAPSHOT | ||
git commit -am "Set quarkus version to 999-SNAPSHOT" | ||
|
||
snapshot_version_hash=$(git log origin/quarkus-next --grep="Set quarkus version to 999-SNAPSHOT" --format="%H" -n 1) | ||
commits_to_cherry_pick=$(git rev-list --right-only --no-merges --reverse new-quarkus-next...origin/quarkus-next | grep -vE "$snapshot_version_hash" || echo "") | ||
|
||
if [ -z "$commits_to_cherry_pick" ]; then | ||
echo "Nothing to cherry-pick." | ||
else | ||
for commit in $commits_to_cherry_pick | ||
do | ||
if git cherry-pick "$commit"; then | ||
echo "Successfully cherry-picked $commit" | ||
else | ||
echo "Failed to cherry-pick $commit" | ||
exit 1 | ||
fi | ||
done | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ on: | |
branches-ignore: | ||
- main | ||
- dependabot/** | ||
- quarkus-next | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
|
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ on: | |
branches-ignore: | ||
- main | ||
- dependabot/** | ||
- quarkus-next | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
|
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ on: | |
branches-ignore: | ||
- main | ||
- dependabot/** | ||
- quarkus-next | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Quarkus Next | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
concurrency: | ||
# Only cancel jobs for PR updates | ||
group: quarkus-next-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
update-quarkus-next-branch: | ||
name: Update quarkus-next branch | ||
if: github.event_name != 'schedule' || github.repository == 'keycloak/keycloak' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "github-actions[bot]" | ||
- name: Cherry-pick additional commits in quarkus-next | ||
run: | | ||
${GITHUB_WORKSPACE}/.github/scripts/prepare-quarkus-next.sh | ||
- name: Push changes | ||
run: | | ||
git push -f origin HEAD:quarkus-next | ||
run-matrix-with-quarkus-next: | ||
name: Run workflow matrix with the quarkus-next branch | ||
runs-on: ubuntu-latest | ||
needs: | ||
- update-quarkus-next-branch | ||
|
||
strategy: | ||
matrix: | ||
workflow: | ||
- ci.yml | ||
- operator-ci.yml | ||
|
||
steps: | ||
- name: Run workflow with the nightly Quarkus release | ||
run: gh workflow run -R ${{ github.repository }} ${{ matrix.workflow }} -r quarkus-next | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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