diff options
-rw-r--r-- | jjb/dcae/dcae-controller-analytics.yaml | 2 | ||||
-rw-r--r-- | jjb/dcae/dcae-controller.yaml | 2 | ||||
-rw-r--r-- | jjb/dcae/dcae-operation-utils.yaml | 2 | ||||
-rw-r--r-- | jjb/global-templates-java.yaml | 140 | ||||
-rw-r--r-- | jjb/include-update-pom-versions.sh | 28 | ||||
-rw-r--r-- | jjb/ncomp/ncomp-cdap.yaml | 2 | ||||
-rw-r--r-- | jjb/ncomp/ncomp-core.yaml | 2 | ||||
-rw-r--r-- | jjb/ncomp/ncomp-docker.yaml | 2 | ||||
-rw-r--r-- | jjb/ncomp/ncomp-maven.yaml | 2 | ||||
-rw-r--r-- | jjb/ncomp/ncomp-openstack.yaml | 2 | ||||
-rw-r--r-- | jjb/ncomp/ncomp-sirius-manager.yaml | 2 | ||||
-rw-r--r-- | jjb/ncomp/ncomp-utils.yaml | 5 |
12 files changed, 179 insertions, 12 deletions
diff --git a/jjb/dcae/dcae-controller-analytics.yaml b/jjb/dcae/dcae-controller-analytics.yaml index 8b20f01f8..18f0cc076 100644 --- a/jjb/dcae/dcae-controller-analytics.yaml +++ b/jjb/dcae/dcae-controller-analytics.yaml @@ -9,7 +9,7 @@ jobs: - '{project-name}-{stream}-{subproject}-verify-java' - '{project-name}-{stream}-{subproject}-merge-java' - - '{project-name}-{stream}-{subproject}-release-java-daily' + - '{project-name}-{stream}-{subproject}-release-version2-java-daily' project: 'dcae/controller/analytics' stream: diff --git a/jjb/dcae/dcae-controller.yaml b/jjb/dcae/dcae-controller.yaml index 176821b36..bddf1eeb9 100644 --- a/jjb/dcae/dcae-controller.yaml +++ b/jjb/dcae/dcae-controller.yaml @@ -5,7 +5,7 @@ jobs: - '{project-name}-{stream}-verify-java' - '{project-name}-{stream}-merge-java' - - '{project-name}-{stream}-release-java-daily' + - '{project-name}-{stream}-release-version2-java-daily' project: 'dcae/controller' stream: diff --git a/jjb/dcae/dcae-operation-utils.yaml b/jjb/dcae/dcae-operation-utils.yaml index 035ee4a84..ffbd9ca33 100644 --- a/jjb/dcae/dcae-operation-utils.yaml +++ b/jjb/dcae/dcae-operation-utils.yaml @@ -9,7 +9,7 @@ jobs: - '{project-name}-{stream}-{subproject}-verify-java' - '{project-name}-{stream}-{subproject}-merge-java' - - '{project-name}-{stream}-{subproject}-release-java-daily' + - '{project-name}-{stream}-{subproject}-release-version2-java-daily' project: 'dcae/operation/utils' stream: diff --git a/jjb/global-templates-java.yaml b/jjb/global-templates-java.yaml index 7b173e9ba..3560ec490 100644 --- a/jjb/global-templates-java.yaml +++ b/jjb/global-templates-java.yaml @@ -709,3 +709,143 @@ - docker.push.registry=nexus3.openecomp.org:10003 - shell: !include-raw: include-docker-push.sh + +- job-template: + # Job template for Java daily release jobs + # + # The purpose of this job template is to run + # - change version in all POM files to the release version specified + # in version.properties. This is done using a script instread of + # the mvn version plugin that assumes some specific parent structure. + # - runs maven clean deploy sonar + # + # The POM files are required to use the Maven staging plugin so the deploy + # does not deploy directly to the release repo. + # + # Required Variables: + # branch: git branch (eg. stable/lithium or master) + name: '{project-name}-{stream}-release-version2-java-daily' + + project-type: freestyle + node: '{build-node}' + maven-deploy-properties: + properties: + - ecomp-infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - ecomp-infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + + wrappers: + - ecomp-infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + # 11 AM UTC + - timed: 'H 11 * * *' + - gerrit-trigger-release-manually: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + + builders: + - provide-maven-settings: + global-settings-file: 'global-settings' + settings-file: '{mvn-settings}' + + - inject: + properties-file: version.properties + + - shell: !include-raw-escape: include-update-pom-versions.sh + + - maven-target: + maven-version: 'mvn33' + goals: 'clean deploy sonar:sonar -Dsonar.host.url=https://sonar.openecomp.org' + properties: + - '{maven-deploy-properties}' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + +- job-template: + # Job template for Java daily release jobs + # + # The purpose of this job template is to run + # - change version in all POM files to the release version specified + # in version.properties. This is done using a script instread of + # the mvn version plugin that assumes some specific parent structure. + # - runs maven clean deploy sonar + # + # The POM files are required to use the Maven staging plugin so the deploy + # does not deploy directly to the release repo. + # + # Required Variables: + # branch: git branch (eg. stable/lithium or master) + # pom: name/location of the pom.xml file relative to the workspace + # pattern: ant file-path pattern relative to the workspace used to + # trigger the job + + name: '{project-name}-{stream}-{subproject}-release-version2-java-daily' + + project-type: freestyle + node: '{build-node}' + maven-deploy-properties: + properties: + - ecomp-infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - ecomp-infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + + wrappers: + - ecomp-infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + # 11 AM UTC + - timed: 'H 11 * * *' + - gerrit-trigger-release-manually: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + files: '{pattern}' + + builders: + - provide-maven-settings: + global-settings-file: 'global-settings' + settings-file: '{mvn-settings}' + + - inject: + properties-file: version.properties + + - shell: !include-raw-escape: include-update-pom-versions.sh + + - maven-target: + maven-version: 'mvn33' + pom: '{pom}' + goals: 'clean deploy sonar:sonar -Dsonar.host.url=https://sonar.openecomp.org' + properties: + - '{maven-deploy-properties}' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp diff --git a/jjb/include-update-pom-versions.sh b/jjb/include-update-pom-versions.sh new file mode 100644 index 000000000..0e269a2af --- /dev/null +++ b/jjb/include-update-pom-versions.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +## Will update POM in workspace with release version + +if [ ! -e version.properties ]; then + echo "Missing version.properties" + exit 1 +fi + +## will setup variable release_version +source ./version.properties + +VERSION=$release_version + +## handle POM files with no parent +for file in $(find . -name pom.xml); do + if [ "$(grep -c '<parent>' $file)" == "0" ]; then + ( + cd $(dirname $file) + ${MVN} versions:set versions:commit \ + -DnewVersion=$VERSION \ + -DprocessDependencies=false + ) + fi +done + +find . -name pom.xml.versionsBackup -delete + diff --git a/jjb/ncomp/ncomp-cdap.yaml b/jjb/ncomp/ncomp-cdap.yaml index 6b3f4f74e..b3d0111c0 100644 --- a/jjb/ncomp/ncomp-cdap.yaml +++ b/jjb/ncomp/ncomp-cdap.yaml @@ -5,7 +5,7 @@ jobs: - '{project-name}-{stream}-verify-java' - '{project-name}-{stream}-merge-java' - - '{project-name}-{stream}-release-java-daily' + - '{project-name}-{stream}-release-version2-java-daily' project: 'ncomp/cdap' stream: diff --git a/jjb/ncomp/ncomp-core.yaml b/jjb/ncomp/ncomp-core.yaml index 675e7ad67..b218dfe02 100644 --- a/jjb/ncomp/ncomp-core.yaml +++ b/jjb/ncomp/ncomp-core.yaml @@ -5,7 +5,7 @@ jobs: - '{project-name}-{stream}-verify-java' - '{project-name}-{stream}-merge-java' - - '{project-name}-{stream}-release-java-daily' + - '{project-name}-{stream}-release-version2-java-daily' project: 'ncomp/core' stream: diff --git a/jjb/ncomp/ncomp-docker.yaml b/jjb/ncomp/ncomp-docker.yaml index 6603b16ad..9859c09b5 100644 --- a/jjb/ncomp/ncomp-docker.yaml +++ b/jjb/ncomp/ncomp-docker.yaml @@ -5,7 +5,7 @@ jobs: - '{project-name}-{stream}-verify-java' - '{project-name}-{stream}-merge-java' - - '{project-name}-{stream}-release-java-daily' + - '{project-name}-{stream}-release-version2-java-daily' project: 'ncomp/docker' stream: diff --git a/jjb/ncomp/ncomp-maven.yaml b/jjb/ncomp/ncomp-maven.yaml index 2bc55d425..7600d65ab 100644 --- a/jjb/ncomp/ncomp-maven.yaml +++ b/jjb/ncomp/ncomp-maven.yaml @@ -5,7 +5,7 @@ jobs: - '{project-name}-{stream}-verify-java' - '{project-name}-{stream}-merge-java' - - '{project-name}-{stream}-release-java-daily' + - '{project-name}-{stream}-release-version2-java-daily' project: 'ncomp/maven' stream: diff --git a/jjb/ncomp/ncomp-openstack.yaml b/jjb/ncomp/ncomp-openstack.yaml index e2a02074d..e7da94855 100644 --- a/jjb/ncomp/ncomp-openstack.yaml +++ b/jjb/ncomp/ncomp-openstack.yaml @@ -5,7 +5,7 @@ jobs: - '{project-name}-{stream}-verify-java' - '{project-name}-{stream}-merge-java' - - '{project-name}-{stream}-release-java-daily' + - '{project-name}-{stream}-release-version2-java-daily' project: 'ncomp/openstack' stream: diff --git a/jjb/ncomp/ncomp-sirius-manager.yaml b/jjb/ncomp/ncomp-sirius-manager.yaml index f33fa95b2..ec956462a 100644 --- a/jjb/ncomp/ncomp-sirius-manager.yaml +++ b/jjb/ncomp/ncomp-sirius-manager.yaml @@ -5,7 +5,7 @@ jobs: - '{project-name}-{stream}-verify-java' - '{project-name}-{stream}-merge-java' - - '{project-name}-{stream}-release-java-daily' + - '{project-name}-{stream}-release-version2-java-daily' project: 'ncomp/sirius/manager' stream: diff --git a/jjb/ncomp/ncomp-utils.yaml b/jjb/ncomp/ncomp-utils.yaml index 0efcb1f45..9bfc4ca37 100644 --- a/jjb/ncomp/ncomp-utils.yaml +++ b/jjb/ncomp/ncomp-utils.yaml @@ -4,9 +4,8 @@ project-name: 'ncomp-utils' jobs: - '{project-name}-{stream}-verify-java' - - '{project-name}-{stream}-downstream-merge-java': - dependencies: 'ncomp-master-merge-java' - - '{project-name}-{stream}-release-java-daily' + - '{project-name}-{stream}-merge-java': + - '{project-name}-{stream}-release-version2-java-daily' project: 'ncomp/utils' stream: |