--- /dev/null
+# Copyright (c) 2019 AT&T Intellectual Property.
+#
+# Licensed under the Apache License, Version 2.0 (the 'License');
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an 'AS IS' BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+---
+#
+# Template for verifying gerrit changeset by shell script.
+# Runs on changeset branch to verify new commits; can also run on master.
+#
+# Required parameters:
+# build-node: label (flavor) of jenkins build minion
+# project: git repository
+# project-name: Jenkins job name prefix
+# script: shell script to execute
+# Optional parameters:
+# branch: git branch, defaults to master
+# stream: friendly stream name (often same as branch), defaults to master
+- job-template:
+ name: '{project-name}-verify-shell-{stream}'
+ id: oran-verify-shell
+
+ ######################
+ # Default parameters #
+ ######################
+
+ branch: master
+ build-days-to-keep: 7
+ build-timeout: 15
+ disable-job: false
+ gerrit_trigger_file_paths:
+ - compare-type: REG_EXP
+ pattern: '.*'
+ gerrit-skip-vote: false
+ gerrit_verify_triggers:
+ - patchset-created-event:
+ exclude-drafts: true
+ exclude-trivial-rebase: false
+ exclude-no-code-change: false
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
+ git-url: '$GIT_URL/$PROJECT'
+ stream: master
+ submodule-recursive: true
+ submodule-timeout: 10
+ submodule-disable: false
+
+ #####################
+ # Job Configuration #
+ #####################
+
+ project-type: freestyle
+ node: '{build-node}'
+ disabled: '{disable-job}'
+
+ properties:
+ - lf-infra-properties:
+ build-days-to-keep: '{build-days-to-keep}'
+
+ parameters:
+ - lf-infra-parameters:
+ project: '{project}'
+ branch: '{branch}'
+ stream: '{stream}'
+
+ wrappers:
+ - lf-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+ scm:
+ - lf-infra-gerrit-scm:
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+ git-url: '{git-url}'
+ refspec: '$GERRIT_REFSPEC'
+ branch: '$GERRIT_BRANCH'
+ submodule-recursive: '{submodule-recursive}'
+ submodule-timeout: '{submodule-timeout}'
+ submodule-disable: '{submodule-disable}'
+ choosing-strategy: gerrit
+
+ triggers:
+ - gerrit:
+ server-name: '{gerrit-server-name}'
+ trigger-on: '{obj:gerrit_verify_triggers}'
+ projects:
+ - project-compare-type: ANT
+ project-pattern: '{project}'
+ branches:
+ - branch-compare-type: ANT
+ branch-pattern: '**/{branch}'
+ file-paths: '{obj:gerrit_trigger_file_paths}'
+ skip-vote:
+ successful: '{gerrit-skip-vote}'
+ failed: '{gerrit-skip-vote}'
+ unstable: '{gerrit-skip-vote}'
+ notbuilt: '{gerrit-skip-vote}'
+
+ builders:
+ - shell: '{script}'
+
+ publishers:
+ - lf-infra-publish