-
Notifications
You must be signed in to change notification settings - Fork 766
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 microsoft distribution of the JDK. #252
Conversation
This was based off of #225 thanks for making it easy! |
cc @brunoborges |
README.md
Outdated
@@ -58,6 +58,7 @@ Currently, the following distributions are supported: | |||
| `zulu` | Zulu OpenJDK | [Link](https://www.azul.com/downloads/zulu-community/?package=jdk) | [Link](https://www.azul.com/products/zulu-and-zulu-enterprise/zulu-terms-of-use/) | | |||
| `adopt` or `adopt-hotspot` | Adopt OpenJDK Hotspot | [Link](https://adoptopenjdk.net/) | [Link](https://adoptopenjdk.net/about.html) | | |||
| `adopt-openj9` | Adopt OpenJDK OpenJ9 | [Link](https://adoptopenjdk.net/) | [Link](https://adoptopenjdk.net/about.html) | |||
| `microsoft` | Microsoft OpenJDK | [Link](https://www.microsoft.com/openjdk) | [Link](https://docs.microsoft.com/en-us/java/openjdk/faq) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @brendanburns! One quick suggestion here on the name: Microsoft Build of OpenJDK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@ethomson this is a great PR. |
Thanks @brendandburns! We'll take a look. 👀 |
Comment addressed and I fixed formatting to follow prettier style guidelines. |
Hold on this for a second, I realized that the Windows URLs aren't right, I need to substitute ".zip" for "tar.gz" I will get to that sometime today. |
Ok, this is now fixed and I believe should be ready for final review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gh pr checkout 252
README.md
Outdated
@@ -58,7 +58,7 @@ Currently, the following distributions are supported: | |||
| `zulu` | Zulu OpenJDK | [Link](https://www.azul.com/downloads/zulu-community/?package=jdk) | [Link](https://www.azul.com/products/zulu-and-zulu-enterprise/zulu-terms-of-use/) | | |||
| `adopt` or `adopt-hotspot` | Adopt OpenJDK Hotspot | [Link](https://adoptopenjdk.net/) | [Link](https://adoptopenjdk.net/about.html) | | |||
| `adopt-openj9` | Adopt OpenJDK OpenJ9 | [Link](https://adoptopenjdk.net/) | [Link](https://adoptopenjdk.net/about.html) | |||
| `microsoft` | Microsoft OpenJDK | [Link](https://www.microsoft.com/openjdk) | [Link](https://docs.microsoft.com/en-us/java/openjdk/faq) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brendandburns:main
Hello @brendanburns. Thank you for your pull request. Will you add logic to automatically grab all available versions ? |
README.md
Outdated
@@ -58,6 +58,7 @@ Currently, the following distributions are supported: | |||
| `zulu` | Zulu OpenJDK | [Link](https://www.azul.com/downloads/zulu-community/?package=jdk) | [Link](https://www.azul.com/products/zulu-and-zulu-enterprise/zulu-terms-of-use/) | | |||
| `adopt` or `adopt-hotspot` | Adopt OpenJDK Hotspot | [Link](https://adoptopenjdk.net/) | [Link](https://adoptopenjdk.net/about.html) | | |||
| `adopt-openj9` | Adopt OpenJDK OpenJ9 | [Link](https://adoptopenjdk.net/) | [Link](https://adoptopenjdk.net/about.html) | |||
| `microsoft` | Microsoft Build of OpenJDK | [Link](https://www.microsoft.com/openjdk) | [Link](https://docs.microsoft.com/en-us/java/openjdk/faq) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `microsoft` | Microsoft Build of OpenJDK | [Link](https://www.microsoft.com/openjdk) | [Link](https://docs.microsoft.com/en-us/java/openjdk/faq) | |
| `microsoft` | Microsoft Build of OpenJDK | [Link](https://www.microsoft.com/openjdk) | [Link](https://docs.microsoft.com/java/openjdk/faq) |
I believe docs.microsoft.com
will redirect to the appropriate page for the user's language setting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
import fs from 'fs'; | ||
import path from 'path'; | ||
|
||
const supportedPlatform = `'linux', 'macos', 'windows'`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's anything needed here. (Aren't all URLs case-insensitive?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the path part of a URL is usually case-sensitive: https://webmasters.stackexchange.com/questions/90339/why-are-urls-case-sensitive
It seems to work though, so no not a big deal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! This workflow is failing; I'm looking into why that is (and why it doesn't report on the Conversation page in the PR) must be because of the merge conflict on that file
Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com>
Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com>
Thanks @brendanburns , just kicked off the CI |
Looks like there are some unresolved merge conflicts in |
brendandburns#1 should fix the CI runs. Once those are green we can merge 🚢 |
@brcrista Thanks! I merged your PR. |
@@ -20,8 +20,11 @@ jobs: | |||
fail-fast: false | |||
matrix: | |||
os: [macos-latest, windows-latest, ubuntu-latest] | |||
distribution: ['temurin', 'adopt', 'adopt-openj9', 'zulu', 'liberica'] # internally 'adopt-hotspot' is the same as 'adopt' | |||
distribution: ['temurin', 'adopt', 'adopt-openj9', 'zulu', 'liberica', 'microsoft' ] # internally 'adopt-hotspot' is the same as 'adopt' | |||
version: ['8', '11', '16'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we replace 16 with 17 here, since 17 is the latest LTS now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably worth doing in a different PR since it is unrelated to adding MSFT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes. That'd be better indeed.
os: [windows-latest, ubuntu-latest] | ||
distribution: ['zulu', 'liberica'] | ||
distribution: ['liberica', 'microsoft', 'zulu'] | ||
version: ['11'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move up to 17?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted.
README.md
Outdated
@@ -59,6 +59,7 @@ Currently, the following distributions are supported: | |||
| `adopt` or `adopt-hotspot` | Adopt OpenJDK Hotspot | [Link](https://adoptopenjdk.net/) | [Link](https://adoptopenjdk.net/about.html) | | |||
| `adopt-openj9` | Adopt OpenJDK OpenJ9 | [Link](https://adoptopenjdk.net/) | [Link](https://adoptopenjdk.net/about.html) | | |||
| `liberica` | Liberica JDK | [Link](https://bell-sw.com/) | [Link](https://bell-sw.com/liberica_eula/) | | |||
| `microsoft` | Microsoft OpenJDK | [Link](https://www.microsoft.com/openjdk) | [Link](https://docs.microsoft.com/java/openjdk/faq) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct name is Microsoft Build of OpenJDK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done (apologies, this got lost in my rebasing)
version: ['8', '11', '16'] | ||
exclude: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also exclude Microsoft's version 16, as it is not an LTS release and we will no longer provide updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for now, since Microsoft hosts it, we should keep it in the spirit of meeting users where they are. Many users haven't updated their CI/CD for JDK 17.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that makes sense. We are not exposing support timelines for any of the distros through the GH Action anyways, so, it is up to the end-user to check the documentation of each distro.
'https://aka.ms/download-jdk/microsoft-jdk-17.0.1.12.1-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}' | ||
], | ||
[ | ||
'16.0.x', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given 16 is not an LTS release of MS Build of OpenJDK, I think we should not list it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above, but if you feel strongly I will remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's fine. See previous comment.
fullVersion: [17, 0, 1, 12, 1] | ||
}, | ||
{ | ||
majorVersion: 16, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous comments regarding making 16 available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above.
Comments addressed, please re-check. |
Could you please revert the changes for package-lock.json and use these commands |
Looking at my fork, looks like there will be a couple more issues: https://github.com/brcrista/setup-java/runs/4408213781?check_suite_focus=true#step:4:7
Similar issue for Ubuntu as well. @brendanburns if you want to allow edits from maintainers on this PR then we can push fixes for these issues |
@dmitry-shibanov comments addressed. @brcrista not sure where the aarch is coming from but it seems that actions doesn't support that architecture? I have ticked the "allow edits from maintainers" box, so any fixes or pointers would be great. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the Licensed
workflow is failing, but that's not related to these changes https://github.com/actions/setup-java/actions/runs/1555484816
Thank you @brendanburns and @brunoborges, this is a huge help!
@brcrista thank you for your help getting this across the finish line!! |
Indeed, excited to see Microsoft's OpenJDK now on the Setup Java action! |
Thanks so much @brendanburns! |
I just tried using the Microsoft JDK in a GitHub Actions workflow. It did not work. My workflow uses 'setup-java@v2' and there hasn't been a release that incorporates the new Microsoft JDK code. Can somebody tag a new release of setup-java? |
@sullis you can reference the commit hash as a tag |
Description:
Initial add of the Microsoft OpenJDK distribution
Related issue:
N/A
Check list: