ci: move the benchmark env variables
somehow the baremetals face some issues with  Failed to traverse parents
Initially attempted to be fixes in
@@ -62,6 +62,11 @@ pipeline {
dir("${BASE_DIR}"){
// Skip all the stages except docs for PR's with asciidoc and md changes only
env.ONLY_DOCS = isGitRegionMatch(patterns: [ '.*\\.(asciidoc|md)' ], shouldMatchAll: true)
+ // Prepare the env variables for the benchmark results
+ env.COMMIT_ISO_8601 = sh(script: 'git log -1 -s --format=%cI', returnStdout: true).trim()
+ env.NOW_ISO_8601 = sh(script: 'date -u "+%Y-%m-%dT%H%M%SZ"', returnStdout: true).trim()
+ env.RESULT_FILE = "apm-agent-benchmark-results-${env.COMMIT_ISO_8601}.json"
+ env.BULK_UPLOAD_FILE = "apm-agent-bulk-${env.NOW_ISO_8601}.json"
}
}
}
@@ -241,12 +246,6 @@ pipeline {
deleteDir()
unstash 'build'
dir("${BASE_DIR}"){
- script {
- env.COMMIT_ISO_8601 = sh(script: 'git log -1 -s --format=%cI', returnStdout: true).trim()
- env.NOW_ISO_8601 = sh(script: 'date -u "+%Y-%m-%dT%H%M%SZ"', returnStdout: true).trim()
- env.RESULT_FILE = "apm-agent-benchmark-results-${env.COMMIT_ISO_8601}.json"
- env.BULK_UPLOAD_FILE = "apm-agent-bulk-${env.NOW_ISO_8601}.json"
- }
withOtelEnv() {
sh './scripts/jenkins/run-benchmarks.sh'
}
