Skip to content

Commit

Permalink
withPodmanRemote: add port 22 to CONTAINER_HOST env var
Browse files Browse the repository at this point in the history
There is a regression in podman [1] that causes podman remote sessions
to not work unless the port is specified. Let's just add the port so we
can get unblocked.

[1] containers/podman#16509
  • Loading branch information
dustymabe committed Nov 14, 2022
1 parent d12ada6 commit 6fe6238
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vars/withPodmanRemote.groovy
Expand Up @@ -14,7 +14,7 @@ def call(params = [:], Closure body) {
usernameVariable: 'REMOTEUSER',
keyFileVariable: 'CONTAINER_SSHKEY')
]) {
withEnv(["CONTAINER_HOST=ssh://${REMOTEUSER}@${REMOTEHOST}/run/user/${REMOTEUID}/podman/podman.sock"]) {
withEnv(["CONTAINER_HOST=ssh://${REMOTEUSER}@${REMOTEHOST}:22/run/user/${REMOTEUID}/podman/podman.sock"]) {
shwrap("""
# workaround bug: https://github.com/jenkinsci/configuration-as-code-plugin/issues/1646
sed -i s/^----BEGIN/-----BEGIN/ \$CONTAINER_SSHKEY
Expand Down

0 comments on commit 6fe6238

Please sign in to comment.