X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=jjb%2Fglobal-templates-java.yaml;h=ef91f81820face2e9cf8ffd1c4a8a1e6c033f777;hb=f5354a3e80a99236f4fcc60a361d673f217d5089;hp=a47ff00c27c9f389b03b1207b8a34c73cc1fa29f;hpb=014a81232fc1fc72b06eee33fecbe98fbbec70ef;p=ci-management.git diff --git a/jjb/global-templates-java.yaml b/jjb/global-templates-java.yaml index a47ff00c2..ef91f8182 100644 --- a/jjb/global-templates-java.yaml +++ b/jjb/global-templates-java.yaml @@ -2,8 +2,8 @@ - job-template: # Job template for Java verify jobs # - # The purpose of this job template is to run "maven clean install" for - # projects using this template. + # The purpose of this job template is to run: + # 1. maven clean install -DskipTests=true # # Required Variables: # branch: git branch (eg. stable/lithium or master) @@ -15,11 +15,11 @@ node: '{build-node}' properties: - - ecomp-infra-properties: + - infra-properties: build-days-to-keep: '{build-days-to-keep}' parameters: - - ecomp-infra-parameters: + - infra-parameters: project: '{project}' branch: '{branch}' refspec: 'refs/heads/{branch}' @@ -31,9 +31,10 @@ - gerrit-trigger-scm: refspec: '$GERRIT_REFSPEC' choosing-strategy: 'gerrit' + submodule-recursive: '{submodule-recursive}' wrappers: - - ecomp-infra-wrappers: + - infra-wrappers: build-timeout: '{build-timeout}' triggers: @@ -49,7 +50,8 @@ settings-file: '{mvn-settings}' - maven-target: maven-version: '{maven-version}' - goals: 'clean install -DskipTests=true' + goals: 'clean install -DskipTests=true -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' settings: '{mvn-settings}' settings-type: cfp global-settings: 'global-settings' @@ -57,16 +59,15 @@ maven-opts: - maven.test.skip=true -# publishers: -# - ecomp-infra-shiplogs: -# maven-version: '{maven-version}' - + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' - job-template: # Job template for Java verify jobs # - # The purpose of this job template is to run "maven clean install" for - # projects using this template. + # The purpose of this job template is to run: + # 1. maven clean install # # Required Variables: # branch: git branch (eg. stable/lithium or master) @@ -78,25 +79,28 @@ node: '{build-node}' properties: - - ecomp-infra-properties: + - infra-properties: build-days-to-keep: '{build-days-to-keep}' parameters: - - ecomp-infra-parameters: + - infra-parameters: project: '{project}' branch: '{branch}' refspec: 'refs/heads/{branch}' artifacts: '{archive-artifacts}' - maven-exec: maven-version: '{maven-version}' + - maven-params: + mvn-params: '{mvn-params}' scm: - gerrit-trigger-scm: refspec: '$GERRIT_REFSPEC' choosing-strategy: 'gerrit' + submodule-recursive: '{submodule-recursive}' wrappers: - - ecomp-infra-wrappers: + - infra-wrappers: build-timeout: '{build-timeout}' triggers: @@ -112,99 +116,99 @@ settings-file: '{mvn-settings}' - maven-target: maven-version: '{maven-version}' - goals: 'clean install' + goals: 'clean install -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn {mvn-params}' settings: '{mvn-settings}' settings-type: cfp global-settings: 'global-settings' global-settings-type: cfp -# publishers: -# - ecomp-infra-shiplogs: -# maven-version: '{maven-version}' + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' - job-template: - # Job template for Java verify jobs with POM not at the root + # Job template for Java verify jobs running checkstyle at the end + # When checkstyle will be fully incorporated, it is meant to replace + # '{project-name}-{stream}-verify-java-checkstyle' # - # The purpose of this job template is to run "maven clean install" for - # projects using this template. + # The purpose of this job template is to run: + # 1. maven clean install + # + # This job publishes checkstyle results. # # 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}-verify-java' + name: '{project-name}-{stream}-verify-java-checkstyle' project-type: freestyle concurrent: true node: '{build-node}' - properties: - - ecomp-infra-properties: + - infra-properties: build-days-to-keep: '{build-days-to-keep}' - parameters: - - ecomp-infra-parameters: + - infra-parameters: project: '{project}' branch: '{branch}' refspec: 'refs/heads/{branch}' artifacts: '{archive-artifacts}' - maven-exec: maven-version: '{maven-version}' - + - maven-params: + mvn-params: '{mvn-params}' scm: - gerrit-trigger-scm: refspec: '$GERRIT_REFSPEC' choosing-strategy: 'gerrit' - + submodule-recursive: '{submodule-recursive}' wrappers: - - ecomp-infra-wrappers: + - infra-wrappers: build-timeout: '{build-timeout}' - triggers: - gerrit-trigger-patch-submitted: server: '{server-name}' project: '{project}' branch: '{branch}' - files: '{pattern}' - + files: '**' builders: - provide-maven-settings: global-settings-file: 'global-settings' settings-file: '{mvn-settings}' - maven-target: maven-version: '{maven-version}' - pom: '{pom}' - goals: 'clean install' + goals: 'clean install -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn {mvn-params}' settings: '{mvn-settings}' settings-type: cfp global-settings: 'global-settings' global-settings-type: cfp - -# publishers: -# - ecomp-infra-shiplogs: -# maven-version: '{maven-version}' + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + - checkstyle-result - job-template: - # Job template for Java daily release jobs + # Job template for Java verify jobs that takes a maven template # - # The purpose of this job template is to run "maven version && maven clean - # deploy" for projects using this template. + # The purpose of this job template is to run: + # 1. maven clean install -P {mvn-profile} # # Required Variables: # branch: git branch (eg. stable/lithium or master) - name: '{project-name}-{stream}-release-java-daily' + + name: '{project-name}-{stream}-verify-profile-java' project-type: freestyle + concurrent: true node: '{build-node}' - maven-deploy-properties: + properties: - - ecomp-infra-properties: + - infra-properties: build-days-to-keep: '{build-days-to-keep}' parameters: - - ecomp-infra-parameters: + - infra-parameters: project: '{project}' branch: '{branch}' refspec: 'refs/heads/{branch}' @@ -214,55 +218,64 @@ scm: - gerrit-trigger-scm: - refspec: '' - choosing-strategy: 'default' + refspec: '$GERRIT_REFSPEC' + choosing-strategy: 'gerrit' + submodule-recursive: '{submodule-recursive}' wrappers: - - ecomp-infra-wrappers: + - infra-wrappers: build-timeout: '{build-timeout}' triggers: - # 11 AM UTC - - timed: 'H 11 * * *' - - gerrit-trigger-release-manually: + - gerrit-trigger-patch-submitted: server: '{server-name}' project: '{project}' branch: '{branch}' + files: '{files}' builders: - provide-maven-settings: global-settings-file: 'global-settings' settings-file: '{mvn-settings}' - - maven-target: maven-version: '{maven-version}' - goals: 'clean deploy sonar:sonar -Dsonar.host.url=${{SONAR}}' - properties: - - '{maven-deploy-properties}' + goals: 'clean install -P {mvn-profile} -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' settings: '{mvn-settings}' settings-type: cfp global-settings: 'global-settings' global-settings-type: cfp + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + - job-template: - # Job template for Java daily release jobs + # Job template for Java verify jobs with POM not at the root # - # The purpose of this job template is to run "maven version && maven clean - # deploy" for projects using this template. + # The purpose of this job template is to run: + # 1. maven clean install + # + # This job supports subprojects. # # Required Variables: # branch: git branch (eg. stable/lithium or master) - name: '{project-name}-{stream}-release-version-java-daily' + # 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}-verify-java' project-type: freestyle + concurrent: true node: '{build-node}' - maven-deploy-properties: + properties: - - ecomp-infra-properties: + - infra-properties: build-days-to-keep: '{build-days-to-keep}' parameters: - - ecomp-infra-parameters: + - infra-parameters: project: '{project}' branch: '{branch}' refspec: 'refs/heads/{branch}' @@ -272,70 +285,60 @@ scm: - gerrit-trigger-scm: - refspec: '' - choosing-strategy: 'default' + refspec: '$GERRIT_REFSPEC' + choosing-strategy: 'gerrit' + submodule-recursive: '{submodule-recursive}' wrappers: - - ecomp-infra-wrappers: + - infra-wrappers: build-timeout: '{build-timeout}' triggers: - # 11 AM UTC - - timed: 'H 11 * * *' - - gerrit-trigger-release-manually: + - gerrit-trigger-patch-submitted: 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 - maven-target: maven-version: '{maven-version}' - goals: 'versions:set versions:update-child-modules versions:commit' - properties: - - 'newVersion=${{release_version}}' + pom: '{pom}' + goals: 'clean install -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' settings: '{mvn-settings}' settings-type: cfp global-settings: 'global-settings' global-settings-type: cfp - - maven-target: + publishers: + - infra-shiplogs: maven-version: '{maven-version}' - goals: 'clean deploy sonar:sonar -Dsonar.host.url=${{SONAR}}' - 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 with POM not at the root + # Job template for Java daily release jobs # - # The purpose of this job template is to run "maven version && maven clean - # deploy" for projects using this template. + # The purpose of this job template is to run: + # 1. maven clean deploy with Sonar scans # # Required Variables: # branch: git branch (eg. stable/lithium or master) - # pom: name/location of the pom.xml file relative to the workspace - - name: '{project-name}-{stream}-{subproject}-release-java-daily' + name: '{project-name}-{stream}-release-java-daily' project-type: freestyle node: '{build-node}' + disabled: '{disabled}' maven-deploy-properties: properties: - - ecomp-infra-properties: + - infra-properties: build-days-to-keep: '{build-days-to-keep}' parameters: - - ecomp-infra-parameters: + - infra-parameters: project: '{project}' branch: '{branch}' refspec: 'refs/heads/{branch}' @@ -347,9 +350,10 @@ - gerrit-trigger-scm: refspec: '' choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' wrappers: - - ecomp-infra-wrappers: + - infra-wrappers: build-timeout: '{build-timeout}' triggers: @@ -367,95 +371,122 @@ - maven-target: maven-version: '{maven-version}' - pom: '{pom}' - goals: 'clean deploy sonar:sonar -Dsonar.host.url=${{SONAR}}' + goals: 'clean deploy -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' properties: - '{maven-deploy-properties}' + java-opts: + - '-Xmx4096m -XX:MaxPermSize=512m' settings: '{mvn-settings}' settings-type: cfp global-settings: 'global-settings' global-settings-type: cfp + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + - job-template: - # Job template for Java merge jobs + # Job template for Java daily release jobs running checkstyle at the end + # When checkstyle will be fully incorporated, it is meant to replace + # '{project-name}-{stream}-release-java-daily' # - # The purpose of this job template is to run "maven clean deploy" for - # projects using this template. + # The purpose of this job template is to run: + # 1. maven clean deploy with Sonar scans + # + # This job publishes checkstyle results. + # This job uses a conditional regex match step to set versions. # # Required Variables: # branch: git branch (eg. stable/lithium or master) - name: '{project-name}-{stream}-merge-java' + name: '{project-name}-{stream}-release-java-daily-checkstyle' project-type: freestyle node: '{build-node}' - + disabled: '{disabled}' + maven-deploy-properties: properties: - - ecomp-infra-properties: + - infra-properties: build-days-to-keep: '{build-days-to-keep}' - parameters: - - ecomp-infra-parameters: + - infra-parameters: project: '{project}' branch: '{branch}' refspec: 'refs/heads/{branch}' artifacts: '{archive-artifacts}' - maven-exec: maven-version: '{maven-version}' - scm: - gerrit-trigger-scm: refspec: '' choosing-strategy: 'default' - + submodule-recursive: '{submodule-recursive}' wrappers: - - ecomp-infra-wrappers: + - infra-wrappers: build-timeout: '{build-timeout}' - triggers: - - gerrit-trigger-patch-merged: + # 11 AM UTC + - timed: 'H 11 * * *' + - gerrit-trigger-release-manually: server: '{server-name}' project: '{project}' branch: '{branch}' - files: '**' - builders: - 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}' - # yamllint disable rule:line-length - goals: 'clean deploy' - # yamllint enable + goals: 'clean deploy -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' + properties: '{obj:mvn_properties}' settings: '{mvn-settings}' settings-type: cfp global-settings: 'global-settings' global-settings-type: cfp - -# publishers: -# - ecomp-infra-shiplogs: -# maven-version: '{maven-version}' + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + - checkstyle-result-daily - job-template: - # Job template for Java merge jobs that should also be triggered by upstream - # merges + # Job template for Java daily release jobs + # + # The purpose of this job template is to run: + # 1. maven set versions + # 2. maven clean deploy with Sonar scans # # Required Variables: - # stream: release stream - # branch: git branch - # dependencies: fully qualified upstream job name to trigger on - # this may be '' - name: '{project-name}-{stream}-downstream-merge-java' + # branch: git branch (eg. stable/lithium or master) + + name: '{project-name}-{stream}-release-version-java-daily' project-type: freestyle + disabled: '{disabled}' node: '{build-node}' - + maven-deploy-properties: properties: - - ecomp-infra-properties: + - infra-properties: build-days-to-keep: '{build-days-to-keep}' parameters: - - ecomp-infra-parameters: + - infra-parameters: project: '{project}' branch: '{branch}' refspec: 'refs/heads/{branch}' @@ -467,62 +498,74 @@ - gerrit-trigger-scm: refspec: '' choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' wrappers: - - ecomp-infra-wrappers: + - infra-wrappers: build-timeout: '{build-timeout}' triggers: - - reverse: - jobs: '{dependencies}' - result: 'success' - - gerrit-trigger-patch-merged: + # 11 AM UTC + - timed: 'H H(10-17) * * *' + - gerrit-trigger-release-manually: server: '{server-name}' project: '{project}' branch: '{branch}' - files: '**' builders: - provide-maven-settings: global-settings-file: 'global-settings' settings-file: '{mvn-settings}' + + - 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}' - # yamllint disable rule:line-length - goals: 'clean deploy' - # yamllint enable + goals: 'clean deploy -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' + properties: + - '{maven-deploy-properties}' settings: '{mvn-settings}' settings-type: cfp global-settings: 'global-settings' global-settings-type: cfp -# publishers: -# - ecomp-infra-shiplogs: -# maven-version: '{maven-version}' + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' - job-template: - # Job template for Java merge jobs with POM not at the root + # Job template for Java daily release jobs # - # The purpose of this job template is to run "maven clean deploy" for - # projects using this template. + # The purpose of this job template is to run: + # 1. maven set versions + # 2. maven clean deploy -P {mvn-profile} with Sonar scans # # 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}-merge-java' + name: '{project-name}-{stream}-release-version-profile-java-daily' project-type: freestyle node: '{build-node}' - + disabled: '{disabled}' + maven-deploy-properties: properties: - - ecomp-infra-properties: + - infra-properties: build-days-to-keep: '{build-days-to-keep}' parameters: - - ecomp-infra-parameters: + - infra-parameters: project: '{project}' branch: '{branch}' refspec: 'refs/heads/{branch}' @@ -534,48 +577,77 @@ - gerrit-trigger-scm: refspec: '' choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' wrappers: - - ecomp-infra-wrappers: + - infra-wrappers: build-timeout: '{build-timeout}' triggers: - - gerrit-trigger-patch-merged: + # 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 - maven-target: maven-version: '{maven-version}' - pom: '{pom}' - # yamllint disable rule:line-length - goals: 'clean deploy' - # yamllint enable + 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 -P {mvn-profile} -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' + properties: + - '{maven-deploy-properties}' settings: '{mvn-settings}' settings-type: cfp global-settings: 'global-settings' global-settings-type: cfp -# publishers: -# - ecomp-infra-shiplogs: -# maven-version: '{maven-version}' + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + - job-template: - name: '{project-name}-{stream}-docker-java-daily' - project-type: freestyle - node: 'ubuntu1604-docker-8c-8g' + # Job template for Java daily release jobs with POM not at the root + # + # The purpose of this job template is to run: + # 1. maven clean deploy with Sonar scans + # + # This job supports subprojects. + # + # Required Variables: + # branch: git branch (eg. stable/lithium or master) + # pom: name/location of the pom.xml file relative to the workspace + name: '{project-name}-{stream}-{subproject}-release-java-daily' + + project-type: freestyle + node: '{build-node}' + disabled: '{disabled}' + maven-deploy-properties: properties: - - ecomp-infra-properties: + - infra-properties: build-days-to-keep: '{build-days-to-keep}' parameters: - - ecomp-infra-parameters: + - infra-parameters: project: '{project}' branch: '{branch}' refspec: 'refs/heads/{branch}' @@ -587,45 +659,68 @@ - gerrit-trigger-scm: refspec: '' choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' wrappers: - - ecomp-infra-wrappers: + - infra-wrappers: build-timeout: '{build-timeout}' triggers: - # 12 AM UTC - - timed: 'H 12 * * *' + # 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}' - - docker-login + - maven-target: + maven-version: '{maven-version}' + pom: '{pom}' + goals: 'clean deploy -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' + properties: + - '{maven-deploy-properties}' + java-opts: + - '-Xmx4096m -XX:MaxPermSize=512m' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp - - maven-docker-push-daily: + publishers: + - infra-shiplogs: maven-version: '{maven-version}' - mvn-settings: '{mvn-settings}' - pom: '{docker-pom}' - # use default as mvn-profile if profile is not needed - mvn-profile: '{mvn-profile}' - job-template: - name: '{project-name}-{stream}-docker-java-shell-daily' - project-type: freestyle - node: 'ubuntu1604-docker-8c-8g' + # Job template for Java daily release jobs with POM not at the root + # + # The purpose of this job template is to run: + # 1. maven set versions + # 2. maven clean deploy with Sonar scans + # + # This job supports subprojects. + # + # Required Variables: + # branch: git branch (eg. stable/lithium or master) + # pom: name/location of the pom.xml file relative to the workspace + + name: '{project-name}-{stream}-{subproject}-release-version-java-daily' + project-type: freestyle + node: '{build-node}' + disabled: '{disabled}' + maven-deploy-properties: properties: - - ecomp-infra-properties: + - infra-properties: build-days-to-keep: '{build-days-to-keep}' parameters: - - ecomp-infra-parameters: + - infra-parameters: project: '{project}' branch: '{branch}' refspec: 'refs/heads/{branch}' @@ -637,48 +732,79 @@ - gerrit-trigger-scm: refspec: '' choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' wrappers: - - ecomp-infra-wrappers: + - infra-wrappers: build-timeout: '{build-timeout}' triggers: - # 12 AM UTC - - timed: 'H 12 * * *' + # 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}' - - docker-login + - inject: + properties-file: version.properties + - maven-target: + maven-version: '{maven-version}' + pom: '{pom}' + 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: '{mvn-goals}' + pom: '{pom}' + goals: 'clean deploy -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' + properties: + - '{maven-deploy-properties}' settings: '{mvn-settings}' settings-type: cfp global-settings: 'global-settings' global-settings-type: cfp - - shell: '{script}' + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' - job-template: - name: '{project-name}-{stream}-docker-version-java-daily' - project-type: freestyle - node: 'ubuntu1604-docker-8c-8g' + # Job template for Java daily release jobs with POM not at the root + # + # The purpose of this job template is to run: + # 1. maven set versions + # 2. maven clean deploy with Sonar scans + # + # This job supports subprojects. + # + # Required Variables: + # branch: git branch (eg. stable/lithium or master) + # pom: name/location of the pom.xml file relative to the workspace + name: '{project-name}-{stream}-{subproject}-release-version-java-shell-daily' + + project-type: freestyle + node: '{build-node}' + disabled: '{disabled}' + maven-deploy-properties: properties: - - ecomp-infra-properties: + - infra-properties: build-days-to-keep: '{build-days-to-keep}' parameters: - - ecomp-infra-parameters: + - infra-parameters: project: '{project}' branch: '{branch}' refspec: 'refs/heads/{branch}' @@ -690,14 +816,1048 @@ - gerrit-trigger-scm: refspec: '' choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' wrappers: - - ecomp-infra-wrappers: + - infra-wrappers: build-timeout: '{build-timeout}' triggers: - # 12 AM UTC - - timed: 'H 12 * * *' + # 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 + - maven-target: + maven-version: '{maven-version}' + pom: '{pom}' + 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 + + - shell: '{script}' + + - maven-target: + maven-version: '{maven-version}' + pom: '{pom}' + goals: 'clean deploy sonar:sonar -Dsonar.host.url=${{SONAR}} -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' + properties: + - '{maven-deploy-properties}' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + +- job-template: + # Job template for Java merge jobs + # + # The purpose of this job template is to run: + # 1. maven clean deploy + # + # Required Variables: + # branch: git branch (eg. stable/lithium or master) + + name: '{project-name}-{stream}-merge-java' + + project-type: freestyle + node: '{build-node}' + + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - gerrit-trigger-patch-merged: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + files: '**' + + builders: + - provide-maven-settings: + global-settings-file: 'global-settings' + settings-file: '{mvn-settings}' + - maven-target: + maven-version: '{maven-version}' + goals: 'clean deploy -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + +- job-template: + # Job template for Java merge jobs based on + # '{project-name}-{stream}-merge-java' + # The purpose of this job template is to run: + # 1. maven clean deploy + # + # This project supports maven properties. + # + # Required Variables: + # branch: git branch (eg. stable/lithium or master) + # maven-properties: properties passed to maven + + name: '{project-name}-{stream}-merge-properties-java' + + project-type: freestyle + node: '{build-node}' + + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - gerrit-trigger-patch-merged: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + files: '**' + + builders: + - provide-maven-settings: + global-settings-file: 'global-settings' + settings-file: '{mvn-settings}' + - maven-target: + maven-version: '{maven-version}' + goals: 'clean deploy -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + properties: '{obj:mvn_properties}' + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + +- job-template: + # Job template for Java merge jobs that takes a maven template + # + # The purpose of this job template is to run: + # 1. maven clean deploy -P {mvn-profile} + # + # Required Variables: + # branch: git branch (eg. stable/lithium or master) + + name: '{project-name}-{stream}-merge-profile-java' + + project-type: freestyle + node: '{build-node}' + + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - gerrit-trigger-patch-merged: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + files: '{files}' + + builders: + - provide-maven-settings: + global-settings-file: 'global-settings' + settings-file: '{mvn-settings}' + + - docker-login + + - maven-target: + maven-version: '{maven-version}' + goals: 'clean deploy -P {mvn-profile} -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + properties: + - docker.pull.registry=nexus3.onap.org:10001 + - docker.push.registry=nexus3.onap.org:10003 + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + +- job-template: + # Job template for Java merge jobs that should also be triggered by upstream + # merges + # + # Required Variables: + # stream: release stream + # branch: git branch + # dependencies: fully qualified upstream job name to trigger on + # this may be '' + + name: '{project-name}-{stream}-downstream-merge-java' + + project-type: freestyle + node: '{build-node}' + + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - reverse: + jobs: '{dependencies}' + result: 'success' + - gerrit-trigger-patch-merged: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + files: '**' + + builders: + - provide-maven-settings: + global-settings-file: 'global-settings' + settings-file: '{mvn-settings}' + - maven-target: + maven-version: '{maven-version}' + goals: 'clean deploy -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + +- job-template: + # Job template for Java merge jobs with POM not at the root + # + # The purpose of this job template is to run: + # 1. maven clean deploy + # + # This job supports subprojects. + # + # 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}-merge-java' + + project-type: freestyle + node: '{build-node}' + + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - gerrit-trigger-patch-merged: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + files: '{pattern}' + + builders: + - provide-maven-settings: + global-settings-file: 'global-settings' + settings-file: '{mvn-settings}' + - maven-target: + maven-version: '{maven-version}' + pom: '{pom}' + goals: 'clean deploy -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + +- job-template: + # Job template for Docker daily jobs + # + # The purpose of this job template is to run: + # 1. login to the docker registry + # 2. docker push + # + # Required Variables: + # branch: git branch (eg. stable/lithium or master) + + name: '{project-name}-{stream}-docker-java-daily' + id: '{project-name}-{stream}-docker-java-daily' + project-type: freestyle + node: 'ubuntu1604-docker-8c-8g' + disabled: '{disabled}' + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + - maven-params: + mvn-params: '{mvn-params}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + # 12 AM UTC + - timed: 'H 12 * * *' + - gerrit-trigger-release-manually: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + + builders: + + - provide-maven-settings: + global-settings-file: 'global-settings' + settings-file: '{mvn-settings}' + + - docker-login + + - maven-docker-push-daily: + maven-version: '{maven-version}' + mvn-settings: '{mvn-settings}' + pom: '{docker-pom}' + # use default as mvn-profile if profile is not needed + mvn-profile: '{mvn-profile}' + mvn-params: '{mvn-params}' + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + +- job-template: + # Job template for Docker daily jobs + # + # The purpose of this job template is to run: + # 1. login to the docker registry + # 2. docker push + # + # Required Variables: + # branch: git branch (eg. stable/lithium or master) + + name: '{project-name}-{stream}-docker-java-daily' + id: docker-java-daily + project-type: freestyle + node: '{build-node}' + disabled: '{disabled}' + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + - maven-params: + mvn-params: '{mvn-params}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - infra-wrappers-docker-build: + build-timeout: '{build-timeout}' + + triggers: + # 12 AM UTC + - timed: 'H 12 * * *' + - gerrit-trigger-release-manually: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + + builders: + + - provide-maven-settings: + global-settings-file: 'global-settings' + settings-file: '{mvn-settings}' + + - docker-login + + - maven-docker-push-daily: + maven-version: '{maven-version}' + mvn-settings: '{mvn-settings}' + pom: '{docker-pom}' + # use default as mvn-profile if profile is not needed + mvn-profile: '{mvn-profile}' + mvn-params: '{mvn-params}' + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + + +- job-template: + # Job template for building & pushing docker images + # + # The purpose of this job template is to run: + # 1. login to the docker registry + # 2. maven clean deploy on the specified profile + # + # This job uses a conditional regex match step to set versions. + # This template supports maven properties. + # + # Required Variables: + # pom: name/location of the pom.xml file relative to the workspace + # profile: the docker profile defined in the pom + # maven-properties: properties passed to maven + + name: '{project-name}-{stream}-docker-java-properties-daily' + project-type: freestyle + node: 'ubuntu1604-docker-8c-8g' + disabled: '{disabled}' + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + - maven-params: + mvn-params: '{mvn-params}' + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + wrappers: + - infra-wrappers: + build-timeout: '{build-timeout}' + triggers: + # 12 AM UTC + - timed: 'H 12 * * *' + - gerrit-trigger-release-manually: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + builders: + - 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 + - docker-login + - maven-docker-push-daily: + maven-version: '{maven-version}' + mvn-settings: '{mvn-settings}' + pom: '{docker-pom}' + properties: '{maven-properties}' + # use default as mvn-profile if profile is not needed + mvn-profile: '{mvn-profile}' + mvn-params: '{mvn-params}' + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + +- job-template: + # Job template for building & pushing docker images + # + # The purpose of this job template is to run: + # 1. login to the docker registry + # 2. run a specified shell builder + # + # Required Variables: + # pom: name/location of the pom.xml file relative to the workspace + # maven-properties: properties passed to maven + + name: '{project-name}-{stream}-docker-java-shell-daily' + project-type: freestyle + node: 'ubuntu1604-docker-8c-8g' + disabled: '{disabled}' + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + # 12 AM UTC + - timed: 'H 12 * * *' + - gerrit-trigger-release-manually: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + + builders: + + - provide-maven-settings: + global-settings-file: 'global-settings' + settings-file: '{mvn-settings}' + + - docker-login + + - maven-target: + maven-version: '{maven-version}' + goals: '{mvn-goals}' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + + - shell: '{script}' + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + +- job-template: + # Job template for building & pushing docker images + # + # The purpose of this job template is to run: + # 1. login to the docker registry + # 2. inject a version.properties file and set versions + # 3. run a specified shell builder + # + # Required Variables: + # pom: name/location of the pom.xml file relative to the workspace + # maven-properties: properties passed to maven + + name: '{project-name}-{stream}-docker-java-version-shell-daily' + project-type: freestyle + node: 'ubuntu1604-docker-8c-8g' + disabled: '{disabled}' + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + # 12 AM UTC + - timed: 'H 12 * * *' + - 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 + + - 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 + + - docker-login + + - maven-target: + maven-version: '{maven-version}' + goals: '{mvn-goals}' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + + - shell: '{script}' + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + +- job-template: + # Job template for building & pushing docker images + # + # The purpose of this job template is to run: + # 1. login to the docker registry + # 2. inject a version.properties file and set versions + # 3. run a specified shell builder + # + # This template supports subprojects. + # + # Required Variables: + # pom: name/location of the pom.xml file relative to the workspace + # maven-properties: properties passed to maven + + name: '{project-name}-{stream}-{subproject}-docker-java-version-shell-daily' + project-type: freestyle + node: 'ubuntu1604-docker-8c-8g' + disabled: '{disabled}' + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + # 12 AM UTC + - timed: 'H 12 * * *' + - 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 + + - maven-target: + maven-version: '{maven-version}' + pom: '{pom}' + 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 + + - docker-login + + - maven-target: + maven-version: '{maven-version}' + pom: '{pom}' + goals: '{mvn-goals}' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + + - shell: '{script}' + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + +- job-template: + # Job template for building & pushing docker images + # + # The purpose of this job template is to run: + # 1. login to the docker registry + # 2. inject a version.properties file and set versions + # 3. run a docker push + # + # Required Variables: + # pom: name/location of the pom.xml file relative to the workspace + # profile: the docker profile defined in the pom + # maven-properties: properties passed to maven + + name: '{project-name}-{stream}-docker-version-java-daily' + id: '{project-name}-{stream}-docker-version-java-daily' + project-type: freestyle + node: 'ubuntu1604-docker-8c-8g' + disabled: '{disabled}' + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + - maven-params: + mvn-params: '{mvn-params}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + # 12 AM UTC + - timed: 'H 12 * * *' + - 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 + + - 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 + + - docker-login + + - maven-docker-push-daily: + maven-version: '{maven-version}' + mvn-settings: '{mvn-settings}' + pom: '{docker-pom}' + # use default as mvn-profile if profile is not needed + mvn-profile: '{mvn-profile}' + mvn-params: '{mvn-params}' + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + +- job-template: + # Job template for building & pushing docker images + # + # The purpose of this job template is to run: + # 1. login to the docker registry + # 2. inject a version.properties file and set versions + # 3. run a docker push + # + # Required Variables: + # pom: name/location of the pom.xml file relative to the workspace + # profile: the docker profile defined in the pom + # maven-properties: properties passed to maven + + name: '{project-name}-{stream}-docker-version-java-daily' + id: 'docker-version-java-daily' + project-type: freestyle + node: '{build-node}' + disabled: '{disabled}' + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + - maven-params: + mvn-params: '{mvn-params}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - infra-wrappers-docker-build: + build-timeout: '{build-timeout}' + + triggers: + # 12 AM UTC + - timed: 'H 12 * * *' + - 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 + + - 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 + + - docker-login + + - maven-docker-push-daily: + maven-version: '{maven-version}' + mvn-settings: '{mvn-settings}' + pom: '{docker-pom}' + # use default as mvn-profile if profile is not needed + mvn-profile: '{mvn-profile}' + mvn-params: '{mvn-params}' + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + +- job-template: + # Job template for building & pushing docker images + # + # The purpose of this job template is to run: + # 1. inject a version.properties file and set versions + # 2. login to the docker registry + # 3. run a docker push + # + # This job supports subprojects. + # + # Required Variables: + # pom: name/location of the pom.xml file relative to the workspace + # maven-properties: properties passed to maven + + name: '{project-name}-{stream}-{subproject}-docker-version-java-daily' + project-type: freestyle + node: 'ubuntu1604-docker-8c-8g' + disabled: '{disabled}' + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + - maven-params: + mvn-params: '{mvn-params}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + # 12 AM UTC + - timed: 'H 12 * * *' - gerrit-trigger-release-manually: server: '{server-name}' project: '{project}' @@ -714,7 +1874,8 @@ - maven-target: maven-version: '{maven-version}' - goals: 'versions:set versions:update-child-modules versions:commit' + pom: '{pom}' + goals: 'versions:set versions:update-child-modules versions:commit -B' properties: - 'newVersion=${{release_version}}' settings: '{mvn-settings}' @@ -726,36 +1887,147 @@ - maven-docker-push-daily: maven-version: '{maven-version}' + pom: '{pom}' mvn-settings: '{mvn-settings}' pom: '{docker-pom}' # use default as mvn-profile if profile is not needed mvn-profile: '{mvn-profile}' + mvn-params: '{mvn-params}' + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' - job-template: + # Job template for building & pushing docker images for AAI specific repos + # + # The purpose of this job template is to run: + # 1. login to the docker registry + # 2. run maven goals + # 3. run include-docker-push.sh + # + # Required Variables: + # pom: name/location of the pom.xml file relative to the workspace + # maven-properties: properties passed to maven + name: '{project-name}-{stream}-aai-docker-java-daily' project-type: freestyle node: 'ubuntu1604-docker-8c-8g' + docker-image-name: '' + disabled: '{disabled}' + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + - docker-image-name: + docker-image-name: '{docker-image-name}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + # 12 AM UTC + - timed: 'H 12 * * *' + - gerrit-trigger-release-manually: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + + builders: + + - provide-maven-settings: + global-settings-file: 'global-settings' + settings-file: '{mvn-settings}' + + - docker-login + + - maven-target: + maven-version: '{maven-version}' + pom: 'pom.xml' + goals: 'clean install -DskipTests -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + + - maven-target: + maven-version: '{maven-version}' + pom: '{pom}' + goals: '{mvn-goals}' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + properties: + - maven.test.skip=true + - docker.pull.registry=nexus3.onap.org:10001 + - docker.push.registry=nexus3.onap.org:10003 + + - shell: !include-raw-escape: include-docker-push.sh + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + +- job-template: + # Job template for building & pushing docker images for AAI specific repos + # + # The purpose of this job template is to run: + # 1. login to the docker registry + # 2. run maven goals + # 3. run include-docker-push.sh + # + # This job supports subprojects + # + # Required Variables: + # pom: name/location of the pom.xml file relative to the workspace + # maven-properties: properties passed to maven + + name: '{project-name}-{stream}-{subproject}-aai-docker-java-daily' + project-type: freestyle + node: 'ubuntu1604-docker-8c-8g' + disabled: '{disabled}' + docker-image-name: '' properties: - - ecomp-infra-properties: + - infra-properties: build-days-to-keep: '{build-days-to-keep}' parameters: - - ecomp-infra-parameters: + - infra-parameters: project: '{project}' branch: '{branch}' refspec: 'refs/heads/{branch}' artifacts: '{archive-artifacts}' - maven-exec: maven-version: '{maven-version}' + - docker-image-name: + docker-image-name: '{docker-image-name}' scm: - gerrit-trigger-scm: refspec: '' choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' wrappers: - - ecomp-infra-wrappers: + - infra-wrappers: build-timeout: '{build-timeout}' triggers: @@ -777,7 +2049,8 @@ - maven-target: maven-version: '{maven-version}' pom: 'pom.xml' - goals: 'clean install -DskipTests' + goals: 'clean install -DskipTests -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' settings: '{mvn-settings}' settings-type: cfp global-settings: 'global-settings' @@ -793,36 +2066,42 @@ global-settings-type: cfp properties: - maven.test.skip=true - - docker.pull.registry=nexus3.openecomp.org:10001 - - docker.push.registry=nexus3.openecomp.org:10003 + - docker.pull.registry=nexus3.onap.org:10001 + - docker.push.registry=nexus3.onap.org:10003 - shell: !include-raw-escape: include-docker-push.sh + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + - 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 purpose of this job template is to run: + # 1. inject a version.properties file and set versions + # 2. 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 # # 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}' + disabled: '{disabled}' maven-deploy-properties: properties: - - ecomp-infra-properties: + - infra-properties: build-days-to-keep: '{build-days-to-keep}' parameters: - - ecomp-infra-parameters: + - infra-parameters: project: '{project}' branch: '{branch}' refspec: 'refs/heads/{branch}' @@ -834,9 +2113,10 @@ - gerrit-trigger-scm: refspec: '' choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' wrappers: - - ecomp-infra-wrappers: + - infra-wrappers: build-timeout: '{build-timeout}' triggers: @@ -861,7 +2141,8 @@ - maven-target: maven-version: '{maven-version}' - goals: 'clean deploy sonar:sonar -Dsonar.host.url=${{SONAR}}' + goals: 'clean deploy site:site site:stage-deploy -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' properties: - '{maven-deploy-properties}' settings: '{mvn-settings}' @@ -869,14 +2150,18 @@ global-settings: 'global-settings' global-settings-type: cfp + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + - 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 + # The purpose of this job template is to run: + # 1. inject a version.properties file and set versions + # 2. 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 mvn version plugin that assumes some specific parent structure # # The POM files are required to use the Maven staging plugin so the deploy # does not deploy directly to the release repo. @@ -891,13 +2176,14 @@ project-type: freestyle node: '{build-node}' + disabled: '{disabled}' maven-deploy-properties: properties: - - ecomp-infra-properties: + - infra-properties: build-days-to-keep: '{build-days-to-keep}' parameters: - - ecomp-infra-parameters: + - infra-parameters: project: '{project}' branch: '{branch}' refspec: 'refs/heads/{branch}' @@ -909,9 +2195,10 @@ - gerrit-trigger-scm: refspec: '' choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' wrappers: - - ecomp-infra-wrappers: + - infra-wrappers: build-timeout: '{build-timeout}' triggers: @@ -938,7 +2225,8 @@ - maven-target: maven-version: '{maven-version}' pom: '{pom}' - goals: 'clean deploy sonar:sonar -Dsonar.host.url=${{SONAR}}' + goals: 'clean deploy site:site site:stage-deploy -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' properties: - '{maven-deploy-properties}' settings: '{mvn-settings}' @@ -946,28 +2234,180 @@ global-settings: 'global-settings' global-settings-type: cfp + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + - job-template: - # Template for maven site plugin invocation + # Job template for Java daily release jobs + # + # The purpose of this job template is to run: + # 1. inject a version.properties file and set versions + # 2. 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 + # This version does NOT change the version within the tag # - # It's designed to be triggered when the trigger-job job - # succeeds as there's no need for new documentaiton - # if the build job fails. + # The POM files are required to use the Maven staging plugin so the deploy + # does not deploy directly to the release repo. # - # Those parameters should be set : - # - site-pom : the pom file that contains the site confiration - # - trigger-job : the name of the project that triggers this job - # upon success. The job name can be - # parameterized. - name: '{project-name}-{stream}-stage-site-java' + # 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-version3-java-daily' + project-type: freestyle node: '{build-node}' + disabled: '{disabled}' + maven-deploy-properties: + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - 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}' + - maven-install: + maven-version: '{maven-version}' + + - inject: + properties-file: version.properties + + - shell: !include-raw-escape: include-update-pom-versions-not-parent.sh + + - maven-target: + maven-version: '{maven-version}' + pom: '{pom}' + goals: 'clean deploy site:site site:stage-deploy -B + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' + properties: + - '{maven-deploy-properties}' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' + +- job-template: + # Job template for Java merge jobs for SDC specific repos + # + # The purpose of this job template is to run: + # 1. maven clean deploy + # + # Required Variables: + # branch: git branch (eg. stable/lithium or master) + + name: '{project-name}-{stream}-sdc-merge-java' + + project-type: freestyle + node: 'ubuntu1604-docker-8c-8g' + build-timeout: 120 + + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - maven-exec: + maven-version: '{maven-version}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - gerrit-trigger-patch-merged: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + files: '**' + + builders: + - provide-maven-settings: + global-settings-file: 'global-settings' + settings-file: '{mvn-settings}' + + - docker-login + + - maven-docker-push-daily-test: + maven-version: '{maven-version}' + mvn-settings: '{mvn-settings}' + pom: '{docker-pom}' + # use default as mvn-profile if profile is not needed + mvn-profile: '{mvn-profile}' + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' +- job-template: + # Job template for building & pushing docker images for AAI specific repos + # + # The purpose of this job template is to run: + # 1. login to the docker registry + # 2. run maven clean install goals skipping tests + # 3. run maven goals + # + # Required Variables: + # pom: name/location of the pom.xml file relative to the workspace + # maven-properties: properties passed to maven + + name: '{project-name}-{stream}-aai-docker-java-version-daily' + project-type: freestyle + node: 'ubuntu1604-docker-8c-8g' + disabled: '{disabled}' properties: - - ecomp-infra-properties: + - infra-properties: build-days-to-keep: '{build-days-to-keep}' parameters: - - ecomp-infra-parameters: + - infra-parameters: project: '{project}' branch: '{branch}' refspec: 'refs/heads/{branch}' @@ -979,25 +2419,51 @@ - gerrit-trigger-scm: refspec: '' choosing-strategy: 'default' + submodule-recursive: '{submodule-recursive}' wrappers: - - ecomp-infra-wrappers: + - infra-wrappers: build-timeout: '{build-timeout}' triggers: - - trigger-on-build-success: - job-name: '{trigger-job}' + # 12 AM UTC + - timed: 'H 12 * * *' + - gerrit-trigger-release-manually: + server: '{server-name}' + project: '{project}' + branch: '{branch}' builders: + - provide-maven-settings: global-settings-file: 'global-settings' settings-file: '{mvn-settings}' + - docker-login + + - maven-target: + maven-version: '{maven-version}' + pom: 'pom.xml' + goals: 'clean install -DskipTests -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + - maven-target: maven-version: '{maven-version}' - pom: '{site-pom}' - goals: 'clean site:site site:stage-deploy' + pom: '{pom}' + goals: '{mvn-goals}' settings: '{mvn-settings}' settings-type: cfp global-settings: 'global-settings' global-settings-type: cfp + properties: + - maven.test.skip=true + - docker.pull.registry=nexus3.onap.org:10001 + - docker.push.registry=nexus3.onap.org:10003 + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' +