Skip to content

Commit

Permalink
add pipeline traceability data (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
tt-marcel authored Feb 27, 2024
2 parents a071867 + af9a912 commit dddabc1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/e2e/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,27 @@ pipeline {
environment {
pipeline_report_dir = "pipeline_report2TG"
tgAuthKey = credentials('TG_authkey_test_report_upload')
PRODUCT_NAME = "testguide_report_generator_python"
TEST_LEVEL = "system"
}

stages {
stage('Set Product Version') {
steps {
script {
pyprojectContent = readFile 'pyproject.toml'
// This pattern matches versions like "1.0", "1.1.0", "1.1.0-beta", etc.
pattern = ~'version\\s*=\\s*"(\\d+(\\.\\d+){1,2}(-\\w+)?)"'
matcher = pattern.matcher(pyprojectContent)
if (matcher.find()) {
env.PRODUCT_VERSION = matcher.group(1)
echo "Product Version set to: ${env.PRODUCT_VERSION}"
} else {
error "Version not found in pyproject.toml"
}
}
}
}
stage ('Docker Build') {
steps {
bat """
Expand Down

0 comments on commit dddabc1

Please sign in to comment.