Merge "Change to use github repo for OMEC project Jenkinsfiles"
diff --git a/jjb/api-test.yaml b/jjb/api-test.yaml
index 27d877d..740fbd8 100644
--- a/jjb/api-test.yaml
+++ b/jjb/api-test.yaml
@@ -13,7 +13,7 @@
gerrit-server-name: '{gerrit-server-name}'
project-regexp: '^{project}$'
branch-regexp: '{branch-regexp}'
- file-include-regexp: '{code-files-regexp}'
+ file-include-regexp: '{api-test-files-regexp}'
dependency-jobs: '{dependency-jobs}'
properties:
diff --git a/jjb/cord-onos-app-publishing.yaml b/jjb/cord-onos-app-publishing.yaml
index bff8562..e566ef6 100644
--- a/jjb/cord-onos-app-publishing.yaml
+++ b/jjb/cord-onos-app-publishing.yaml
@@ -25,7 +25,7 @@
parameters:
- string:
name: notificationEmail
- default: 'teo@opennetworking.org saurav@opennetworking.org'
+ default: 'teo@opennetworking.org, saurav.das@opennetworking.org'
description: ''
node: 'ubuntu16.04-basebuild-1c-2g'
diff --git a/jjb/cord-test/seba-release.yaml b/jjb/cord-test/seba-release.yaml
index edfb651..adad659 100644
--- a/jjb/cord-test/seba-release.yaml
+++ b/jjb/cord-test/seba-release.yaml
@@ -12,11 +12,11 @@
# onlab pod1 build
- 'build_pod_manual_release':
testvm: 'onf-build'
- config-pod: 'onlab-pod1'
+ config-pod: 'onlab-pod1-voltha16'
release: '1.0'
branch: 'master'
Jenkinsfile: 'Jenkinsfile-attworkflow-build-released-ver'
- oltDebVersion: 'openolt-master.deb'
+ oltDebVersion: 'openolt-master-voltha16.deb'
# onlab pod2 build
- 'build_pod_manual_release':
diff --git a/jjb/defaults.yaml b/jjb/defaults.yaml
index edf86ea..684e084 100644
--- a/jjb/defaults.yaml
+++ b/jjb/defaults.yaml
@@ -79,15 +79,16 @@
# (basically the same as imagebuilder projects + helm charts + tools
version-tag-projects-regexp: '^(xos.*|helm-charts|automation-tools|cord-tester|chameleon|rcord|mcord|ecord|acordion|addressmanager|epc-service|exampleservice|fabric|fabric-crossconnect|globalxos|hippie-oss|hss_db|hypercache|internetemulator|kubernetes-service|monitoring|olt-service|onos-service|openstack|progran|sdn-controller|simpleexampleservice|templateservice|vEE|vEG|vBBU|venb|vHSS|vMME|vnaas|vPGWC|vPGWU|vrouter|vsg|vsg-hw|vSGW|vSM|vspgwc|vspgwu|vtn-service|vtr|att-workflow-driver|ves-agent|voltha-bbsim|openolt|sadis-server|kafka-topic-exporter|pyvoltha|voltha-adtran-adapter|voltha-openolt-adapter|voltha-openonu-adapter|plyxproto)$'
- # Projects that build modules sent to PyPI
- pypi-projects-regexp: '^(plyxproto)$'
-
+ # PyPI related publishing variables
+ #
# Pipe-separated list of directories relative to $WORKSPACE containing
- # python modules to publish to PyPI.
+ # python modules to publish to PyPI. Default is current directory which is
+ # correct for simple modules
pypi-module-dirs: '.'
# Which PyPI index to use. Corresponds to values in ~/.pypirc
- # 'pypi' and 'testpypi' are current options.
+ # 'pypi' and 'testpypi' are current options. Default to testpypi, override
+ # in the job once testing is completed
pypi-index: 'testpypi'
# for matching files with file-include-regexp
@@ -98,9 +99,9 @@
# tests. Have to also ignore the commit message on negative match,
# per: https://issues.jenkins-ci.org/browse/JENKINS-19891
code-files-regexp: '^(?!docs|VERSION|\/COMMIT_MSG).*$'
+ api-test-files-regexp: '^(?!docs|VERSION|\/COMMIT_MSG|Jenkinsfile-*).*$'
-
- # Jenkins SSH host doc publisher
+ # Jenkins SSH host doc publisher
docs-ssh-host: 'guide.opencord.org'
docs-ssh-host-key: 'guide.opencord.org,52.9.82.207 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFHwOY3/8GucdKzBngH/FC08nHac/RJ/OheZp2+5EpOPXZG9zQW2YUbXH5A9pO76lI5CG3z3+huG62xEGo99UQU='
diff --git a/jjb/pipeline/all-xos-api-test-helm.groovy b/jjb/pipeline/all-xos-api-test-helm.groovy
index 26d9518..8efdba4 100644
--- a/jjb/pipeline/all-xos-api-test-helm.groovy
+++ b/jjb/pipeline/all-xos-api-test-helm.groovy
@@ -126,7 +126,7 @@
XOS_VERSION=\$(cat cord/orchestration/xos/VERSION)
# update services
- for df in cord/orchestration/xos_services/*/Dockerfile.synchronizer cord/orchestration/profiles/*/Dockerfile.synchronizer
+ for df in cord/orchestration/xos_services/*/Dockerfile.synchronizer
do
df_contents=\$(cat "\$df")
if [[ "\$df_contents" =~ "FROM xosproject/xos-synchronizer-base:\$XOS_MAJOR" ||
diff --git a/jjb/pipeline/siab-test.groovy b/jjb/pipeline/siab-test.groovy
index 98198ba..cb56b00 100644
--- a/jjb/pipeline/siab-test.groovy
+++ b/jjb/pipeline/siab-test.groovy
@@ -7,6 +7,10 @@
label "${params.executorNode}"
}
+ options {
+ timeout(time: 1, unit: 'HOURS')
+ }
+
stages {
stage ("Clean workspace") {
diff --git a/jjb/pipeline/siab.groovy b/jjb/pipeline/siab.groovy
index 7e839a2..72118eb 100644
--- a/jjb/pipeline/siab.groovy
+++ b/jjb/pipeline/siab.groovy
@@ -7,6 +7,10 @@
label "${params.executorNode}"
}
+ options {
+ timeout(time: 1, unit: 'HOURS')
+ }
+
stages {
stage ("Clean workspace") {
diff --git a/jjb/pipeline/xos-synchronizer-update.groovy b/jjb/pipeline/xos-synchronizer-update.groovy
index 570cc5f..13ae1f7 100644
--- a/jjb/pipeline/xos-synchronizer-update.groovy
+++ b/jjb/pipeline/xos-synchronizer-update.groovy
@@ -122,7 +122,7 @@
XOS_VERSION=\$(cat cord/orchestration/xos/VERSION)
# update services
- for df in cord/orchestration/xos_services/*/Dockerfile.synchronizer cord/orchestration/profiles/*/Dockerfile.synchronizer
+ for df in cord/orchestration/xos_services/*/Dockerfile.synchronizer
do
df_contents=\$(cat "\$df")
if [[ "\$df_contents" =~ "FROM xosproject/xos-synchronizer-base:\$XOS_MAJOR" ||
diff --git a/jjb/pypi-publish.yaml b/jjb/pypi-publish.yaml
index 9f34aac..b2076e9 100644
--- a/jjb/pypi-publish.yaml
+++ b/jjb/pypi-publish.yaml
@@ -1,20 +1,9 @@
---
# publishing Python modules to PyPI
-- project:
- name: pypi-publisher
-
- branch-regexp: '{modern-branches-regexp}'
- project-regexp: '{pypi-projects-regexp}'
-
- # wait to run pypi-publish job until version-tag job has tagged the repo
- jobs:
- - 'pypi-publish':
- dependency-jobs: 'version-tag'
-
- job-template:
id: pypi-publish
- name: '{id}'
+ name: 'pypi-publish_{project}'
description: |
Created by {id} job-template from ci-management/jjb/pypi-publish.yaml
When a patch is merged, publish python modules to PyPI
@@ -52,7 +41,7 @@
builders:
- inject:
- properties-content:
+ properties-content: |
PYPI_INDEX={pypi-index}
PYPI_MODULE_DIRS={pypi-module-dirs}
diff --git a/jjb/shell/jflint.sh b/jjb/shell/jflint.sh
index 0972793..18c5b40 100755
--- a/jjb/shell/jflint.sh
+++ b/jjb/shell/jflint.sh
@@ -23,6 +23,8 @@
JENKINS_URL=https://jenkins.opencord.org/
JF_LIST=()
+JF_FAIL=0
+
# if no args, and there's a Jenkinsfile in cwd, check it
if [ ! -n "$1" ] && [ -f "Jenkinsfile" ] ; then
JF_LIST+=("Jenkinsfile")
@@ -39,10 +41,22 @@
fi
# JENKINS_CRUMB is needed if your Jenkins master has CRSF protection enabled as it should
-JENKINS_CRUMB=$(curl "$JENKINS_URL/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,\":\",//crumb)")
+JENKINS_CRUMB=$(curl -s "$JENKINS_URL/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,\":\",//crumb)")
for target in "${JF_LIST[@]-}"; do
- echo "Checking '${target}'"
- curl -X POST -H "${JENKINS_CRUMB}" -F "jenkinsfile=<${target}" $JENKINS_URL/pipeline-model-converter/validate
+ echo "Checking: '${target}'"
+ CURL_OUT=$(curl -s -H "${JENKINS_CRUMB}" -F "jenkinsfile=<${target}" $JENKINS_URL/pipeline-model-converter/validate)
+
+ # Jenkins doesn't set a HTTP failure code when validation fails, so check output
+ if [[ $CURL_OUT =~ Jenkinsfile\ successfully\ validated ]]
+ then
+ echo "Validated successfully: '${target}'"
+ else
+ echo "Failed to validate: '${target}' - errors:"
+ echo "$CURL_OUT"
+ JF_FAIL=1
+ fi
+
done
+exit $JF_FAIL
diff --git a/jjb/siab.yaml b/jjb/siab.yaml
index 454653f..75b0f27 100644
--- a/jjb/siab.yaml
+++ b/jjb/siab.yaml
@@ -159,5 +159,6 @@
project-regexp: 'helm-charts'
branch-regexp: 'master'
dependency-jobs: '{dependency-jobs}'
- file-include-regexp: '{all-files-regexp}'
+
+ file-include-regexp: '^(?!mcord|onos-progran).*$'
diff --git a/jjb/verify/plyxproto.yaml b/jjb/verify/plyxproto.yaml
index 1445410..4eb2c32 100644
--- a/jjb/verify/plyxproto.yaml
+++ b/jjb/verify/plyxproto.yaml
@@ -8,6 +8,9 @@
jobs:
- 'verify-plyxproto-jobs':
branch-regexp: '{supported-branches-regexp}'
+ - 'post-merge-plyxproto-jobs':
+ branch-regexp: '{supported-branches-regexp}'
+ pypi-index: 'pypi'
- job-group:
name: 'verify-plyxproto-jobs'
@@ -17,3 +20,10 @@
dependency-jobs: 'verify_plyxproto_licensed'
- 'python-unit-test':
dependency-jobs: 'verify_plyxproto_sonarqube'
+
+- job-group:
+ name: 'post-merge-plyxproto-jobs'
+ jobs:
+ - 'pypi-publish':
+ project-regexp: '^{name}$'
+ dependency-jobs: 'version-tag'