diff --git a/tests/v2/validation/Dockerfile.validation b/tests/v2/validation/Dockerfile.validation index da0f1ed3a14..e035aff5fa2 100644 --- a/tests/v2/validation/Dockerfile.validation +++ b/tests/v2/validation/Dockerfile.validation @@ -22,7 +22,9 @@ ENV CORRAL_VERSION="v1.1.1" RUN go install github.com/rancherlabs/corral@${CORRAL_VERSION} RUN mkdir /root/.ssh && chmod 600 .ssh/jenkins-* -RUN ssh-keygen -f .ssh/jenkins-* -y > /root/.ssh/public.pub +RUN for pem_file in .ssh/jenkins-*; do \ + ssh-keygen -f "$pem_file" -y > "/root/.ssh/$(basename "$pem_file").pub"; \ + done RUN CGO_ENABLED=0 diff --git a/tests/v2/validation/Jenkinsfile b/tests/v2/validation/Jenkinsfile index 49621e9a6c5..91fd678501a 100644 --- a/tests/v2/validation/Jenkinsfile +++ b/tests/v2/validation/Jenkinsfile @@ -39,6 +39,7 @@ node { string(credentialsId: 'AWS_SECRET_ACCESS_KEY', variable: 'RANCHER_EKS_SECRET_KEY'), string(credentialsId: 'DO_ACCESSKEY', variable: 'DO_ACCESSKEY'), string(credentialsId: 'AWS_SSH_PEM_KEY', variable: 'AWS_SSH_PEM_KEY'), + string(credentialsId: 'AWS_SSH_RSA_KEY', variable: 'AWS_SSH_RSA_KEY'), string(credentialsId: 'RANCHER_SSH_KEY', variable: 'RANCHER_SSH_KEY'), string(credentialsId: 'AZURE_SUBSCRIPTION_ID', variable: 'AZURE_SUBSCRIPTION_ID'), string(credentialsId: 'AZURE_TENANT_ID', variable: 'AZURE_TENANT_ID'), @@ -81,7 +82,6 @@ node { string(credentialsId: 'QASE_AUTOMATION_TOKEN', variable: 'QASE_AUTOMATION_TOKEN'), string(credentialsId: 'SLACK_WEBHOOK', variable: 'SLACK_WEBHOOK'), string(credentialsId: 'RANCHER_LINODE_ACCESSKEY', variable: "RANCHER_LINODE_ACCESSKEY")]) { - withEnv(paramsMap) { stage('Checkout') { deleteDir() @@ -102,6 +102,11 @@ node { } } + dir("./tests/v2/validation/.ssh") { + def decodedRsa = new String(AWS_SSH_RSA_KEY.decodeBase64()) + writeFile file: JENKINS_RKE_VALIDATION, text: decodedRsa + } + dir("./tests/v2/validation") { def filename = "config.yaml" def configContents = env.CONFIG