diff options
author | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2017-06-20 09:47:35 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@automotivelinux.org> | 2017-06-20 09:47:35 +0000 |
commit | 8f551bf3eb8a3af4a4754b2966451745fb100bde (patch) | |
tree | 2b8cd2780f12b9b64fd0c6d2b9a47bf9a2b140b0 /jjb/global-macros.yaml | |
parent | 6ef9e145b46df242ecd3f82dea238de44a62a4c9 (diff) | |
parent | a32358763fecf10bda78806374aba34b51befcf9 (diff) |
Merge "Add packer verify and merge jobs for AGL"
Diffstat (limited to 'jjb/global-macros.yaml')
-rw-r--r-- | jjb/global-macros.yaml | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml index b84eedf6..c73bd861 100644 --- a/jjb/global-macros.yaml +++ b/jjb/global-macros.yaml @@ -104,6 +104,9 @@ branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: '{files}' - trigger: name: gerrit-trigger-patch-submitted-manual-verified-silent @@ -431,3 +434,55 @@ - ansicolor - openstack: single-use: false + +- property: + name: agl-infra-properties + properties: + - build-discarder: + days-to-keep: '{build-days-to-keep}' + num-to-keep: '{build-num-to-keep}' + +- builder: + name: packer-validate + builders: + - config-file-provider: + files: + - file-id: 'packer-cloud-env' + variable: 'CLOUDENV' + - shell: | + #!/bin/bash -x + cd packer + varfiles="../packer/vars/*" + templates="../packer/templates/*" + provision="../packer/provision/*.sh" + for v in $varfiles; do + [[ "${v##*/}" =~ ^(cloud-env.*|README.*)$ ]] && 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 \ + -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 + +- builder: + name: packer-build + builders: + - config-file-provider: + files: + - file-id: 'packer-cloud-env' + variable: 'CLOUDENV' + - shell: | + cd packer + export PACKER_LOG="yes" && \ + export PACKER_LOG_PATH="packer-build.log" && \ + packer.io build -color=false -var-file=$CLOUDENV \ + -var-file=../packer/vars/{platform}.json \ + -parallel=false \ + ../packer/templates/{template}.json |