environment test

This commit is contained in:
crusader 2023-02-01 22:54:42 +00:00
parent 9bdb488cf7
commit e8db020ad4

19
Jenkinsfile vendored
View File

@ -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) {