environment test
This commit is contained in:
parent
9bdb488cf7
commit
e8db020ad4
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user