From 0afb00d834253e27e39690e03318d484e3c1f586 Mon Sep 17 00:00:00 2001 From: Alexis Tual Date: Wed, 8 Jun 2022 11:46:36 +0200 Subject: [PATCH] Remove from init-script.gradle specific logging --- src/main/resources/scripts/init-script.gradle | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/src/main/resources/scripts/init-script.gradle b/src/main/resources/scripts/init-script.gradle index 0b2f29de..06841025 100644 --- a/src/main/resources/scripts/init-script.gradle +++ b/src/main/resources/scripts/init-script.gradle @@ -38,7 +38,6 @@ initscript { } } -def BUILD_SCAN_PLUGIN_ID = 'com.gradle.build-scan' def BUILD_SCAN_PLUGIN_CLASS = 'com.gradle.scan.plugin.BuildScanPlugin' def GRADLE_ENTERPRISE_PLUGIN_ID = 'com.gradle.enterprise' @@ -70,18 +69,6 @@ if (ccudPluginVersion && isNotAtLeast(ccudPluginVersion, '1.7')) { return } -// send a message to the server that the build has started -logger.quiet(generateBuildScanLifeCycleMessage('BUILD_STARTED')) - -// define a buildScanPublished listener that captures the build scan URL and sends it in a message to the server -def buildScanPublishedAction = { def buildScan -> - if (buildScan.metaClass.respondsTo(buildScan, 'buildScanPublished', Action)) { - buildScan.buildScanPublished { scan -> - logger.quiet(generateBuildScanLifeCycleMessage("BUILD_SCAN_URL:${scan.buildScanUri.toString()}")) - } - } -} - // register buildScanPublished listener and optionally apply the GE / Build Scan plugin if (GradleVersion.current() < GradleVersion.version('6.0')) { rootProject { @@ -112,10 +99,6 @@ if (GradleVersion.current() < GradleVersion.version('6.0')) { } } } - - pluginManager.withPlugin(BUILD_SCAN_PLUGIN_ID) { - buildScanPublishedAction(buildScan) - } } } else { gradle.settingsEvaluated { settings -> @@ -138,10 +121,6 @@ if (GradleVersion.current() < GradleVersion.version('6.0')) { settings.pluginManager.apply(initscript.classLoader.loadClass(CCUD_PLUGIN_CLASS)) } } - - extensionsWithPublicType(settings, GRADLE_ENTERPRISE_EXTENSION_CLASS).collect { settings[it.name] }.each { ext -> - buildScanPublishedAction(ext.buildScan) - } } } @@ -149,10 +128,6 @@ static def extensionsWithPublicType(def container, String publicType) { container.extensions.extensionsSchema.elements.findAll { it.publicType.concreteClass.name == publicType } } -static String generateBuildScanLifeCycleMessage(def attribute) { - return "##jenkins[hudson.plugins.gradle.injection.buildScanLifeCycle '${escape(attribute as String)}']" as String -} - static String escape(String value) { return value?.toCharArray()?.collect { ch -> escapeChar(ch) }?.join() }