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

@dmitry-shibanov dmitry-shibanov commented Apr 3, 2022

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 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

@dmitry-shibanov dmitry-shibanov commented Apr 4, 2022

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

@WtfJoke
Copy link
Contributor Author

@WtfJoke 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

@dmitry-shibanov dmitry-shibanov commented Apr 4, 2022

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

@WtfJoke WtfJoke requested a review from as a code owner Apr 4, 2022
@WtfJoke
Copy link
Contributor Author

@WtfJoke 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

@dmitry-shibanov dmitry-shibanov commented Apr 4, 2022

Thank you.

@btsteve
Copy link

@btsteve btsteve commented Apr 4, 2022

Is there a way to test the unreleased version?

@WtfJoke
Copy link
Contributor Author

@WtfJoke 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 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 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 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

@TomBeckett TomBeckett commented Apr 22, 2022

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

@dmitry-shibanov dmitry-shibanov commented Apr 26, 2022

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 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 😄 🚀

@dmitry-shibanov dmitry-shibanov merged commit bae3140 into actions:main Apr 29, 2022
169 checks passed
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.

5 participants