[CORD-2484] Adding macros for JJB jobs
Change-Id: Id76399d2eb950ccca292f1a1b958900728712448
diff --git a/README.md b/README.md
index 30d7499..acd2654 100644
--- a/README.md
+++ b/README.md
@@ -11,10 +11,14 @@
> other tasks, please run: `git submodule init && git submodule update` to
> obtain these submodules, as `repo` won't do this automatically for you.
-## Testing job definitions
+## Jenkins Job Builder (JJB) Documentation
-[Documentation for Jenkins Job Builder
-(JJB)](https://docs.openstack.org/infra/jenkins-job-builder/index.html)
+[Official JJB Docs](https://docs.openstack.org/infra/jenkins-job-builder/index.html)
+
+[LF Best practices for
+JJB](http://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/best-practices.html#)
+
+### Testing job definitions
JJB job definitions can be tested by running:
@@ -23,5 +27,38 @@
```
Which will create a python virtualenv, install jenkins-job-builder in it, then
-try building all the job files.
+try building all the job files, which are put in `job-configs` and can be
+inspected.
+
+### cord-infra macros
+
+There are a few useful macros defined in jjb/cord-macros.yml
+
+- `cord-infra-properties` - sets build discarder settings
+- `cord-infra-gerrit-repo-scm` - checks out the entire source tree with the
+ `repo` tool
+- `cord-infra-gerrit-repo-patch` - checks out a patch to a git repo within a
+ checked out repo source tree (WIP, doesn't work yet)
+- `cord-infra-gerrit-trigger-patchset` - triggers build on gerrit new
+ patchset, draft publishing, comments, etc.
+- `cord-infra-gerrit-trigger-merge` - triggers build on gerrit merge
+
+## Things to look out for
+
+### AMI Images and Cloud instances
+
+If you make changes which create a new packer image, you have to manually set
+the instance `AMI ID` on jenkins in [Global
+Config](https://jenkins-new.opencord.org/configure) > Cloud > Amazon EC2.
+
+### Creating new EC2 instance types
+
+If you create a new cloud instance type, make sure to set both the `Security
+group names` and `Subnet ID for VPC` or it will fail to instantiate.
+
+## Links to other projects using LF JJB
+
+- [ONOS](https://gerrit.onosproject.org/gitweb?p=ci-management.git;a=tree)
+- [ODL](https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=tree)
+- [ONAP](https://gerrit.onap.org/r/gitweb?p=ci-management.git;a=tree)
diff --git a/jjb/cord-macros.yaml b/jjb/cord-macros.yaml
new file mode 100644
index 0000000..fec8d43
--- /dev/null
+++ b/jjb/cord-macros.yaml
@@ -0,0 +1,76 @@
+---
+# CORD JJB macros
+
+# control how long builds and artifact are retained
+- property:
+ name: cord-infra-properties
+ properties:
+ - build-discarder:
+ days-to-keep: '{build-days-to-keep}'
+ artifact-num-to-keep: '{artifact-num-to-keep}'
+
+# checkout entire source tree with repo
+# docs: https://docs.openstack.org/infra/jenkins-job-builder/scm.html#scm.repo
+- scm:
+ name: cord-infra-gerrit-repo-scm
+ scm:
+ - repo:
+ manifest-url: '{gerrit-server-url}'
+ manifest-branch: '{branch}'
+ destination-dir: '{destination-dir}'
+ jobs: 4
+ reset-first: true
+ depth: 1
+
+# download a specific patchset after checking out enitre source tree with repo
+# docs: https://docs.openstack.org/infra/jenkins-job-builder/builders.html#builders.inject
+- builder:
+ name: cord-infra-gerrit-repo-patch
+ builders:
+ - inject:
+ properties-content: |
+ GERRIT_PROJECT={project}
+ GERRIT_CHANGE_NUMBER={change-number}
+ GERRIT_PATCHSET_NUMBER={patchset-number}
+ - shell: !include-raw-escape: shell/repopatch.sh
+
+# trigger on gerrit patchsets and actions
+# docs: https://docs.openstack.org/infra/jenkins-job-builder/triggers.html#triggers.gerrit
+- trigger:
+ name: cord-infra-gerrit-trigger-patchset
+ triggers:
+ gerrit:
+ server-name: '{gerrit-server-name}'
+ dependency-jobs: '{dependency-jobs}'
+ silent-start: true
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: true
+ exclude-trivial-rebase: false
+ exclude-no-code-change: true
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: '(?i)^.*recheck$'
+ projects:
+ - project-compare-type: REG_EXP
+ project-pattern: '{project-regexp}'
+ branches:
+ - branch-compare-type: REG_EXP
+ branch-pattern: '{branch-regexp}'
+
+# trigger on gerrit commits/merges
+- trigger:
+ name: cord-infra-gerrit-trigger-merge
+ triggers:
+ gerrit:
+ server-name: '{gerrit-server-name}'
+ dependency-jobs: '{dependency-jobs}'
+ silent-start: True
+ trigger-on:
+ - change-merged-event
+ projects:
+ - project-compare-type: REG_EXP
+ project-pattern: '{project-regexp}'
+ branches:
+ - branch-compare-type: REG_EXP
+ branch-pattern: '{branch-regexp}'
diff --git a/jjb/defaults.yaml b/jjb/defaults.yaml
index f48a77e..e9bb2f0 100644
--- a/jjb/defaults.yaml
+++ b/jjb/defaults.yaml
@@ -1,5 +1,5 @@
---
-# GLOBAL jenkins defaults
+# CORD GLOBAL jenkins job builder (JJB) defaults
- defaults:
name: global
@@ -7,37 +7,37 @@
# lftools
lftools-version: <1.0.0
- # lf-infra-defaults
+ # name of the SSH key to use
jenkins-ssh-credential: 'cord-jenkins-ssh'
- # build discards
- build-days-to-keep: 30
+ # by default, don't depend on other jobs
+ dependency-jobs: ''
- # Timeout in minutes
- # TODO deprecate this (should be project template specific)
- build-timeout: 360
+ # How long to keep builds and artifacts
+ build-days-to-keep: 60
+ artifact-num-to-keep: 30
- # TODO this should be the most common executor
- build-node: ubuntu16.04-basebuild-1c-1g
-
- # default gerrit server definition
- gerrit-server-name: 'CORD Gerrit'
-
+ # list of artifacts to archive
archive-artifacts: ''
- # Set default maven version used for everything
- mvn-version: 'mvn33'
+ # build timeout (minutes)
+ build-timeout: 10
- # Default maven goals
- mvn-goals: 'clean install'
- mvn-opts: ''
+ # The most frequently used type of build node
+ # see other build node types under "Cloud > Amazon EC2" at
+ # https://jenkins-new.opencord.org/configure
+ build-node: ubuntu16.04-basebuild-1c-1g
- # Maven / Java
- cord-infra-mvn-opts: |
- --show-version
- --batch-mode
- -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- -Djenkins
- -Dmaven.repo.local=/tmp/r
- -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
+ # CORD Gerrit server definition, set in configuration
+ gerrit-server-name: 'CORD Gerrit'
+
+ # URL for Gerrit server, for use with `repo`
+ gerrit-server-url: 'https://gerrit.opencord.org/'
+
+ # name of the manifest git repos used with the `repo` cli tool
+ cord-repo-manifest: manifest.git
+ cordqa-manifest-repo: qa-manifest.git
+
+ # list of supported branch as a regexp
+ supported-branches-regexp: '^(master|cord-5.0|cord-4.1|cord-4.0)$'
diff --git a/jjb/docs.yaml b/jjb/docs.yaml
new file mode 100644
index 0000000..1cc480f
--- /dev/null
+++ b/jjb/docs.yaml
@@ -0,0 +1,100 @@
+---
+# CORD documentation verification and publish tasks
+
+- project:
+ name: verify-docs
+
+ # add repos that have documentation to the project list in both jobs
+ jobs:
+ - 'verify-documentation':
+ project-regexp: '^(cord|platform-install|cord-tester|rcord|ecord|mcord|opencloud|xos|xos-gui|xos-tosca)$'
+ branch-regexp: '{supported-branches-regexp}'
+
+- project:
+ name: publish-docs
+
+ jobs:
+ - 'publish-documentation':
+ project-regexp: '^(cord|platform-install|cord-tester|rcord|ecord|mcord|opencloud|xos|xos-gui|xos-tosca)$'
+ branch-regexp: '{supported-branches-regexp}'
+
+# Documentation job templates
+- job-template:
+ name: "verify-documentation"
+
+ triggers:
+ - cord-infra-gerrit-trigger-patchset:
+ gerrit-server-name: '{gerrit-server-name}'
+ project-regexp: '$GERRIT_PROJECT'
+ branch-regexp: '{branch-regexp}'
+ dependency-jobs: '{dependency-jobs}'
+
+ properties:
+ - cord-infra-properties:
+ build-days-to-keep: '{build-days-to-keep}'
+ artifact-num-to-keep: '{artifact-num-to-keep}'
+
+ wrappers:
+ - lf-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+ scm:
+ - cord-infra-gerrit-repo-scm:
+ gerrit-server-url: '{gerrit-server-url}'
+ branch: '$GERRIT_BRANCH'
+ destination-dir: 'cord'
+
+ node: '{build-node}'
+ project-type: freestyle
+ concurrent: false
+
+ builders:
+ - cord-infra-gerrit-repo-patch:
+ project: '$GERRIT_PROJECT'
+ change-number: '$GERRIT_CHANGE_NUMBER'
+ patchset-number: '$GERRIT_PATCHSET_NUMBER'
+ - shell: |
+ cd cord/build/docs
+ make test
+
+
+- job-template:
+ name: 'publish-documentation'
+
+ triggers:
+ - cord-infra-gerrit-trigger-merge:
+ gerrit-server-name: '{gerrit-server-name}'
+ project-regexp: '{project-regexp}'
+ branch-regexp: '{branch-regexp}'
+ dependency-jobs: '{dependency-jobs}'
+
+ properties:
+ - cord-infra-properties:
+ build-days-to-keep: '{build-days-to-keep}'
+ artifact-num-to-keep: '{artifact-num-to-keep}'
+
+ wrappers:
+ - lf-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+ scm:
+ - cord-infra-gerrit-repo-scm:
+ gerrit-server-url: '{gerrit-server-url}'
+ branch: '$GERRIT_BRANCH'
+ destination-dir: 'cord'
+
+ node: '{build-node}'
+ project-type: freestyle
+ concurrent: false
+
+ builders:
+ - shell: |
+ cd cord/build/docs
+ make build
+
+# publish over ssh: https://docs.openstack.org/infra/jenkins-job-builder/publishers.html#publishers.ssh
+# publishers:
+# - ssh:
+
diff --git a/jjb/helm-lint/helm-lint.yaml b/jjb/helm-lint/helm-lint.yaml
deleted file mode 100644
index ffc9c12..0000000
--- a/jjb/helm-lint/helm-lint.yaml
+++ /dev/null
@@ -1,77 +0,0 @@
----
-# run `helm lint` on helm charts
-
-- job-template:
- name: 'verify-helm-charts-{stream}'
-
- git-url: '$GIT_URL/$GERRIT_PROJECT'
- submodule-recursive: false
-
- builders:
- - shell: !include-raw-escape: helmlint.sh
-
- properties:
- - lf-infra-properties:
- project: '{project}'
- build-days-to-keep: '{build-days-to-keep}'
-
- parameters:
- - lf-infra-parameters:
- project: '{project}'
- branch: '{stream}'
- stream: '{stream}'
- lftools-version: '{lftools-version}'
-
- wrappers:
- - lf-infra-wrappers:
- build-timeout: '{build-timeout}'
- jenkins-ssh-credential: '{jenkins-ssh-credential}'
-
- concurrent: true
-
- scm:
- - lf-infra-gerrit-scm:
- git-url: '{git-url}'
- refspec: '$GERRIT_REFSPEC'
- branch: '$GERRIT_BRANCH'
- submodule-recursive: '{submodule-recursive}'
- choosing-strategy: gerrit
- jenkins-ssh-credential: '{jenkins-ssh-credential}'
-
- triggers:
- - gerrit:
- server-name: '{gerrit-server-name}'
- trigger-on:
- - patchset-created-event:
- exclude-drafts: true
- exclude-trivial-rebase: false
- exclude-no-code-change: true
- - draft-published-event
- - comment-added-contains-event:
- comment-contains-value: '(?i)^.*recheck$'
- projects:
- - project-compare-type: PLAIN
- project-pattern: '{project}'
- branches:
- - branch-compare-type: ANT
- branch-pattern: '**/{stream}'
-
-- project:
- name: verify-helm-charts
- project-name: verify-helm-charts
-
- project: helm-charts
-
- project-type: freestyle
-
- node: '{build-node}'
- build-timeout: '10'
- build-node: '{build-node}'
-
- supported_versions: &supported_versions
- - 'master'
-
- stream: *supported_versions
-
- jobs:
- - 'verify-helm-charts-{stream}'
diff --git a/jjb/lint.yaml b/jjb/lint.yaml
new file mode 100644
index 0000000..ae448c0
--- /dev/null
+++ b/jjb/lint.yaml
@@ -0,0 +1,119 @@
+---
+# CORD lint and static code validation job templates
+# These are invoked by the per-git-repo jobs stored in jjb/validate/
+
+# Verify that there is valid license/copyright on files
+- job-template:
+ id: verify-licensed
+ name: 'verify-{project}-licensed'
+
+ triggers:
+ - cord-infra-gerrit-trigger-patchset:
+ gerrit-server-name: '{gerrit-server-name}'
+ project-regexp: '^{project}$'
+ branch-regexp: '{branch-regexp}'
+ dependency-jobs: '{dependency-jobs}'
+
+ properties:
+ - cord-infra-properties:
+ build-days-to-keep: '{build-days-to-keep}'
+ artifact-num-to-keep: '{artifact-num-to-keep}'
+
+ wrappers:
+ - lf-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+ scm:
+ - lf-infra-gerrit-scm:
+ git-url: '$GIT_URL/$GERRIT_PROJECT'
+ refspec: '$GERRIT_REFSPEC'
+ branch: '$GERRIT_BRANCH'
+ submodule-recursive: 'false'
+ choosing-strategy: gerrit
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+ node: '{build-node}'
+ project-type: freestyle
+ concurrent: true
+
+ builders:
+ - shell: !include-raw-escape: shell/licensecheck.sh
+
+
+# run `ansible-lint` to validate ansible playbooks/roles
+- job-template:
+ id: verify-ansible-lint
+ name: 'verify-{project}-ansible-lint'
+
+ triggers:
+ - cord-infra-gerrit-trigger-patchset:
+ gerrit-server-name: '{gerrit-server-name}'
+ project-regexp: '^{project}$'
+ branch-regexp: '{branch-regexp}'
+ dependency-jobs: '{dependency-jobs}'
+
+ properties:
+ - cord-infra-properties:
+ build-days-to-keep: '{build-days-to-keep}'
+ artifact-num-to-keep: '{artifact-num-to-keep}'
+
+ wrappers:
+ - lf-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+ scm:
+ - lf-infra-gerrit-scm:
+ git-url: '$GIT_URL/$GERRIT_PROJECT'
+ refspec: '$GERRIT_REFSPEC'
+ branch: '$GERRIT_BRANCH'
+ submodule-recursive: 'false'
+ choosing-strategy: gerrit
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+ node: '{build-node}'
+ project-type: freestyle
+ concurrent: true
+
+ builders:
+ - shell: !include-raw-escape: shell/ansiblelint.sh
+
+
+# run `helm lint --strict` to validate helm charts
+- job-template:
+ id: verify-helm-lint
+ name: 'verify-{project}-helm-lint'
+
+ triggers:
+ - cord-infra-gerrit-trigger-patchset:
+ gerrit-server-name: '{gerrit-server-name}'
+ project-regexp: '^{project}$'
+ branch-regexp: '{branch-regexp}'
+ dependency-jobs: '{dependency-jobs}'
+
+ properties:
+ - cord-infra-properties:
+ build-days-to-keep: '{build-days-to-keep}'
+ artifact-num-to-keep: '{artifact-num-to-keep}'
+
+ wrappers:
+ - lf-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+ scm:
+ - lf-infra-gerrit-scm:
+ git-url: '$GIT_URL/$GERRIT_PROJECT'
+ refspec: '$GERRIT_REFSPEC'
+ branch: '$GERRIT_BRANCH'
+ submodule-recursive: 'false'
+ choosing-strategy: gerrit
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+ node: '{build-node}'
+ project-type: freestyle
+ concurrent: true
+
+ builders:
+ - shell: !include-raw-escape: shell/helmlint.sh
diff --git a/jjb/shell/ansiblelint.sh b/jjb/shell/ansiblelint.sh
new file mode 100755
index 0000000..beb0891
--- /dev/null
+++ b/jjb/shell/ansiblelint.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+
+# Copyright 2017-present Open Networking Foundation
+#
+# 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.
+
+set +e -u -o pipefail
+fail_ansible=0
+
+# verify that we have ansible-lint installed
+command -v ansible-lint >/dev/null 2>&1 || { echo "ansible-lint not found, please install it" >&2; exit 1; }
+
+# when not running under Jenkins, use current dir as workspace
+WORKSPACE=${WORKSPACE:-.}
+
+echo "=> Linting Ansible Code with $(ansible-lint --version)"
+for f in $(find "${WORKSPACE}" -type f -name "*.yml" -o -name "*.yaml"); do
+ echo "==> CHECKING: ${f}"
+ ansible-lint -p "${f}"
+ rc=$?
+ if [[ $rc != 0 ]]; then
+ echo "==> LINTING FAIL: ${f}"
+ fail_ansible=1
+ fi
+done
+
+exit ${fail_ansible}
diff --git a/jjb/helm-lint/helmlint.sh b/jjb/shell/helmlint.sh
similarity index 76%
rename from jjb/helm-lint/helmlint.sh
rename to jjb/shell/helmlint.sh
index 629bb34..a868179 100755
--- a/jjb/helm-lint/helmlint.sh
+++ b/jjb/shell/helmlint.sh
@@ -1,4 +1,4 @@
-#/usr/bin/env bash
+#!/usr/bin/env bash
# Copyright 2018-present Open Networking Foundation
#
@@ -18,11 +18,18 @@
# run `helm lint` on all helm charts that are found
set +e -u -o pipefail
+
+# verify that we have helm installed
+command -v helm >/dev/null 2>&1 || { echo "helm not found, please install it" >&2; exit 1; }
+
echo "helmlint.sh, using helm version: $(helm version -c --short)"
fail_lint=0
-for chart in $(find . -name Chart.yaml -print) ; do
+# when not running under Jenkins, use current dir as workspace
+WORKSPACE=${WORKSPACE:-.}
+
+for chart in $(find "${WORKSPACE}" -name Chart.yaml -print) ; do
chartdir=$(dirname "${chart}")
@@ -39,8 +46,4 @@
fi
done
-if [[ $fail_lint != 0 ]]; then
- exit 1
-fi
-
-exit 0
+exit ${fail_lint}
diff --git a/jjb/shell/licensecheck.sh b/jjb/shell/licensecheck.sh
new file mode 100755
index 0000000..42b6b87
--- /dev/null
+++ b/jjb/shell/licensecheck.sh
@@ -0,0 +1,87 @@
+#!/usr/bin/env sh
+
+# licensecheck.sh
+# checks for copyright/license headers on files
+# excludes filename extensions where this check isn't pertinent
+
+# this could be rewritten with better form. Currently is a cut/paste from the
+# Jenkins job with minimal changes (BSD/OS X xargs params compat, sort of
+# excluded file extensions).
+
+find . -name ".git" -prune -o -type f \
+ -name "*.*" \
+ ! -name "*.PNG" \
+ ! -name "*.asc" \
+ ! -name "*.bat" \
+ ! -name "*.cfg" \
+ ! -name "*.cnf" \
+ ! -name "*.conf" \
+ ! -name "*.cql" \
+ ! -name "*.crt" \
+ ! -name "*.csr" \
+ ! -name "*.csv" \
+ ! -name "*.ctmpl" \
+ ! -name "*.curl" \
+ ! -name "*.db" \
+ ! -name "*.der" \
+ ! -name "*.diff" \
+ ! -name "*.dnsmasq" \
+ ! -name "*.do" \
+ ! -name "*.docx" \
+ ! -name "*.eot" \
+ ! -name "*.gif" \
+ ! -name "*.gpg" \
+ ! -name "*.graffle" \
+ ! -name "*.iml" \
+ ! -name "*.in" \
+ ! -name "*.inc" \
+ ! -name "*.j2" \
+ ! -name "*.jar" \
+ ! -name "*.jks" \
+ ! -name "*.jpg" \
+ ! -name "*.json" \
+ ! -name "*.key" \
+ ! -name "*.list" \
+ ! -name "*.local" \
+ ! -name "*.log" \
+ ! -name "*.mak" \
+ ! -name "*.md" \
+ ! -name "*.mk" \
+ ! -name "*.oar" \
+ ! -name "*.p12" \
+ ! -name "*.patch" \
+ ! -name "*.pcap" \
+ ! -name "*.pem" \
+ ! -name "*.png" \
+ ! -name "*.properties" \
+ ! -name "*.proto" \
+ ! -name "*.pyc" \
+ ! -name "*.repo" \
+ ! -name "*.robot" \
+ ! -name "*.rst" \
+ ! -name "*.rules" \
+ ! -name "*.service" \
+ ! -name "*.svg" \
+ ! -name "*.swp" \
+ ! -name "*.tar" \
+ ! -name "*.tar.gz" \
+ ! -name "*.toml" \
+ ! -name "*.ttf" \
+ ! -name "*.txt" \
+ ! -name "*.woff" \
+ ! -name "*.xproto" \
+ ! -name "*.xtarget" \
+ ! -name "*ignore" \
+ ! -name "*rc" \
+ ! -name "Dockerfile" \
+ ! -name "Dockerfile.*" \
+ ! -name "Makefile" \
+ ! -name "Makefile.*" \
+ ! -name "README" \
+ ! -path "*/vendor/*.go" \
+ ! -path "*conf*" \
+ ! -path "*git*" \
+ ! -path "*swagger*" \
+ -print0 | \
+ xargs -0 -n1 sh -c 'if ! grep -q "Copyright\|Apache License" $0; then echo "ERROR: $0 does not contain Copyright header"; exit 1; fi;'
+
diff --git a/jjb/shell/repopatch.sh b/jjb/shell/repopatch.sh
new file mode 100644
index 0000000..93c9706
--- /dev/null
+++ b/jjb/shell/repopatch.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+# Copyright 2018-present Open Networking Foundation
+#
+# 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.
+
+# repopatch.sh
+# downloads a patch to within an already checked out repo tree
+
+set +e -u -o pipefail
+
+# verify that we have repo installed
+command -v repo >/dev/null 2>&1 || { echo "repo not found, please install it" >&2; exit 1; }
+
+echo "Checking out patch with repo, using repo version:"
+repo version
+
+echo "GERRIT_PROJECT: ${GERRIT_PROJECT}"
+echo "GERRIT_CHANGE_NUMBER: ${GERRIT_CHANGE_NUMBER}"
+echo "GERRIT_PATCHSET_NUMBER: ${GERRIT_PATCHSET_NUMBER}"
+
+echo "Make this work eventually!"
+
diff --git a/jjb/verify/cord.yaml b/jjb/verify/cord.yaml
new file mode 100644
index 0000000..59ae2e0
--- /dev/null
+++ b/jjb/verify/cord.yaml
@@ -0,0 +1,17 @@
+---
+# verification jobs for 'cord' repo
+
+- project:
+ name: cord
+ project: '{name}'
+
+ jobs:
+ - 'verify-cord-jobs':
+ branch-regexp: '{supported-branches-regexp}'
+
+- job-group:
+ name: 'verify-cord-jobs'
+ jobs:
+ - 'verify-licensed'
+ - 'verify-ansible-lint'
+
diff --git a/jjb/verify/helm-charts.yaml b/jjb/verify/helm-charts.yaml
new file mode 100644
index 0000000..73c7b5b
--- /dev/null
+++ b/jjb/verify/helm-charts.yaml
@@ -0,0 +1,17 @@
+---
+# verification jobs for 'helm-charts' repo
+
+- project:
+ name: helm-charts
+ project: '{name}'
+
+ jobs:
+ - 'verify-helm-charts-jobs':
+ branch-regexp: '^master$'
+
+- job-group:
+ name: 'verify-helm-charts-jobs'
+ jobs:
+ - 'verify-licensed'
+ - 'verify-helm-lint'
+
diff --git a/jjb/verify/maas.yaml b/jjb/verify/maas.yaml
new file mode 100644
index 0000000..936e635
--- /dev/null
+++ b/jjb/verify/maas.yaml
@@ -0,0 +1,17 @@
+---
+# verification jobs for 'maas' repo
+
+- project:
+ name: maas
+ project: '{name}'
+
+ jobs:
+ - 'verify-maas-jobs':
+ branch-regexp: '{supported-branches-regexp}'
+
+- job-group:
+ name: 'verify-maas-jobs'
+ jobs:
+ - 'verify-licensed'
+ - 'verify-ansible-lint'
+
diff --git a/jjb/verify/platform-install.yaml b/jjb/verify/platform-install.yaml
new file mode 100644
index 0000000..0a1e376
--- /dev/null
+++ b/jjb/verify/platform-install.yaml
@@ -0,0 +1,17 @@
+---
+# verification jobs for 'platform-install' repo
+
+- project:
+ name: platform-install
+ project: '{name}'
+
+ jobs:
+ - 'verify-platform-install-jobs':
+ branch-regexp: '{supported-branches-regexp}'
+
+- job-group:
+ name: 'verify-platform-install-jobs'
+ jobs:
+ - 'verify-licensed'
+ - 'verify-ansible-lint'
+