envrionment test

This commit is contained in:
crusader 2023-02-01 23:10:13 +00:00
parent f3158b8c89
commit ed75f77457
2 changed files with 12 additions and 5 deletions

6
Jenkinsfile vendored
View File

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

View File

@ -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}"
}
}