Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

octopus-rm-gradle-plugin-26 release-management.version -> octopus-rel… #28

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/src/docs/asciidoc/release-management-gradle-plugin.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Applying the org.octopusden.octopus-release-management plugin with the buildscri
----
buildscript {
dependencies {
classpath "org.octopusden.octopus-release-management:org.octopusden.octopus-release-management:${project.findProperty('release-management.version') ?: '{version-label}'}"
classpath "org.octopusden.octopus-release-management:org.octopusden.octopus-release-management:${project.findProperty('octopus-release-management.version') ?: '{version-label}'}"
}
}

Expand All @@ -230,7 +230,7 @@ This method will require timeFor that need to configure plugin management in pro
----
pluginManagement {
plugins {
id 'org.octopusden.octopus-release-management' version settings['release-management.version']
id 'org.octopusden.octopus-release-management' version settings['octopus-release-management.version']
}
}
----
Expand All @@ -240,16 +240,16 @@ pluginManagement {
----
pluginManagement {
plugins {
id("org.octopusden.octopus-release-management") version(extra["release-management.version"] as String)
id("org.octopusden.octopus-release-management") version(extra["octopus-release-management.version"] as String)
}
}
----

and put property _release-management.version_ with version in the project _gradle.properties_
and put property _octopus-release-management.version_ with version in the project _gradle.properties_

[subs="attributes"]
----
release-management.version={version-label}
octopus-release-management.version={version-label}
----

=== TeamCity compile and continues delivery build configuration
Expand Down Expand Up @@ -493,7 +493,7 @@ If TeamCity project build configuration is not based on standard templates and i
.gradle.properties
[subs="attributes"]
----
release-management.version={version-label}
octopus-release-management.version={version-label}
kotlin.version=1.3.70
spring-boot.version=2.2.5.RELEASE
platform-commons.version=1.2.687
Expand All @@ -504,7 +504,7 @@ platform-commons.version=1.2.687
----
pluginManagement {
plugins {
id 'org.octopusden.octopus-release-management' version settings['release-management.version']
id 'org.octopusden.octopus-release-management' version settings['octopus-release-management.version']
id 'org.jetbrains.kotlin.jvm' version settings['kotlin.version']
id 'org.springframework.boot' version settings['spring-boot.version']
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ class ReleaseManagementPluginDockerTest {
val projectPath = Paths.get(ReleaseManagementPluginDockerTest::class.java.getResource("/mesh-agent2")!!.toURI())
logger.debug("Project directory {}", projectPath)
val processBuilder: LocalProcessBuilder = ProcessBuilders.newProcessBuilder(LocalProcessSpec.LOCAL_COMMAND)
var packageName: String = System.getProperty("packageName").toString()
val packageName: String = System.getProperty("packageName").toString()
val envVariables = mutableMapOf("JAVA_HOME" to System.getProperty("java.home"))
System.getenv()["DOCKER_HOST"]?.let { dockerHost ->
envVariables["DOCKER_HOST"] = dockerHost
}
val processInstance = processBuilder
.envVariables(mapOf("JAVA_HOME" to System.getProperty("java.home")))
.envVariables(envVariables)
.logger { it.logger(logger) }
.processInstance { it.unlimited() }
.mapBatExtension()
Expand All @@ -35,7 +39,7 @@ class ReleaseManagementPluginDockerTest {
.commandAndArguments("$projectPath/gradlew")
.build()
.execute(
"-Prelease-management.version=$releaseManagementVersion",
"-Poctopus-release-management.version=$releaseManagementVersion",
"-Pescrow.build-phase=ASSEMBLE",
"-Pdocker.registry=$dockerRegistry",
"-PpackageName=$packageName",
Expand All @@ -46,7 +50,7 @@ class ReleaseManagementPluginDockerTest {
.toCompletableFuture()
.get()
assertEquals(0, processInstance.exitCode, "Gradle execution failure")
assertThat(processInstance.stdOut).contains("Pull docker image docker.artifactory." + java.lang.System.getProperty("packageName") + ".com/platform/go-build:1.1.7")
assertThat(processInstance.stdOut).contains("Pull docker image $dockerRegistry/platform/go-build:1.1.7")
}

@Test
Expand All @@ -66,7 +70,7 @@ class ReleaseManagementPluginDockerTest {
.commandAndArguments("$projectPath/gradlew")
.build()
.execute(
"-Prelease-management.version=$releaseManagementVersion",
"-Poctopus-release-management.version=$releaseManagementVersion",
"-Pescrow.build-phase=ASSEMBLE",
"-Pdocker.registry=$dockerRegistry",
"bootBuildImage"
Expand All @@ -77,4 +81,4 @@ class ReleaseManagementPluginDockerTest {
assertThat(processInstance.stdOut).anyMatch{logEntry -> logEntry.contains("Pulled builder image '$dockerRegistry/cnbs/uds-stack-builder")}
assertThat(processInstance.stdOut).anyMatch{logEntry -> logEntry.contains("Pulled run image '$dockerRegistry/cnbs/uds-stack-run")}
}
}
}
2 changes: 1 addition & 1 deletion ft-docker/src/test/resources/mesh-agent2/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
use_dev_repository=all
release-management.version=1.0-SNAPSHOT
octopus-release-management.version=1.0-SNAPSHOT
2 changes: 1 addition & 1 deletion ft-docker/src/test/resources/mesh-agent2/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pluginManagement {
plugins {
id 'org.octopusden.octopus-release-management' version settings['release-management.version']
id 'org.octopusden.octopus-release-management' version settings['octopus-release-management.version']
}
}

Expand Down
4 changes: 2 additions & 2 deletions ft-docker/src/test/resources/uds/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use_dev_repository=all
release-management.version=1.0-SNAPSHOT
octopus-release-management.version=1.0-SNAPSHOT
spring-boot.version=2.6.1
spring-dependency-management.version=1.0.11.RELEASE
spring-dependency-management.version=1.0.11.RELEASE
4 changes: 2 additions & 2 deletions ft-docker/src/test/resources/uds/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
pluginManagement {
plugins {
id 'org.octopusden.octopus-release-management' version settings['release-management.version']
id 'org.octopusden.octopus-release-management' version settings['octopus-release-management.version']
id 'org.springframework.boot' version settings['spring-boot.version']
id 'io.spring.dependency-management' version settings['spring-dependency-management.version']
}
}

rootProject.name = 'releng-update-dependencies-service'
rootProject.name = 'releng-update-dependencies-service'
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fun gradleProcessInstance(init: TestGradleDSL.() -> Unit): Pair<ProcessInstance,
.processInstance { processInstanceConfiguration -> processInstanceConfiguration.unlimited() }
.commandAndArguments("$projectPath/gradlew", "--no-daemon")
.build()
.execute(*(listOf("-Prelease-management.version=$releaseManagementVersion") + testGradleDSL.tasks + testGradleDSL.additionalArguments).toTypedArray())
.execute(*(listOf("-Poctopus-release-management.version=$releaseManagementVersion") + testGradleDSL.tasks + testGradleDSL.additionalArguments).toTypedArray())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

12% of developers fix this issue

SpreadOperator: In most cases using a spread operator causes a full copy of the array to be created before calling a method. This may result in a performance penalty.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.

.toCompletableFuture()
.join(), projectPath)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AutoUpdateDependenciesExtensionTest {
Arguments.of("auto-mapping",
mapOf(
"a-doc.version" to "3.53.3-137",
"release-management.version" to "1.0-SNAPSHOT"
"octopus-release-management.version" to "1.0-SNAPSHOT"
),
emptyList<ComponentDependency>()
),
Expand Down Expand Up @@ -149,4 +149,4 @@ class AutoUpdateDependenciesExtensionTest {
assertThat(processInstance.first.stdOut).containsAnyElementsOf(listOf("-----BEGIN AUDC-----", " \"declared\" : {", " \"configured\" : [ {", "-----END AUDC-----"))
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class ReleaseManagementPluginTest {
.workDirectory(projectPath)
.commandAndArguments("$projectPath/gradlew")
.build()
.execute("clean", "assemble", "generatePomFileForMavenPublication", "-Prelease-management.version=$releaseManagementVersion", "-PpackageName=$packageName")
.execute("clean", "assemble", "generatePomFileForMavenPublication", "-Poctopus-release-management.version=$releaseManagementVersion", "-PpackageName=$packageName")
.toCompletableFuture()
.get()
assertEquals(0, processInstance.exitCode, "Gradle execution failure")
Expand All @@ -169,7 +169,7 @@ class ReleaseManagementPluginTest {
.mapBatExtension()
.mapCmdExtension()
.workDirectory(projectPath)
.commandAndArguments("$projectPath/gradlew", "-Prelease-management.version=$releaseManagementVersion")
.commandAndArguments("$projectPath/gradlew", "-Poctopus-release-management.version=$releaseManagementVersion")
.processInstance { it.unlimited() }
.build()
.execute(*commandLineArguments.toTypedArray())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use_dev_repository=plugins

release-management.version=1.0-SNAPSHOT
octopus-release-management.version=1.0-SNAPSHOT

a-doc.version=3.53.3-137
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
pluginManagement {
plugins {
id 'org.octopusden.octopus-release-management' version settings['release-management.version']
id 'org.octopusden.octopus-release-management' version settings['octopus-release-management.version']
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use_dev_repository=plugins

release-management.version=1.0-SNAPSHOT
octopus-release-management.version=1.0-SNAPSHOT

pl-commons-version=1.1

as-server.version=1.7.3182
as-server.version=1.7.3182
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
pluginManagement {
plugins {
id 'org.octopusden.octopus-release-management' version settings['release-management.version']
id 'org.octopusden.octopus-release-management' version settings['octopus-release-management.version']
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use_dev_repository=plugins

release-management.version=1.0-SNAPSHOT
octopus-release-management.version=1.0-SNAPSHOT

pl-commons-version=1.1

as-server.version=1.7.3182
as-server.version=1.7.3182
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
pluginManagement {
plugins {
id 'org.octopusden.octopus-release-management' version settings['release-management.version']
id 'org.octopusden.octopus-release-management' version settings['octopus-release-management.version']
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use_dev_repository=plugins

release-management.version=1.0-SNAPSHOT
octopus-release-management.version=1.0-SNAPSHOT

pl-commons-version=1.1

as-server.version=1.7.3182
as-server.version=1.7.3182
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
pluginManagement {
plugins {
id 'org.octopusden.octopus-release-management' version settings['release-management.version']
id 'org.octopusden.octopus-release-management' version settings['octopus-release-management.version']
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use_dev_repository=plugins

release-management.version=1.0-SNAPSHOT
octopus-release-management.version=1.0-SNAPSHOT

platform-commons.version=1.2.687
escrow.version=5.327
escrow.version=5.327
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
pluginManagement {
plugins {
id 'org.octopusden.octopus-release-management' version settings['release-management.version']
id 'org.octopusden.octopus-release-management' version settings['octopus-release-management.version']
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use_dev_repository=plugins

release-management.version=1.0-SNAPSHOT
octopus-release-management.version=1.0-SNAPSHOT

pl-commons-version=1.1

as-server.version=1.7.3182
as-server.version=1.7.3182
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
pluginManagement {
plugins {
id 'org.octopusden.octopus-release-management' version settings['release-management.version']
id 'org.octopusden.octopus-release-management' version settings['octopus-release-management.version']
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
release-management.version=1.0-SNAPSHOT
octopus-release-management.version=1.0-SNAPSHOT
# To enable access to non released versions of the org.octopusden.octopus-release-management gradle plugin
use_dev_repository=plugins
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
pluginManagement {
plugins {
id 'org.octopusden.octopus-release-management' version settings['release-management.version']
id 'org.octopusden.octopus-release-management' version settings['octopus-release-management.version']
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
dependencies {
classpath "org.octopusden.octopus-release-management:org.octopusden.octopus-release-management:${project.findProperty('release-management.version') ?: '1.0-SNAPSHOT'}"
classpath "org.octopusden.octopus-release-management:org.octopusden.octopus-release-management:${project.findProperty('octopus-release-management.version') ?: '1.0-SNAPSHOT'}"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
dependencies {
classpath "org.octopusden.octopus-release-management:org.octopusden.octopus-release-management:${project.findProperty('release-management.version') ?: '1.0-SNAPSHOT'}"
classpath "org.octopusden.octopus-release-management:org.octopusden.octopus-release-management:${project.findProperty('octopus-release-management.version') ?: '1.0-SNAPSHOT'}"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# To enable access to non released versions of the org.octopusden.octopus-release-management gradle plugin
use_dev_repository=buildscript

release-management.version=1.0-SNAPSHOT
octopus-release-management.version=1.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# To enable access to non released versions of the org.octopusden.octopus-release-management gradle plugin
use_dev_repository=plugins

release-management.version=1.0-SNAPSHOT
octopus-release-management.version=1.0-SNAPSHOT
4 changes: 2 additions & 2 deletions ft/src/test/resources/publish/multi-module/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//
pluginManagement {
plugins {
id 'org.octopusden.octopus-release-management' version settings['release-management.version']
id 'org.octopusden.octopus-release-management' version settings['octopus-release-management.version']
}
}

rootProject.name = 'multi-module'

include ':module-1'
include ':module-2'
include ':module-2'
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
staging()
}
dependencies {
classpath "org.octopusden.octopus-release-management:org.octopusden.octopus-release-management:${project.findProperty('release-management.version') ?: '1.0-SNAPSHOT'}"
classpath "org.octopusden.octopus-release-management:org.octopusden.octopus-release-management:${project.findProperty('octopus-release-management.version') ?: '1.0-SNAPSHOT'}"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
release-management.version=1.0-SNAPSHOT
octopus-release-management.version=1.0-SNAPSHOT
# To enable access to non released versions of the org.octopusden.octopus-release-management gradle plugin
use_dev_repository=plugins
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
pluginManagement {
plugins {
id 'org.octopusden.octopus-release-management' version settings['release-management.version']
id 'org.octopusden.octopus-release-management' version settings['octopus-release-management.version']
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
release-management.version=1.0-SNAPSHOT
octopus-release-management.version=1.0-SNAPSHOT
# To enable access to non released versions of the org.octopusden.octopus-release-management gradle plugin
use_dev_repository=plugins
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
pluginManagement {
plugins {
id 'org.octopusden.octopus-release-management' version settings['release-management.version']
id 'org.octopusden.octopus-release-management' version settings['octopus-release-management.version']
}
}

Expand Down
2 changes: 1 addition & 1 deletion ft/src/test/resources/publish/sqlprs/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
release-management.version=1.0-SNAPSHOT
octopus-release-management.version=1.0-SNAPSHOT
use_dev_repository=plugins
com.jfrog.artifactory.publishConfigs=builds
Loading