diff --git a/Jenkinsfile b/Jenkinsfile index 7962e14..0c04b3f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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() - 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 {