+
Skip to content

Nightly release PoC #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Keycloak Client Nightly Release

on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're using 21 for the other workflow, let's keep that aligned here, or downgrade the version 17 in both.

Suggested change
java-version: 17
java-version: 21

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're using Java 17 to release Keycloak, and the release of client libraries should be consistent with that

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then let's downgrade the CI workflow as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other workflow also checks for the latest Java version at all times, rather than using the cache always. To be consistent we can also add it here.

Suggested change
java-version: 17
java-version: 17
check-latest: true

Additionally, we might also want to cache the Maven artifacts to speed up this task, but I can understand that might potentially be undesirable for a release pipeline.

Suggested change
java-version: 17
java-version: 17
check-latest: true
cache: maven

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would probably work okay for nightly releases, but the cache configured this way uses a checksum of all pom files, which change for every release.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other workflow also checks for the latest Java version at all times, rather than using the cache always. To be consistent we can also add it here.

Not sure what the need of that even is, I think we're absolutely fine just using whatever is cached/available on runners, and this is just a way to slow things down without any added benefits

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then let's remove it in the main workflow as well

server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Deploy to Maven
env:
MAVEN_USERNAME: ${{ secrets.MVN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MVN_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
mvn -nsu -B -Pgpg,jboss-release -DskipTests -DretryFailedDeploymentCount=10 -DautoReleaseAfterClose=false deploy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we write out the CLI arguments rather than using the shorthand? It makes it clear what it does at a glance without needing to read the manual.

Suggested change
mvn -nsu -B -Pgpg,jboss-release -DskipTests -DretryFailedDeploymentCount=10 -DautoReleaseAfterClose=false deploy
mvn --no-snapshot-updates -B -Pgpg,jboss-release -DskipTests -DretryFailedDeploymentCount=10 -DautoReleaseAfterClose=false deploy

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use this option all over the place, so changing this would make it inconsistent with every other workflow we have.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing wrong with that, it's not like folks will look at these command line arguments side by side.

13 changes: 8 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
<jakarta.activation-api.version>2.1.2</jakarta.activation-api.version>

<jboss.repo.nexusUrl>https://s01.oss.sonatype.org/</jboss.repo.nexusUrl>
<jboss.releases.repo.id>jboss-releases-repository</jboss.releases.repo.id>
<jboss.releases.repo.id>ossrh</jboss.releases.repo.id>
<jboss.releases.repo.url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</jboss.releases.repo.url>
<jboss.snapshots.repo.id>jboss-snapshots-repository</jboss.snapshots.repo.id>
<jboss.snapshots.repo.id>ossrh</jboss.snapshots.repo.id>
<jboss.snapshots.repo.url>https://s01.oss.sonatype.org/content/repositories/snapshots/</jboss.snapshots.repo.url>

<project.build-time>${timestamp}</project.build-time>
Expand Down Expand Up @@ -101,22 +101,25 @@
</licenses>

<scm>
<connection>scm:git:git://github.com/keycloak/keycloak.git</connection>
<connection>scm:git:git://github.com/keycloak/keycloak-client.git</connection>
<developerConnection>scm:git:git@github.com:keycloak/keycloak-client-libs.git</developerConnection>
<url>https://github.com/keycloak/keycloak-client-libs/tree/master/</url>
</scm>

<distributionManagement>
<repository>
<id>${jboss.releases.repo.id}</id>
<name>JBoss Releases Repository</name>
<url>${jboss.releases.repo.url}</url>
</repository>
<snapshotRepository>
<id>${jboss.snapshots.repo.id}</id>
<url>${jboss.snapshots.repo.url}</url>
</snapshotRepository>
</distributionManagement>

<issueManagement>
<system>JIRA</system>
<url>https://github.com/keycloak/keycloak/issues</url>
<url>https://github.com/keycloak/keycloak-client/issues</url>
</issueManagement>

<developers>
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载