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

Allow to use registry as host and port only to allow to use podman as executable #94

Merged
merged 2 commits into from
Aug 23, 2022

Conversation

mswiderski
Copy link
Contributor

@mswiderski mswiderski commented Feb 13, 2022

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

This is a fix for docker workflow plugin issue that manifests when using podman. The fix here allows to either directly (based on tool name) or via environment variable to use just how and port of the registry url instead of complete one.
https://issues.jenkins.io/browse/JENKINS-67418

@jglick jglick changed the title allow to use registry as host and port only to allow to use podman as… Allow to use registry as host and port only to allow to use podman as executable Mar 16, 2022
@mmusenbr
Copy link

mmusenbr commented Aug 3, 2022

Is there anything to support to bring this PR forward? We currently face this issue as the infrastructure provided uses now podman for agents.

@@ -111,6 +113,14 @@ public KeyMaterial materialize() throws IOException, InterruptedException {
}
return new RegistryKeyMaterial(dockerConfig, new EnvVars("DOCKER_CONFIG", dockerConfig.getRemote()));
}

protected String registry() {
if (dockerExecutable.endsWith("podman") || Boolean.parseBoolean(env.get(DOCKER_REGISTRY_HOST_ONLY, "false"))) {
Copy link

Choose a reason for hiding this comment

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

is this podman check ideal? Better than not having it maybe, but it will not detect if the podman-docker wrapper is used.

Copy link
Member

Choose a reason for hiding this comment

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

I don't know anything about podman, so I am not any help here :)
But I guess if anyone comes up with something better it can be enhanced in the future.

@mmusenbr
Copy link

mmusenbr commented Aug 3, 2022

From what I read, this only applies for podman >= 3.3 and <= 4.0. This is fixed in 4.1 in podman.

@rsandell rsandell merged commit dc7edb3 into jenkinsci:master Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants