Add step for version to release-checkstyle
Add an optional step to use maven version plugin
Change-Id: Ia174dc86fff30bd814fc4a083eda08e75bfa5378
Issue-ID: CLAMP-57
Signed-off-by: JulienBe <jb379x@att.com>
diff --git a/jjb/aaf/aaf-authz-docker.yaml b/jjb/aaf/aaf-authz-docker.yaml
index d3e75b4..609aab3 100644
--- a/jjb/aaf/aaf-authz-docker.yaml
+++ b/jjb/aaf/aaf-authz-docker.yaml
@@ -11,6 +11,7 @@
- docker.pull.registry=nexus3.onap.org:10001
- docker.push.registry=nexus3.onap.org:10003
- '{project-name}-{stream}-release-java-daily-checkstyle':
+ setVersion: 'DontSetVersion'
mvn_properties:
- skipDockerBuild=true
- skipDockerTag=true
diff --git a/jjb/clamp/clamp.yaml b/jjb/clamp/clamp.yaml
index d5b04fe..da9bc25 100644
--- a/jjb/clamp/clamp.yaml
+++ b/jjb/clamp/clamp.yaml
@@ -10,6 +10,7 @@
- docker.pull.registry=nexus3.onap.org:10001
- docker.push.registry=nexus3.onap.org:10003
- '{project-name}-{stream}-release-java-daily-checkstyle':
+ setVersion: 'DoSetVersion'
mvn_properties:
- skipDockerBuild=true
- skipDockerTag=true
diff --git a/jjb/global-templates-java.yaml b/jjb/global-templates-java.yaml
index 5e69145..adfd371 100644
--- a/jjb/global-templates-java.yaml
+++ b/jjb/global-templates-java.yaml
@@ -477,6 +477,22 @@
- provide-maven-settings:
global-settings-file: 'global-settings'
settings-file: '{mvn-settings}'
+ - conditional-step:
+ condition-kind: regex-match
+ regex: DoSetVersion
+ label: '{setVersion}'
+ steps:
+ - inject:
+ properties-file: version.properties
+ - maven-target:
+ maven-version: '{maven-version}'
+ goals: 'versions:set versions:update-child-modules versions:commit -B'
+ properties:
+ - 'newVersion=${{release_version}}'
+ settings: '{mvn-settings}'
+ settings-type: cfp
+ global-settings: 'global-settings'
+ global-settings-type: cfp
- maven-target:
maven-version: '{maven-version}'
goals: 'clean deploy sonar:sonar -Dsonar.host.url=${{SONAR}} -B