Packer.Images/.drone.yml
djpbessems f36f452a59
All checks were successful
continuous-integration/drone/push Build is passing
Remove redundant variable;Fix path
2021-06-04 22:17:55 +02:00

41 lines
1.0 KiB
YAML

kind: pipeline
type: kubernetes
name: 'Packer Build'
steps:
- name: Active Directory Domain Services
image: bv11-cr01.bessems.eu/library/packer-extended
pull: always
commands:
- |
yamllint -d "{extends: relaxed, rules: {line-length: disable}}" scripts
- |
packer init -upgrade \
./packer
- |
packer validate \
-var vm_name=$DRONE_BUILD_NUMBER-${DRONE_COMMIT_SHA:0:10} \
-var vsphere_password=$${VSPHERE_PASSWORD} \
-var winrm_password=$${WINRM_PASSWORD} \
./packer
- |
packer build \
-on-error=cleanup -timestamp-ui \
-var vm_name=$DRONE_BUILD_NUMBER-${DRONE_COMMIT_SHA:0:10} \
-var vsphere_password=$${VSPHERE_PASSWORD} \
-var winrm_password=$${WINRM_PASSWORD} \
./packer
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