mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-26 08:10:20 +00:00
ci: quote username for podman_login()
Jenkins does not like the passing of the username as variable to the
podman_login() function. Calling the function results in an error like
Warning: A secret was passed to "sh" using Groovy String interpolation, which is insecure.
Affected argument(s) used the following variable(s): [CREDS_USER]
See https://jenkins.io/redirect/groovy-string-interpolation for details.
+ ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@n7.pufty.ci.centos.org 'podman login --authfile=~/.podman-auth.json --username=$CREDS_USER --password=**** registry-****.apps.ocp.ci.centos.org'
Username: Error: error getting username and password: error reading username: EOF
By single quoting the username, just like the password, it may work
better.
Fixes: aca3745e2
("ci: do not use Groovy string interpolation for credentials")
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
aca3745e24
commit
f129719f18
@ -17,7 +17,7 @@ def ssh(cmd) {
|
||||
}
|
||||
|
||||
def podman_login(registry, username, passwd) {
|
||||
ssh "podman login --authfile=~/.podman-auth.json --username=${username} --password='${passwd}' ${registry}"
|
||||
ssh "podman login --authfile=~/.podman-auth.json --username='${username}' --password='${passwd}' ${registry}"
|
||||
}
|
||||
|
||||
// podman_pull pulls image from the source (CI internal) registry, and tags it
|
||||
|
@ -18,7 +18,7 @@ def ssh(cmd) {
|
||||
}
|
||||
|
||||
def podman_login(registry, username, passwd) {
|
||||
ssh "podman login --authfile=~/.podman-auth.json --username=${username} --password='${passwd}' ${registry}"
|
||||
ssh "podman login --authfile=~/.podman-auth.json --username='${username}' --password='${passwd}' ${registry}"
|
||||
}
|
||||
|
||||
// podman_pull pulls image from the source (CI internal) registry, and tags it
|
||||
|
@ -17,7 +17,7 @@ def ssh(cmd) {
|
||||
}
|
||||
|
||||
def podman_login(registry, username, passwd) {
|
||||
ssh "podman login --authfile=~/.podman-auth.json --username=${username} --password='${passwd}' ${registry}"
|
||||
ssh "podman login --authfile=~/.podman-auth.json --username='${username}' --password='${passwd}' ${registry}"
|
||||
}
|
||||
|
||||
// podman_pull pulls image from the source (CI internal) registry, and tags it
|
||||
|
@ -19,7 +19,7 @@ def ssh(cmd) {
|
||||
}
|
||||
|
||||
def podman_login(registry, username, passwd) {
|
||||
ssh "podman login --authfile=~/.podman-auth.json --username=${username} --password='${passwd}' ${registry}"
|
||||
ssh "podman login --authfile=~/.podman-auth.json --username='${username}' --password='${passwd}' ${registry}"
|
||||
}
|
||||
|
||||
// podman_pull pulls image from the source (CI internal) registry, and tags it
|
||||
|
@ -16,7 +16,7 @@ def ssh(cmd) {
|
||||
}
|
||||
|
||||
def podman_login(registry, username, passwd) {
|
||||
ssh "podman login --authfile=~/.podman-auth.json --username=${username} --password='${passwd}' ${registry}"
|
||||
ssh "podman login --authfile=~/.podman-auth.json --username='${username}' --password='${passwd}' ${registry}"
|
||||
}
|
||||
|
||||
// podman_pull pulls image from the source (CI internal) registry, and tags it
|
||||
|
@ -16,7 +16,7 @@ def ssh(cmd) {
|
||||
}
|
||||
|
||||
def podman_login(registry, username, passwd) {
|
||||
ssh "podman login --authfile=~/.podman-auth.json --username=${username} --password='${passwd}' ${registry}"
|
||||
ssh "podman login --authfile=~/.podman-auth.json --username='${username}' --password='${passwd}' ${registry}"
|
||||
}
|
||||
|
||||
// podman_pull pulls image from the source (CI internal) registry, and tags it
|
||||
|
Loading…
Reference in New Issue
Block a user