project: ci-management
project-name: ci-management
branch: master
- os-cloud-file-id: 'ci-managed-file-id'
build-node: centos7-basebuild-2c-1g
platforms:
**project**: is the project repo as defined in source control.
**project-name**: is a custom name to call the job in Jenkins.
**build-node**: is the name of the builder to use when building (Jenkins label).
-**os-cloud-file-id**: is the name of the managed file-id, which contains
-credentials required for packer to spin up build nodes on the cloud provider.
**platforms**: is a list of supported platforms.
**templates**: is a list of supported templates.
builders:
- config-file-provider:
files:
- - file-id: '{os-cloud-file-id}'
- target: '$HOME/.config/openstack/clouds.yaml'
- - file-id: 'packer-cloud-env'
- variable: 'CLOUDENV'
+ - file-id: packer-cloud-env
+ variable: CLOUDENV
- inject:
properties-content: |
PACKER_PLATFORM={platform}
##############################################################################
echo "---> packer-clear-credentials.sh"
-#!/bin/bash
set +e # DO NOT cause build failure if any of the rm calls fail.
rm "$CLOUDENV"
-rm "$HOME/.config/openstack/clouds.yaml"
exit 0