From aa1f20dce7d868422ad10a7db4ac542588328a05 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Mon, 14 Nov 2022 16:01:38 -0500 Subject: [PATCH] withPodmanRemote: add port 22 to CONTAINER_HOST env var 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] https://github.com/containers/podman/issues/16509 --- vars/withPodmanRemote.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/withPodmanRemote.groovy b/vars/withPodmanRemote.groovy index 21c00ec..0a5379c 100644 --- a/vars/withPodmanRemote.groovy +++ b/vars/withPodmanRemote.groovy @@ -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