Packer.Images/.drone.yml

40 lines
1.0 KiB
YAML
Raw Normal View History

kind: pipeline
type: kubernetes
name: 'Packer Build'
steps:
- name: Active Directory Domain Services
image: bv11-cr01.bessems.eu/library/packer-extended
2021-04-09 08:59:46 +00:00
pull: always
commands:
- |
yamllint -d "{extends: relaxed, rules: {line-length: disable}}" scripts
- |
packer validate \
-var-file=packer/variables.vsphere.json \
2021-01-27 11:32:52 +00:00
-var vm_name=$DRONE_BUILD_NUMBER-${DRONE_COMMIT_SHA:0:10} \
-var vsphere_password=$${VSPHERE_PASSWORD} \
-var winrm_password=$${WINRM_PASSWORD} \
packer/adds.json
- |
packer build \
-on-error=cleanup \
-var-file=packer/variables.vsphere.json \
2021-01-27 11:32:52 +00:00
-var vm_name=$DRONE_BUILD_NUMBER-${DRONE_COMMIT_SHA:0:10} \
-var vsphere_password=$${VSPHERE_PASSWORD} \
-var winrm_password=$${WINRM_PASSWORD} \
packer/adds.json
environment:
VSPHERE_PASSWORD:
from_secret: vsphere_password
WINRM_PASSWORD:
from_secret: winrm_password
# PACKER_LOG: 1
volumes:
- name: output
path: /output
volumes:
- name: output
claim:
name: flexvolsmb-drone-output