diff --git a/Jenkinsfile b/Jenkinsfile index be051266..d84478a8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -153,6 +153,8 @@ pipeline { file(credentialsId: 'ocm-al-aws', variable: 'AWS_CREDS' ), file(credentialsId: 'ocm-al-infra', variable: 'INFRA' ), string(credentialsId: 'ocm-al-ocm-token', variable: 'OCM_TOKEN' ), + string(credentialsId: 'ocm-al-ocm-client-id', variable: 'OCM_CLIENT_ID' ), + string(credentialsId: 'ocm-al-ocm-client-secret', variable: 'OCM_CLIENT_SECRET' ), string(credentialsId: 'ocm-al-prom-token', variable: 'PROM_TOKEN' ), string(credentialsId: 'ocm-al-server-password', variable: 'ES_SERVER_PASS' ), string(credentialsId: 'ocm-al-sshkey-token', variable: 'SSHKEY_TOKEN' ), diff --git a/scripts/run_ocm_api_load.sh b/scripts/run_ocm_api_load.sh index c3c10a60..98ae3ecd 100755 --- a/scripts/run_ocm_api_load.sh +++ b/scripts/run_ocm_api_load.sh @@ -94,8 +94,7 @@ run_ocm_api_load(){ echo $GATEWAY_URL # Timeout runs ocm-load-test for the specified duration even if airflow killed this script (when user wants to stop benchmark execution). This helps in ocm-load-test to cleanup resources it created. 10 minutes extra timeout is set so that test can prepare results after running for the given duration. # kill-after option needs sudo permissions - timeout --kill-after=60s --preserve-status $(((tduration + 20) * 60)) $TESTDIR/build/ocm-load-test --aws-region $AWS_DEFAULT_REGION --aws-account-id $AWS_ACCOUNT_ID --aws-access-key $AWS_OSDCCADMIN_KEY --aws-access-secret $AWS_OSDCCADMIN_SECRET --cooldown $COOLDOWN --duration $tduration --elastic-index ocm-load-metrics --elastic-insecure-skip-verify=true --elastic-server $ES_SERVER --gateway-url $GATEWAY_URL --ocm-token $OCM_TOKEN --ocm-token-url $OCM_TOKEN_URL --output-path $TESTDIR/results --rate $trate --test-id $UUID --test-names $tname $rampoptions || true - # $TESTDIR/build/ocm-load-test --aws-region $AWS_DEFAULT_REGION --aws-account-id $AWS_ACCOUNT_ID --aws-access-key $AWS_OSDCCADMIN_KEY --aws-access-secret $AWS_OSDCCADMIN_SECRET --cooldown $COOLDOWN --duration $tduration --elastic-index ocm-load-metrics --elastic-insecure-skip-verify=true --elastic-server $ES_SERVER --gateway-url $GATEWAY_URL --ocm-token $OCM_TOKEN --ocm-token-url $OCM_TOKEN_URL --output-path $TESTDIR/results --rate $trate --test-id $UUID --test-names $tname $rampoptions + timeout --kill-after=60s --preserve-status $(((tduration + 20) * 60)) $TESTDIR/build/ocm-load-test --aws-region $AWS_DEFAULT_REGION --aws-account-id $AWS_ACCOUNT_ID --aws-access-key $AWS_OSDCCADMIN_KEY --aws-access-secret $AWS_OSDCCADMIN_SECRET --cooldown $COOLDOWN --duration $tduration --elastic-index ocm-load-metrics --elastic-insecure-skip-verify=true --elastic-server $ES_SERVER --gateway-url $GATEWAY_URL --client-id $OCM_CLIENT_ID --client-secret $OCM_CLIENT_SECRET --ocm-token-url $OCM_TOKEN_URL --output-path $TESTDIR/results --rate $trate --test-id $UUID --test-names $tname $rampoptions || true sleep $COOLDOWN done benchmark_rv=$? diff --git a/scripts/run_ocm_benchmark.sh b/scripts/run_ocm_benchmark.sh index b077c573..08a6bb8f 100755 --- a/scripts/run_ocm_benchmark.sh +++ b/scripts/run_ocm_benchmark.sh @@ -36,8 +36,11 @@ setup(){ export ES_SERVER_URL=${ES_SERVER_URL} export ES_SERVER_USER=${ES_SERVER_USER} export OCM_TOKEN=${OCM_TOKEN} + export OCM_CLIENT_ID=${OCM_CLIENT_ID} + export OCM_CLIENT_SECRET=${OCM_CLIENT_SECRET} export PROM_TOKEN=${PROM_TOKEN} export GATEWAY_URL=${GATEWAY_URL} + export BUILD_URL=${BUILD_URL} # TESTDIR and UUID will be same for ocm-api-load operation. cleanup operation uses different TESTDIR to get unaffected by ocm-api-load operation failures. Cleanup still retrieves UUID and removes /tmp/${UUID} on ORCHESTRATION_HOST export TESTDIR=$(uuidgen | head -c8)-$JENKINS_JOB_NUMBER-$(date '+%Y%m%d')