From 9bdb488cf7915e46ec7cf51ce8c9fcdf4dbf347c Mon Sep 17 00:00:00 2001 From: crusader Date: Wed, 1 Feb 2023 22:52:25 +0000 Subject: [PATCH] environment test --- Jenkinsfile | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) 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 {