Initial ci-management upload
* Configure initial jobs and validate Jenkins environment
* Do not hook up packer build jobs at this time
Change-Id: I1818e8680d215318410f6beff5af054db03e7fa1
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
diff --git a/jjb/global-templates-java.yaml b/jjb/global-templates-java.yaml
new file mode 100644
index 0000000..4ca261f
--- /dev/null
+++ b/jjb/global-templates-java.yaml
@@ -0,0 +1,243 @@
+---
+- 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.
+ #
+ # Required Variables:
+ # branch: git branch (eg. stable/lithium or master)
+
+ name: '{project}-{stream}-verify-java'
+
+ project-type: freestyle
+ concurrent: true
+ node: '{build-node}'
+
+ properties:
+ - build-discarder:
+ days-to-keep: '{build-days-to-keep}'
+ num-to-keep: '{build-num-to-keep}'
+ artifact-days-to-keep: '{build-artifact-days-to-keep}'
+ artifact-num-to-keep: '{build-artifact-num-to-keep}'
+
+ parameters:
+ - ecomp-infra-parameters:
+ project: '{project}'
+ branch: '{branch}'
+ refspec: 'refs/heads/{branch}'
+
+ scm:
+ - gerrit-trigger-scm:
+ refspec: '$GERRIT_REFSPEC'
+ choosing-strategy: 'gerrit'
+
+ wrappers:
+ - ecomp-infra-wrappers:
+ build-timeout: '{build-timeout}'
+
+ triggers:
+ - gerrit-trigger-patch-submitted:
+ name: '{project}'
+ branch: '{branch}'
+
+ builders:
+ - provide-maven-settings:
+ global-settings-file: 'global-settings'
+ settings-file: '{mvn-settings}'
+ - maven-target:
+ maven-version: 'mvn33'
+ goals: 'clean install'
+ settings: '{mvn-settings}'
+ settings-type: cfp
+ global-settings: 'global-settings'
+ global-settings-type: cfp
+
+ publishers:
+ - ecomp-infra-shiplogs:
+ maven-version: 'mvn33'
+
+- job-template:
+ # Job template for Java verify jobs with POM not at the root
+ #
+ # The purpose of this job template is to run "maven clean install" for
+ # projects using this template.
+ #
+ # 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}-{stream}-{subproject}-verify-java'
+
+ project-type: freestyle
+ concurrent: true
+ node: '{build-node}'
+
+ properties:
+ - build-discarder:
+ days-to-keep: '{build-days-to-keep}'
+ num-to-keep: '{build-num-to-keep}'
+ artifact-days-to-keep: '{build-artifact-days-to-keep}'
+ artifact-num-to-keep: '{build-artifact-num-to-keep}'
+
+ parameters:
+ - ecomp-infra-parameters:
+ project: '{project}'
+ branch: '{branch}'
+ refspec: 'refs/heads/{branch}'
+
+ scm:
+ - gerrit-trigger-scm:
+ refspec: '$GERRIT_REFSPEC'
+ choosing-strategy: 'gerrit'
+
+ wrappers:
+ - ecomp-infra-wrappers:
+ build-timeout: '{build-timeout}'
+
+ triggers:
+ - gerrit-trigger-patch-submitted-pattern:
+ name: '{project}'
+ branch: '{branch}'
+ pattern: '{pattern}'
+
+ builders:
+ - provide-maven-settings:
+ global-settings-file: 'global-settings'
+ settings-file: '{mvn-settings}'
+ - maven-target:
+ maven-version: 'mvn33'
+ pom: '{pom}'
+ goals: 'clean install'
+ settings: '{mvn-settings}'
+ settings-type: cfp
+ global-settings: 'global-settings'
+ global-settings-type: cfp
+
+ publishers:
+ - ecomp-infra-shiplogs:
+ maven-version: 'mvn33'
+
+- job-template:
+ # Job template for Java merge jobs
+ #
+ # The purpose of this job template is to run "maven clean deploy" for
+ # projects using this template.
+ #
+ # Required Variables:
+ # branch: git branch (eg. stable/lithium or master)
+ name: '{project}-{stream}-merge-java'
+
+ project-type: freestyle
+ node: '{build-node}'
+
+ properties:
+ - build-discarder:
+ days-to-keep: '{build-days-to-keep}'
+ num-to-keep: '{build-num-to-keep}'
+ artifact-days-to-keep: '{build-artifact-days-to-keep}'
+ artifact-num-to-keep: '{build-artifact-num-to-keep}'
+
+ parameters:
+ - ecomp-infra-parameters:
+ project: '{project}'
+ branch: '{branch}'
+ refspec: 'refs/heads/{branch}'
+
+ scm:
+ - gerrit-trigger-scm:
+ refspec: ''
+ choosing-strategy: 'default'
+
+ wrappers:
+ - ecomp-infra-wrappers:
+ build-timeout: '{build-timeout}'
+
+ triggers:
+ - gerrit-trigger-patch-merged:
+ name: '{project}'
+ branch: '{branch}'
+
+ builders:
+ - provide-maven-settings:
+ global-settings-file: 'global-settings'
+ settings-file: '{mvn-settings}'
+ - maven-target:
+ maven-version: 'mvn33'
+ # yamllint disable rule:line-length
+ goals: 'clean deploy sonar:sonar -Dsonar.host.url=https://sonar.open-o.org'
+ # yamllint enable
+ settings: '{mvn-settings}'
+ settings-type: cfp
+ global-settings: 'global-settings'
+ global-settings-type: cfp
+
+ publishers:
+ - ecomp-infra-shiplogs:
+ maven-version: 'mvn33'
+
+- job-template:
+ # Job template for Java merge jobs with POM not at the root
+ #
+ # The purpose of this job template is to run "maven clean deploy" for
+ # projects using this template.
+ #
+ # 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}-{stream}-{subproject}-merge-java'
+
+ project-type: freestyle
+ node: '{build-node}'
+
+ properties:
+ - build-discarder:
+ days-to-keep: '{build-days-to-keep}'
+ num-to-keep: '{build-num-to-keep}'
+ artifact-days-to-keep: '{build-artifact-days-to-keep}'
+ artifact-num-to-keep: '{build-artifact-num-to-keep}'
+
+ parameters:
+ - ecomp-infra-parameters:
+ project: '{project}'
+ branch: '{branch}'
+ refspec: 'refs/heads/{branch}'
+
+ scm:
+ - gerrit-trigger-scm:
+ refspec: ''
+ choosing-strategy: 'default'
+
+ wrappers:
+ - ecomp-infra-wrappers:
+ build-timeout: '{build-timeout}'
+
+ triggers:
+ - gerrit-trigger-patch-merged-pattern:
+ name: '{project}'
+ branch: '{branch}'
+ pattern: '{pattern}'
+
+ builders:
+ - provide-maven-settings:
+ global-settings-file: 'global-settings'
+ settings-file: '{mvn-settings}'
+ - maven-target:
+ maven-version: 'mvn33'
+ pom: '{pom}'
+ # yamllint disable rule:line-length
+ goals: 'clean deploy sonar:sonar -Dsonar.host.url=https://sonar.open-o.org'
+ # yamllint enable
+ settings: '{mvn-settings}'
+ settings-type: cfp
+ global-settings: 'global-settings'
+ global-settings-type: cfp
+
+ publishers:
+ - ecomp-infra-shiplogs:
+ maven-version: 'mvn33'