envrionment test
This commit is contained in:
parent
f3158b8c89
commit
ed75f77457
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
|
@ -49,8 +49,10 @@ podTemplate(
|
|||
stage('Test') {
|
||||
try {
|
||||
container('gradle') {
|
||||
def project_details = sh(returnStdout: true, script: "gradle -q projectDetails").trim()
|
||||
sh "echo Project details: $project_details"
|
||||
def project_name = sh(returnStdout: true, script: "gradle -q projectName").trim()
|
||||
sh "echo Project name: $project_name"
|
||||
def project_version = sh(returnStdout: true, script: "gradle -q projectVersion").trim()
|
||||
sh "echo Project version: $project_version"
|
||||
|
||||
sh """
|
||||
pwd
|
||||
|
|
11
build.gradle
11
build.gradle
|
@ -21,9 +21,14 @@ tasks.named('test') {
|
|||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
task projectDetails {
|
||||
task projectName {
|
||||
doLast {
|
||||
println "PROJECT_NAME=${project.name}"
|
||||
println "PROJECT_VERSION=${project.version}"
|
||||
println "${project.name}"
|
||||
}
|
||||
}
|
||||
|
||||
task projectVersion {
|
||||
doLast {
|
||||
println "${project.version}"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user