From baac40c13642afab631b48eae11ce0fb9199f9d8 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 17 Nov 2020 11:44:43 +0100 Subject: [PATCH] ci: escape command to be executed over ssh to fetch BASE_IMAGE The ${BASE_IMAGE} variable gets expanded by running the ssh command. This becomes an empty variable, so the "echo" part of the command does not output anything. By escaping the command, there is no variable substitution, and the BASE_IMAGE variable should get stored in the variable. Signed-off-by: Niels de Vos --- mini-e2e.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mini-e2e.groovy b/mini-e2e.groovy index aaf229037..a5c5a4c22 100644 --- a/mini-e2e.groovy +++ b/mini-e2e.groovy @@ -97,7 +97,7 @@ node('cico-workspace') { } stage('pull base container images') { def base_image = sh( - script: 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} "source /opt/build/go/src/github.com/ceph/ceph-csi/build.env && echo ${BASE_IMAGE}"', + script: 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} \'source /opt/build/go/src/github.com/ceph/ceph-csi/build.env && echo ${BASE_IMAGE}\'', returnStdout: true ).trim()