Skip to content

Commit

Permalink
octopus-rm-gradle-plugin-26 Fix documentation
Browse files Browse the repository at this point in the history
* octopus-rm-gradle-plugin-26 release-management.version -> octopus-release-management.version
* octopus-rm-gradle-plugin-26 Ability to set custom header in doc && typo
* octopus-rm-gradle-plugin-26 dockerRegistry -> docker.registry in doc
* octopus-rm-gradle-plugin-26 Fix header in doc
---------
  • Loading branch information
aryabokon authored Aug 2, 2023
1 parent 4a47851 commit 5332562
Show file tree
Hide file tree
Showing 44 changed files with 77 additions and 73 deletions.
13 changes: 8 additions & 5 deletions docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ plugins {
}

version = project.findProperty('buildVersion') ?: '1.0-SNAPSHOT'
def header = project.findProperty('header').toString() ?: 'Octopus release management gradle plugin'
def implLoggingCore = project.findProperty('implLoggingCore').toString() ?: ''
def dockerRegestry = project.findProperty('dockerRegestry').toString() ?: 'registry.hub.docker.com'
def dockerRegistry = project.findProperty('docker.registry').toString() ?: 'registry.hub.docker.com'
def golangCommons = project.findProperty('golangCommons').toString() ?: 'com.example.golang.commons:commons:1.0.0:@zip'
def repositoryUrl = project.findProperty('repositoryUrl').toString() ?: 'https://example.com'

Expand All @@ -16,9 +17,10 @@ repositories {
}

asciidoctorj {
attributes 'version-label': version,
attributes 'header': header,
'version-label': version,
'impl-logging-core': implLoggingCore,
'docker-regestry': dockerRegestry,
'docker-registry': dockerRegistry,
'golang-commons': golangCommons,
'repository-url': repositoryUrl
}
Expand Down Expand Up @@ -55,9 +57,10 @@ tasks.register('publishToWiki', DockerTask) {
"PUBLISHING_STRATEGY" : "REPLACE_ANCESTOR",
"ORPHAN_REMOVAL_STRATEGY": "KEEP_ORPHANS",
"NOTIFY_WATCHERS" : "false",
"ATTRIBUTES" : "{\"version-label\": \"$version\", " +
"ATTRIBUTES" : "{\"header\": \"$header\", " +
"\"version-label\": \"$version\", " +
"\"impl-logging-core\":\"${deQuoted(implLoggingCore).replaceAll('"','\\\\"')}\"," +
"\"docker-regestry\":\"$dockerRegestry\"," +
"\"docker-registry\":\"$dockerRegistry\"," +
"\"golang-commons\":\"$golangCommons\"," +
"\"repository-url\":\"$repositoryUrl\"}",
"PUBLISHING_STRATEGY" : "REPLACE_ANCESTOR",
Expand Down
23 changes: 12 additions & 11 deletions docs/src/docs/asciidoc/release-management-gradle-plugin.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= Octopus release management gradle plugin
:header: Octopus Release Management Gradle plugin
= {header}
Gradle
v: New hope
:toc:
Expand Down Expand Up @@ -187,7 +188,7 @@ The gradle build step on TeamCity build configuration has to be configured to us

image::images/teamcity-configure-gradle-wrapper.png[TeamCity build configuration gradle wrapper settings]

=== Use OW Release Management gradle plugin
=== Use Octopus Release Management gradle plugin

==== The plugins DSL

Expand All @@ -212,7 +213,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 +231,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 +241,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 +494,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 +505,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 Expand Up @@ -626,7 +627,7 @@ ext {
}
platformDockerWrapper {
image = '{docker-regestry}/platform/go-build:1.1.7'
image = '{docker-registry}/platform/go-build:1.1.7'
workDir = '/buildDir'
dockerOptions = ['--network', 'host']
bindMounts = ["$rootDir:/project/src/${repository}.git", "$buildDir:/buildDir", "$buildDir/deps/:/deps", "$buildDir/go-cache:/.cache"]
Expand Down Expand Up @@ -662,7 +663,7 @@ ext {
}
platformDockerWrapper {
image = '{docker-regestry}/platform/go-build:1.1.7'
image = '{docker-registry}/platform/go-build:1.1.7'
workDir = '/buildDir'
dockerOptions = ['--network', 'host']
bindMounts = ["$rootDir:/project/src/${repository}.git", "$buildDir:/buildDir", "$buildDir/deps/:/deps", "$buildDir/go-cache:/.cache"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,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 +46,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 +66,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 +77,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())
.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
Loading

0 comments on commit 5332562

Please sign in to comment.