Skip to content

Using Temurin builds of OpenJDK in GH actions #12

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
Sep 2, 2021
Merged

Conversation

carldea
Copy link
Contributor

@carldea carldea commented Aug 30, 2021

The AdoptOpenJDK has been discontinued Since July 2021. When using Zulu you get all the latest updated builds for all versions of OpenJDK. Also, I've added a matrix to later add JDK 17 (next LTS release). Gradle currently does not support JDK early access releases.

@cla-checker-service
Copy link

cla-checker-service bot commented Aug 30, 2021

💚 CLA has been signed

@carldea
Copy link
Contributor Author

carldea commented Aug 30, 2021

❌ Author of the following commits did not sign a Contributor Agreement:
847a5f6

Please, read and sign the above mentioned agreement if you want to contribute to this project

I just signed the contributor agreement through Elastic Search's Docusign PDF.

@swallez
Copy link
Member

swallez commented Aug 31, 2021

Thanks for the fix @carldea! AdoptOpenJDK has indeed been discontinued after its move to Eclipse Adoptium. The docs for actions/setup-java state that Adoptium is now available as temurin.

I'd rather stay with this distribution, so can you please update the PR to use temurin? Thanks!

@geertjanw
Copy link

Now that two OpenJDK distros are available, there's an opportunity to do CI/CD against multiple JDK versions and JDK vendors at the same time, concurrently, i.e., this doesn't add time to the CI/CD process since runners work concurrently.

It would be done like this, what do you think of that, @swallez?

name: Set up JDK ${{ matrix.versions }} with ${{ matrix.distros }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.versions }}
distribution: ${{ matrix.distros }}

@carldea
Copy link
Contributor Author

carldea commented Aug 31, 2021

Now that two OpenJDK distros are available, there's an opportunity to do CI/CD against multiple JDK versions and JDK vendors at the same time, concurrently, i.e., this doesn't add time to the CI/CD process since runners work concurrently.

It would be done like this, what do you think of that, @swallez?

name: Set up JDK ${{ matrix.versions }} with ${{ matrix.distros }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.versions }}
distribution: ${{ matrix.distros }}

@swallez I like this idea. What do you think?

Food for thought:
Since GH runners give you up to 4 to run concurrently it takes about the same time to run workflows for both distros. I believe letting customers know that your software runs on various distros will helps them ease their mind. Some shops only approve one distro in their infrastructure and destops.

@swallez
Copy link
Member

swallez commented Aug 31, 2021

Testing against several versions is indeed something we will need at some point, e.g. because we also want to have a transport based on Java 11 builtin http client at some point. However I don't think testing against several distributions of the same version of OpenJDK brings a lot of value.

Since we only have one transport for now and that the baseline is Java 8, let's stick to temurin for now and we'll revisit this later.

Signed-off-by: Carl Dea <carldea@gmail.com>
@carldea
Copy link
Contributor Author

carldea commented Aug 31, 2021

Testing against several versions is indeed something we will need at some point, e.g. because we also want to have a transport based on Java 11 builtin http client at some point. However I don't think testing against several distributions of the same version of OpenJDK brings a lot of value.

Since we only have one transport for now and that the baseline is Java 8, let's stick to temurin for now and we'll revisit this later.

@swallez
Completed the distro change. Have a great week!

@carldea carldea changed the title Using Zulu builds of OpenJDK in GH actions Using Temurin builds of OpenJDK in GH actions Aug 31, 2021
Copy link
Member

@swallez swallez left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for your contribution!

@swallez swallez merged commit e8e760b into elastic:main Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants