From 34c7a251923e2e5c4001c97916ded1e2be11025e Mon Sep 17 00:00:00 2001 From: piyushgupta1551 Date: Tue, 7 Apr 2020 02:34:15 -0400 Subject: [PATCH] Adding SSHKEY Repository as a parameter --- jjb/dynamic/scale-ci_baseline.yml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/jjb/dynamic/scale-ci_baseline.yml b/jjb/dynamic/scale-ci_baseline.yml index 75cb75d2..4c0b3d28 100644 --- a/jjb/dynamic/scale-ci_baseline.yml +++ b/jjb/dynamic/scale-ci_baseline.yml @@ -14,12 +14,15 @@ fi # Re-enable logging set -x - git clone https://${SSHKEY_TOKEN}@github.com/redhat-performance/perf-dept.git - export PUBLIC_KEY=${WORKSPACE}/perf-dept/ssh_keys/id_rsa_perf.pub - export PRIVATE_KEY=${WORKSPACE}/perf-dept/ssh_keys/id_rsa_perf - export PBENCH_SSH_PUBLIC_KEY_FILE=${WORKSPACE}/perf-dept/ssh_keys/id_rsa_perf.pub - export PBENCH_SSH_PRIVATE_KEY_FILE=${WORKSPACE}/perf-dept/ssh_keys/id_rsa_perf - chmod 600 ${PRIVATE_KEY} + git clone https://${SSHKEY_TOKEN}@${SSHKEY_REPO} + if [ -f ${WORKSPACE}/${SSHKEY_REPOPATH_PUB} ] && [ -f ${WORKSPACE}/${SSHKEY_REPOPATH_PRIV} ] + then + export PUBLIC_KEY=${WORKSPACE}/${SSHKEY_REPOPATH_PUB} + export PRIVATE_KEY=${WORKSPACE}/${SSHKEY_REPOPATH_PRIV} + export PBENCH_SSH_PUBLIC_KEY_FILE=${WORKSPACE}/${SSHKEY_REPOPATH_PUB} + export PBENCH_SSH_PRIVATE_KEY_FILE=${WORKSPACE}/${SSHKEY_REPOPATH_PRIV} + chmod 600 ${PRIVATE_KEY} + fi # Create inventory File: echo "[orchestration]" > inventory @@ -137,6 +140,19 @@ description: 'Duration to run' name: BASELINE_WORKLOAD_DURATION trim: 'false' + - string: + default: "github.com/redhat-performance/perf-dept.git" + description: 'Repository container ssh keys for Ansible and pbench server' + name: SSHKEY_REPO + - string: + default: "perf-dept/ssh_keys/id_rsa_perf.pub" + description: 'path to public key file' + name: SSHKEY_REPOPATH_PUB + - string: + default: "perf-dept/ssh_keys/id_rsa_perf" + description: 'path to private key file' + name: SSHKEY_REPOPATH_PRIV + project-type: freestyle properties: - raw: