summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jjb/fuel/fuel-verify-jobs.yml8
-rw-r--r--jjb/global/releng-macros.yml33
-rw-r--r--jjb/kvmfornfv/kvmfornfv.yml30
-rw-r--r--jjb/releng/opnfv-lint.yml51
-rw-r--r--prototypes/puppet-infracloud/manifests/site.pp13
5 files changed, 111 insertions, 24 deletions
diff --git a/jjb/fuel/fuel-verify-jobs.yml b/jjb/fuel/fuel-verify-jobs.yml
index fe8985392..4a76d9da7 100644
--- a/jjb/fuel/fuel-verify-jobs.yml
+++ b/jjb/fuel/fuel-verify-jobs.yml
@@ -21,13 +21,13 @@
#####################################
phase:
- 'basic':
- slave-label: 'opnfv-build'
+ slave-label: 'opnfv-build-ubuntu'
- 'build':
slave-label: 'opnfv-build-ubuntu'
- 'deploy-virtual':
- slave-label: 'opnfv-build'
+ slave-label: 'opnfv-build-ubuntu'
- 'smoke-test':
- slave-label: 'opnfv-build'
+ slave-label: 'opnfv-build-ubuntu'
#####################################
# jobs
#####################################
@@ -97,7 +97,7 @@
project: '{project}'
- gerrit-parameter:
branch: '{branch}'
- - 'opnfv-build-defaults'
+ - 'opnfv-build-ubuntu-defaults'
- 'fuel-verify-defaults':
gs-pathname: '{gs-pathname}'
diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml
index cd92480d4..7647a35d3 100644
--- a/jjb/global/releng-macros.yml
+++ b/jjb/global/releng-macros.yml
@@ -355,3 +355,36 @@
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/
+
+ # 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 . \
+ -path './releng_yamllint' -prune -o \
+ -path './.tox' -prune -o \
+ -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
+
diff --git a/jjb/kvmfornfv/kvmfornfv.yml b/jjb/kvmfornfv/kvmfornfv.yml
index 33c73f9a7..8ab821c9b 100644
--- a/jjb/kvmfornfv/kvmfornfv.yml
+++ b/jjb/kvmfornfv/kvmfornfv.yml
@@ -96,19 +96,19 @@
node-parameters: false
kill-phase-on: FAILURE
abort-all-job: true
- - multijob:
- name: test
- condition: SUCCESSFUL
- projects:
- - name: 'kvmfornfv-verify-test-{stream}'
- current-parameters: false
- predefined-parameters: |
- GERRIT_BRANCH=$GERRIT_BRANCH
- GERRIT_REFSPEC=$GERRIT_REFSPEC
- GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
- node-parameters: false
- kill-phase-on: FAILURE
- abort-all-job: true
+# - multijob:
+# name: test
+# condition: SUCCESSFUL
+# projects:
+# - name: 'kvmfornfv-verify-test-{stream}'
+# current-parameters: false
+# predefined-parameters: |
+# GERRIT_BRANCH=$GERRIT_BRANCH
+# GERRIT_REFSPEC=$GERRIT_REFSPEC
+# GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+# node-parameters: false
+# kill-phase-on: FAILURE
+# abort-all-job: true
- job-template:
name: 'kvmfornfv-verify-{phase}-{stream}'
@@ -194,8 +194,8 @@
scm:
- git-scm
- triggers:
- - timed: '@midnight'
+# triggers:
+# - timed: '@midnight'
builders:
- description-setter:
diff --git a/jjb/releng/opnfv-lint.yml b/jjb/releng/opnfv-lint.yml
index 7115cce48..cd122d895 100644
--- a/jjb/releng/opnfv-lint.yml
+++ b/jjb/releng/opnfv-lint.yml
@@ -9,6 +9,7 @@
jobs:
- 'opnfv-lint-verify-{stream}'
+ - 'opnfv-yamllint-verify-{stream}'
stream:
- master:
@@ -64,3 +65,53 @@
builders:
- lint-python-code
- report-lint-result-to-gerrit
+
+- job-template:
+ name: 'opnfv-yamllint-verify-{stream}'
+
+ disabled: '{obj:disabled}'
+
+ parameters:
+ - project-parameter:
+ project: $GERRIT_PROJECT
+ - gerrit-parameter:
+ branch: '{branch}'
+ - node:
+ name: SLAVE_NAME
+ description: Slaves to execute yamllint
+ default-slaves:
+ - lf-build1
+ allowed-multiselect: true
+ ignore-offline-nodes: true
+
+ scm:
+ - git-scm-gerrit
+
+ triggers:
+ - gerrit:
+ server-name: 'gerrit.opnfv.org'
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: 'false'
+ exclude-trivial-rebase: 'false'
+ exclude-no-code-change: 'false'
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: 'recheck'
+ - comment-added-contains-event:
+ comment-contains-value: 'reverify'
+ projects:
+ - project-compare-type: 'REG_EXP'
+ project-pattern: 'compass4nfv'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ file-paths:
+ - compare-type: ANT
+ pattern: '**/*.yml'
+ - compare-type: ANT
+ pattern: '**/*.yaml'
+
+ builders:
+ - lint-yaml-code
+ - report-lint-result-to-gerrit
diff --git a/prototypes/puppet-infracloud/manifests/site.pp b/prototypes/puppet-infracloud/manifests/site.pp
index 8cbfef8c7..3483b06e5 100644
--- a/prototypes/puppet-infracloud/manifests/site.pp
+++ b/prototypes/puppet-infracloud/manifests/site.pp
@@ -10,13 +10,13 @@ node 'controller00.opnfvlocal' {
$group = 'infracloud'
include ::sudoers
- class { 'opnfv::server':
+ class { '::opnfv::server':
iptables_public_tcp_ports => [80,5000,5671,8774,9292,9696,35357], # logs,keystone,rabbit,nova,glance,neutron,keystone
sysadmins => hiera('sysadmins', []),
enable_unbound => false,
purge_apt_sources => false,
}
- class { 'opnfv::controller':
+ class { '::opnfv::controller':
keystone_rabbit_password => hiera('keystone_rabbit_password'),
neutron_rabbit_password => hiera('neutron_rabbit_password'),
nova_rabbit_password => hiera('nova_rabbit_password'),
@@ -38,6 +38,7 @@ node 'controller00.opnfvlocal' {
neutron_subnet_gateway => hiera('neutron_subnet_gateway'),
neutron_subnet_allocation_pools => hiera('neutron_subnet_allocation_pools'),
opnfv_password => hiera('opnfv_password'),
+ require => Class['::opnfv::server'],
}
}
@@ -45,13 +46,13 @@ node 'compute00.opnfvlocal' {
$group = 'infracloud'
include ::sudoers
- class { 'opnfv::server':
+ class { '::opnfv::server':
sysadmins => hiera('sysadmins', []),
enable_unbound => false,
purge_apt_sources => false,
}
- class { 'opnfv::compute':
+ class { '::opnfv::compute':
nova_rabbit_password => hiera('nova_rabbit_password'),
neutron_rabbit_password => hiera('neutron_rabbit_password'),
neutron_admin_password => hiera('neutron_admin_password'),
@@ -60,11 +61,12 @@ node 'compute00.opnfvlocal' {
br_name => hiera('bridge_name'),
controller_public_address => 'controller00.opnfvlocal',
virt_type => hiera('virt_type'),
+ require => Class['::opnfv::server'],
}
}
node 'jumphost.opnfvlocal' {
- class { 'opnfv::server':
+ class { '::opnfv::server':
sysadmins => hiera('sysadmins', []),
enable_unbound => false,
purge_apt_sources => false,
@@ -97,5 +99,6 @@ node 'baremetal.opnfvlocal', 'lfpod5-jumpserver' {
ipv4_subnet_mask => hiera('ipv4_subnet_mask'),
bridge_name => hiera('bridge_name'),
dib_dev_user_password => hiera('dib_dev_user_password'),
+ require => Class['::opnfv::server'],
}
}