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 /opt/java/openjdk as a potential Java source for jenkins/ssh-agent AdoptOpenJDK Alpine images #209

Closed
wants to merge 2 commits into from

Conversation

oleg-nenashev
Copy link
Member

Jus a minor tweak which helps the instance to discover Java when using the new AdoptOpenJDK packages for alpine. https://github.com/jenkinsci/docker-ssh-agent/blob/master/8/alpine/Dockerfile

See JENKINS-XXXXX.

Submitter checklist

  • JIRA issue is well described
  • Appropriate autotests or explanation to why this change has no tests

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

Confirmed that /opt/java/openjdk/bin/java is installed in jenkins/ssh-agent:3.0.0-alpine and reports Java version 1.8.0_262.

@kuisathaverat
Copy link
Contributor

we cannot add all the path that exists n the world, the JVM should be on the PATH because is a requirement, if not you should pass the java path setting. Here we are trying to resolve an issue with paths in the Docker image with a sticker in another place. I've deprecated the java check class a few days a do and I will remove it in a year or so.
The proper solution for the Docker images is to set the environment correctly, I have done it for months in my test environments https://github.com/kuisathaverat/jenkins-issues/blob/master/kex-algorithms/ssh-agent-dsa/Dockerfile#L18

@kuisathaverat
Copy link
Contributor

kuisathaverat commented Mar 12, 2021

The issue is in the Docker image not in the plugin and the solution is to fix the Docker image by fixing jenkinsci/docker-ssh-agent#33, you can do it by adding Java to the Path or by creating a symbolic link on /usr/bin/java. The proper fix could be jenkinsci/docker-ssh-agent#74

I proposed this PR for close

@kuisathaverat
Copy link
Contributor

resolved by jenkinsci/docker-ssh-agent#78

@kuisathaverat kuisathaverat deleted the add-adoptopenjdk-alpine-java branch January 21, 2022 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants