summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Grimberg <agrimberg@linuxfoundation.org>2017-02-01 06:55:07 -0800
committerAndrew Grimberg <agrimberg@linuxfoundation.org>2017-02-01 07:06:03 -0800
commitadec00beb548b87eb58808722fa86bf430d45863 (patch)
tree8c9292c86d17f9fa72564016c908af9dcc78d690
parent31d1a31d1fd8b480e57b1bb61ae21af7850749e4 (diff)
Update and enable packer build jobs
Enable the packer build jobs and update them to be in line with our current optimal configuration Change-Id: I20b06c9b77005a7342c010cce409226d1b993df2 Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
-rw-r--r--jjb/ci-management/ci-management-macros.yaml27
-rw-r--r--jjb/ci-management/ci-management.yaml10
2 files changed, 25 insertions, 12 deletions
diff --git a/jjb/ci-management/ci-management-macros.yaml b/jjb/ci-management/ci-management-macros.yaml
index a5427ce06..c4eef5d26 100644
--- a/jjb/ci-management/ci-management-macros.yaml
+++ b/jjb/ci-management/ci-management-macros.yaml
@@ -7,13 +7,28 @@
files:
- file-id: 'packer-cloud-env'
variable: 'CLOUDENV'
+ # yamllint disable rule:line-length
- shell: |
cd packer
- export PACKER_LOG="yes"
- export PACKER_LOG_PATH="packer-validate.log"
- packer.io validate -var-file=$CLOUDENV \
- -var-file=vars/{platform}.json \
- templates/{template}.json
+ varfiles="../packer/vars/*"
+ templates="../packer/templates/*"
+ provision="../packer/provision/*.sh"
+ for v in $varfiles; do
+ [[ "${{v##*/}}" =~ ^(cloud-env.*)$ ]] && continue
+ for t in $templates; do
+ export PACKER_LOG="yes" && \
+ export PACKER_LOG_PATH="packer-validate-${{v##*/}}-${{t##*/}}.log" && \
+ packer.io validate -var-file=$CLOUDENV -color=false \
+ -var-file=$v $t
+ if [ $? -ne 0 ]; then
+ break
+ fi
+ done
+ done
+ for p in $provision; do
+ /bin/bash -n $p > provision-validate-${{p##*/}}.log 2>&1
+ done
+ # yamllint enable
- builder:
name: packer-build
@@ -21,7 +36,7 @@
- shell: |
cd packer
export PACKER_LOG="yes"
- export PACKER_LOG_PATH="packer-validate.log"
+ export PACKER_LOG_PATH="packer-build.log"
packer.io build -color=false \
-var-file=$CLOUDENV \
-var-file=vars/{platform}.json \
diff --git a/jjb/ci-management/ci-management.yaml b/jjb/ci-management/ci-management.yaml
index 1d230621e..f78323ed3 100644
--- a/jjb/ci-management/ci-management.yaml
+++ b/jjb/ci-management/ci-management.yaml
@@ -5,8 +5,8 @@
jobs:
- '{project}-verify-jjb'
- '{project}-merge-jjb'
- # - '{project}-verify-packer-{platforms}-{templates}'
- # - '{project}-merge-packer-{platforms}-{templates}'
+ - '{project}-verify-packer'
+ - '{project}-merge-packer-{platforms}-{templates}'
archive-artifacts: '**/*.log'
branch: 'master'
@@ -123,7 +123,7 @@
# maven-version: 'mvn33'
- job-template:
- name: '{project}-verify-packer-{platforms}-{templates}'
+ name: '{project}-verify-packer'
project-type: freestyle
node: '{build-node}'
concurrent: true
@@ -156,9 +156,7 @@
files: 'packer/**'
builders:
- - packer-validate:
- platform: '{platforms}'
- template: '{templates}'
+ - packer-validate
# publishers:
# - ecomp-infra-shiplogs: