Skip to content
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

Add Amazon Corretto distribution #312

Merged
merged 10 commits into from Apr 29, 2022
Merged

Conversation

WtfJoke
Copy link
Contributor

@WtfJoke WtfJoke commented Apr 3, 2022

Description:
Add feature to allow setup-java to run with major versions of available amazon correttos binaries.
The available (major) versions are fetched from https://corretto.github.io/corretto-downloads/ (from the following json: https://corretto.github.io/corretto-downloads/latest_links/indexmap_with_checksum.json).

I've tested it also with a random java project here: Workflow-run
Related issue:
Fixes #68

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@WtfJoke WtfJoke changed the title Add corretto distribution Add amazon corretto distribution Apr 3, 2022
@WtfJoke WtfJoke changed the title Add amazon corretto distribution Add Amazon Corretto distribution Apr 3, 2022
@dmitry-shibanov
Copy link
Contributor

Hello @WtfJoke. Thank you for your pull request. I have some questions:

  • Do Amazon Corretto binaries have unstable versions ?
  • Do Amazon Corretto binaries have jre versions

@WtfJoke
Copy link
Contributor Author

WtfJoke commented Apr 3, 2022

Hi @dmitry-shibanov

I'll try to answer the questions :)

  • Do Amazon Corretto binaries have unstable versions ?

Not that I know of (at least the json, doesnt provide anything and I didnt found anything else documented).

  • Do Amazon Corretto binaries have jre versions

Not many, but they do (for example they provide jre 8 for windows)

Is there a particular reason for your question (in order for me to improve my pr in any way)?

@dmitry-shibanov
Copy link
Contributor

Hello @WtfJoke. Thank you for your responses. Could you please add support for jre versions ?

@WtfJoke
Copy link
Contributor Author

WtfJoke commented Apr 4, 2022

Hi @dmitry-shibanov

jre versions are already supported, see this test case for example:

[{ version: '18', architecture: 'x64', packageType: 'jre', checkLatest: false }, 'windows', 1]

Or did I missunderstand you?

@dmitry-shibanov
Copy link
Contributor

Thank you @WtfJoke. Could you please include this test case to e2e ?

@WtfJoke WtfJoke requested a review from a team April 4, 2022 16:03
@WtfJoke
Copy link
Contributor Author

WtfJoke commented Apr 4, 2022

Sure, I've included it in the e2e-versions workflow (they provide only jre releases currently for windows in version 8).

As a small bonus 🎈 I've also changed the version of job setup-java-custom-package-type to java version 17 (instead of 16), so temurin doesnt need to be excluded anymore as they provide JRE releases for LTS versions and we have some more tests 😄

@dmitry-shibanov
Copy link
Contributor

Thank you.

@btsteve
Copy link

btsteve commented Apr 4, 2022

Is there a way to test the unreleased version?

@WtfJoke
Copy link
Contributor Author

WtfJoke commented Apr 4, 2022

@btsteve
Yes there is, you can use my fork + branch in your worfklow like this (until it is merged):

jobs:  
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Install JDK 11
        uses: WtfJoke/setup-java@addCorretto
        with:
          distribution: corretto
          java-version: 11

Or here the full workflow yaml, I've tested with

@WtfJoke
Copy link
Contributor Author

WtfJoke commented Apr 9, 2022

Hey @dmitry-shibanov
Just rebased the commits to the latest main and resolved the conflicts.
As I know that you are probably busy, I've just wanted to ask gentle if there is some kind of ETA when you review/merge this PR?

Thanks a bunch!

@mu88
Copy link

mu88 commented Apr 20, 2022

@WtfJoke: can I also install Corretto on a Windows agent (runs-on: windows-latest)? If so, can I somehow already test your changes in one of my GitHub Actions? Or do I need to wait until it is released?

@WtfJoke
Copy link
Contributor Author

WtfJoke commented Apr 20, 2022

@WtfJoke: can I also install Corretto on a Windows agent (runs-on: windows-latest)? If so, can I somehow already test your changes in one of my GitHub Actions? Or do I need to wait until it is released?

@mu88 Yes, its also possible in windows.
You can already test it by using WtfJoke/setup-java@addCorretto instead of actions/setup-java@v3

See the example (there is also a full workflow yaml linked) in the comment above (you just can replace ubuntu with windows as you've already have written):

#312 (comment)

If you still need help, feel free to post your workflow.

@TomBeckett
Copy link

For what its worth I've been using @WtfJoke's fork for a while now and seems to be working great!

@dmitry-shibanov Is this good to merge? Is there anything in particular I should test?

@dmitry-shibanov
Copy link
Contributor

Hello @WtfJoke. Could you please sync with the main ? I've tested your changes and it works as expected.

@WtfJoke
Copy link
Contributor Author

WtfJoke commented Apr 27, 2022

Hi @dmitry-shibanov
I've rebased my branch with the latest main and fixed the conflicts. Great that you were able to test it.

Looking forward for the merge/release 😄 🚀

@aaiezza
Copy link

aaiezza commented Jul 4, 2022

Great work!

Does anyone have an example of how to use this now?

@spaletta
Copy link

spaletta commented Jul 4, 2022

@aaiezza See https://github.com/actions/setup-java#usage

@WtfJoke WtfJoke deleted the addCorretto branch July 5, 2022 19:51
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.

Add support for Amazon Corretto binaries
7 participants