diff --git a/Jenkinsfile b/Jenkinsfile index 0c04b3f..5cff9bb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,20 +45,19 @@ podTemplate( def app_version_value = sh(returnStdout: true, script: "cat build.gradle | grep -o 'version = [^,]*'").trim() sh "echo Project in version value: $app_version_value" def app_version = app_version_value.split(/=/)[1].trim() - def project_details = sh(returnStdout: true, script: "gradle -q projectDetails").trim() - sh "echo Project details: $project_details" - - stage('Test') { try { container('gradle') { - sh """ - pwd - echo "GIT_BRANCH=${gitBranch}" >> /etc/environment - echo "GIT_COMMIT=${gitCommit}" >> /etc/environment - gradle test - """ + def project_details = sh(returnStdout: true, script: "gradle -q projectDetails").trim() + sh "echo Project details: $project_details" + + sh """ + pwd + echo "GIT_BRANCH=${gitBranch}" >> /etc/environment + echo "GIT_COMMIT=${gitCommit}" >> /etc/environment + gradle test + """ } } catch (exc) {