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

Fixes scripts for Linux agent #24

Merged
merged 2 commits into from
Jan 13, 2023
Merged

Fixes scripts for Linux agent #24

merged 2 commits into from
Jan 13, 2023

Conversation

joestr
Copy link
Contributor

@joestr joestr commented Jan 11, 2023

Changes:

@chadlwilson
Copy link
Member

chadlwilson commented Jan 12, 2023

Generally speaking, GoCD packages and endorses only the Adoptium / Temurin JDKs and we generally package/install the "jre" variants which are smaller. That's what we re-package with the docker images, Windows+Mac installers, Linux distros etc. There were a few peripheral places like this using the "official" OpenJDK builds. One can directly link to the relevant binary from say https://github.com/adoptium/temurin17-binaries/releases/tag/jdk-17.0.5%2B8

Need to think about this a little bit, but my gut feel is we are better to package JDK 17. That is the version that we package as a default everywhere else, and full regression currently only runs against JDK 17.

There's a bit of a challenge here insofar as

  • JDK17 will only work fine with GoCD Server >= 22.1.0
  • JDK11 will only work fine with GoCD Server < 21.2.0 or >= 22.1.0 (for some reason source compatibility was increased to JDK 13 changed in 21.2.0. We reverted this back to an LTS version in 22.1.0)

So there is no LTS JDK version that will work correctly with GoCD 21.2.0 or 21.3.0. That's OK, it's only two versions. For folks running older versions, I think it's fair that they will need to install their own/build their own image etc.

Which GoCD version are you folk using, I wonder?

@chadlwilson chadlwilson self-assigned this Jan 12, 2023
@chadlwilson
Copy link
Member

FWIW, there is some similar (more complex as handles multi-arch) dodgy shell scripting in https://github.com/gocd-contrib/gocd-trial-launcher/blob/9721a6b052f82b81559d7bc0a9617707499b823a/assembly/package.sh#L215-L276 that downloads temurin JREs for the purpose of the GoCD test drive at https://www.gocd.org/test-drive-gocd.html

@joestr
Copy link
Contributor Author

joestr commented Jan 12, 2023

I can only speak for myself, my GoCD Server runs on JDK 11 and the agent is also happy with it.

I see no issue using Adoptium JRE 17 during installation making it architecture agnostic would be really great too, but that's for another issue ticket.

@joestr
Copy link
Contributor Author

joestr commented Jan 12, 2023

Uses Adoptiums JDK 17 JRE now

@chadlwilson
Copy link
Member

Thanks! Made a few tweaks in #27.

Are you able to give https://github.com/gocd/azure-elastic-agent-plugin/releases/tag/v1.2.0-53-exp a go and let me know how it goes?

Will only work on GoCD 21.4.0+ (which has the required Java 17 compatibility without various hacks).

@joestr joestr deleted the patch-1 branch January 15, 2023 18:03
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.

Agent creation fails for Linux machines
2 participants