environment test
This commit is contained in:
parent
a8778adaa8
commit
9bdb488cf7
25
Jenkinsfile
vendored
25
Jenkinsfile
vendored
|
@ -1,23 +1,3 @@
|
|||
import org.gradle.tooling.GradleConnector
|
||||
import org.gradle.tooling.ProjectConnection
|
||||
import org.gradle.tooling.model.GradleProject
|
||||
|
||||
def getIncludedProjectNamesMap(Project project) {
|
||||
def projectNamesMap = new HashMap<String, String>()
|
||||
project.gradle.includedBuilds.each { includedBuild ->
|
||||
ProjectConnection connection = GradleConnector.newConnector()
|
||||
.forProjectDirectory(includedBuild.projectDir)
|
||||
.connect()
|
||||
GradleProject includedProject = connection.getModel(GradleProject.class);
|
||||
def name = includedProject.getName();
|
||||
connection.close();
|
||||
|
||||
projectNamesMap.put includedBuild.name, name;
|
||||
}
|
||||
|
||||
return projectNamesMap
|
||||
}
|
||||
|
||||
def label = "worker-${UUID.randomUUID().toString()}"
|
||||
|
||||
podTemplate(
|
||||
|
@ -65,7 +45,10 @@ 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()
|
||||
println getIncludedProjectNamesMap(project)
|
||||
def project_details = sh(returnStdout: true, script: "gradle -q projectDetails").trim()
|
||||
sh "echo Project details: $project_details"
|
||||
|
||||
|
||||
|
||||
stage('Test') {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue
Block a user