Closed rpothier closed 3 years ago
It appears that it's not possible to display this as a variable in the stage name in the Jenkinsfile: https://issues.jenkins.io/browse/JENKINS-43820?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
So I would use something like the following to announce the version at the very top of the test log:
diff --git a/ci/test b/ci/test
index 2336957..61ffea7 100755
--- a/ci/test
+++ b/ci/test
@@ -188,6 +188,10 @@ function checkArguments() {
elif [[ "$TEST_AUTHN_MODE" != "annotation-based" && "$TEST_AUTHN_MODE" != "host-id-based" ]]; then
echo "The only valid authentication modes are 'annotation-based' and 'host-id-based'"
else
+ if [[ "$TEST_PLATFORM" == "oc" ]]; then
+ version="${OPENSHIFT_VERSION:-UNKNOWN}"
+ announce "Test OpenShift Version $version"
+ fi
return 0
fi
Added the above changes and here is a sample of the logs.
[2021-03-19T01:31:17.349Z] + cd ci [2021-03-19T01:31:17.349Z] + summon --environment current ./test oc postgres host-id-based [2021-03-19T01:31:18.285Z] ++++++++++++++++++++++++++++++++++++++ [2021-03-19T01:31:18.285Z] [2021-03-19T01:31:18.285Z] Checking arguments [2021-03-19T01:31:18.285Z] [2021-03-19T01:31:18.285Z] ++++++++++++++++++++++++++++++++++++++ [2021-03-19T01:31:18.285Z] ++++++++++++++++++++++++++++++++++++++ [2021-03-19T01:31:18.285Z] [2021-03-19T01:31:18.285Z] Test OpenShift Version 4.5 [2021-03-19T01:31:18.285Z] [2021-03-19T01:31:18.285Z] ++++++++++++++++++++++++++++++++++++++ [2021-03-19T01:31:18.285Z] ++++++++++++++++++++++++++++++++++++++ [2021-03-19T01:31:18.285Z] [2021-03-19T01:31:18.285Z] Preparing test environment [2021-03-19T01:31:18.285Z] [2021-03-19T01:31:18.285Z] ++++++++++++++++++++++++++++++++++++++
This removes the hard coded Openshift versions and uses oldest, current, and next. This also adds a flow to the Jenkinsfile for next, so next will not be run unless you pick the option in the Jenkins UI. Below is a view of a Jenkins run using the current and oldest, next is not run in this view as the option is not selected in the UI for a git push.
Note: #131 should go in first, then this issue will be updated.
Addresses issue #128