summaryrefslogtreecommitdiffstats
path: root/jjb/global
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/global')
-rw-r--r--jjb/global/installer-params.yml4
-rw-r--r--jjb/global/releng-defaults.yml6
-rw-r--r--jjb/global/releng-macros.yml101
-rw-r--r--jjb/global/slave-params.yml13
4 files changed, 86 insertions, 38 deletions
diff --git a/jjb/global/installer-params.yml b/jjb/global/installer-params.yml
index 610072d1b..4a50a5906 100644
--- a/jjb/global/installer-params.yml
+++ b/jjb/global/installer-params.yml
@@ -109,11 +109,11 @@
description: 'IP of the installer'
- string:
name: INSTALLER_TYPE
- default: apex
+ default: netvirt
description: 'Installer used for deploying OPNFV on this POD'
- string:
name: DEPLOY_SCENARIO
- default: 'none'
+ default: 'os-odl_l2-bgpvpn-noha'
description: 'Scenario to deploy and test'
- string:
name: EXTERNAL_NETWORK
diff --git a/jjb/global/releng-defaults.yml b/jjb/global/releng-defaults.yml
index bf3330657..5003a8f48 100644
--- a/jjb/global/releng-defaults.yml
+++ b/jjb/global/releng-defaults.yml
@@ -9,13 +9,9 @@
artifactDaysToKeep: 30
artifactNumToKeep: 100
- ssh-credentials: 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e'
wrappers:
- - ssh-agent-credentials:
- users:
- - '{ssh-credentials}'
+ - ssh-agent-wrapper
project-type: freestyle
node: master
-
diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml
index 3afd355e6..10835f6a3 100644
--- a/jjb/global/releng-macros.yml
+++ b/jjb/global/releng-macros.yml
@@ -1,4 +1,15 @@
-# OLD Releng macros
+# Releng macros
+#
+# NOTE: make sure macros are listed in execution ordered.
+#
+# 1. parameters/properties
+# 2. scm
+# 3. triggers
+# 4. wrappers
+# 5. prebuilders (maven only, configured like Builders)
+# 6. builders (maven, freestyle, matrix, etc..)
+# 7. postbuilders (maven only, configured like Builders)
+# 8. publishers/reporters/notifications
- parameter:
name: project-parameter
@@ -27,38 +38,27 @@
- scm:
name: git-scm
scm:
- - git:
- credentials-id: '{credentials-id}'
+ - git: &git-scm-defaults
+ credentials-id: '$SSH_CREDENTIAL_ID'
url: '$GIT_BASE'
- refspec: ''
branches:
- - 'origin/{branch}'
- skip-tag: true
- wipe-workspace: true
+ - 'origin/$GERRIT_BRANCH'
+ timeout: 15
- scm:
- name: gerrit-trigger-scm
+ name: git-scm-gerrit
scm:
- git:
- credentials-id: '{credentials-id}'
- url: '$GIT_BASE'
- refspec: '{refspec}'
- branches:
- - 'origin/$GERRIT_BRANCH'
- skip-tag: true
- choosing-strategy: '{choosing-strategy}'
- timeout: 15
+ choosing-strategy: 'gerrit'
+ refspec: '$GERRIT_REFSPEC'
+ <<: *git-scm-defaults
- trigger:
name: 'daily-trigger-disabled'
triggers:
- timed: ''
-- trigger:
- name: 'weekly-trigger-disabled'
- triggers:
- - timed: ''
-
+# NOTE: unused macro, but we may use this for some jobs.
- trigger:
name: gerrit-trigger-patch-submitted
triggers:
@@ -79,6 +79,7 @@
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
+# NOTE: unused macro, but we may use this for some jobs.
- trigger:
name: gerrit-trigger-patch-merged
triggers:
@@ -95,16 +96,12 @@
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
-- publisher:
- name: archive-artifacts
- publishers:
- - archive:
- artifacts: '{artifacts}'
- allow-empty: true
- fingerprint: true
- latest-only: true
-
-# New Releng macros
+- wrapper:
+ name: ssh-agent-wrapper
+ wrappers:
+ - ssh-agent-credentials:
+ users:
+ - 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e'
- builder:
name: build-html-and-pdf-docs-output
@@ -355,3 +352,45 @@
name: check-bash-syntax
builders:
- shell: "find . -name '*.sh' | xargs bash -n"
+
+- builder:
+ name: lint-yaml-code
+ builders:
+ - shell: |
+ #!/bin/bash
+ set -o errexit
+ set -o pipefail
+ set -o xtrace
+ export PATH=$PATH:/usr/local/bin/
+
+ # install python packages
+ pip install "yamllint==1.6.0"
+
+ # generate and upload lint log
+ echo "Running yaml code on $PROJECT ..."
+
+ # Ensure we start with a clean environment
+ rm -f yaml-violation.log lint.log
+
+ # Get number of yaml violations. If none, this will be an
+ # empty string: ""
+ find . \
+ -type f -name "*.yml" -print \
+ -o -name "*.yaml" -print | \
+ xargs yamllint > yaml-violation.log || true
+
+ if [ -s "yaml-violation.log" ]; then
+ SHOWN=$(cat yaml-violation.log| grep -v "^$" |wc -l)
+ echo -e "First $SHOWN shown\n---" > lint.log
+ cat yaml-violation.log >> lint.log
+ sed -r -i '4,$s/^/ /g' lint.log
+ fi
+
+- publisher:
+ name: archive-artifacts
+ publishers:
+ - archive:
+ artifacts: '{artifacts}'
+ allow-empty: true
+ fingerprint: true
+ latest-only: true
diff --git a/jjb/global/slave-params.yml b/jjb/global/slave-params.yml
index 7eec70918..30ebb950f 100644
--- a/jjb/global/slave-params.yml
+++ b/jjb/global/slave-params.yml
@@ -425,6 +425,19 @@
name: GIT_BASE
default: https://gerrit.opnfv.org/gerrit/$PROJECT
- parameter:
+ name: 'huawei-pod7-defaults'
+ parameters:
+ - node:
+ name: SLAVE_NAME
+ description: 'Slave name on Jenkins'
+ allowed-slaves:
+ - huawei-pod7
+ default-slaves:
+ - huawei-pod7
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+- parameter:
name: 'zte-pod1-defaults'
parameters:
- node: