2021-01-23 15:04:42 +00:00
|
|
|
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
|
2021-01-23 15:04:42 +00:00
|
|
|
commands:
|
2021-04-09 09:03:40 +00:00
|
|
|
- |
|
2021-04-09 09:24:46 +00:00
|
|
|
yamllint -d "{extends: relaxed, rules: {line-length: disable}}" scripts
|
2021-06-04 20:16:06 +00:00
|
|
|
- |
|
|
|
|
packer init -upgrade \
|
|
|
|
./packer
|
2021-01-23 15:04:42 +00:00
|
|
|
- |
|
|
|
|
packer validate \
|
2021-01-27 11:32:52 +00:00
|
|
|
-var vm_name=$DRONE_BUILD_NUMBER-${DRONE_COMMIT_SHA:0:10} \
|
2021-01-23 15:04:42 +00:00
|
|
|
-var vsphere_password=$${VSPHERE_PASSWORD} \
|
|
|
|
-var winrm_password=$${WINRM_PASSWORD} \
|
2021-06-04 20:16:06 +00:00
|
|
|
./packer
|
2021-01-23 15:04:42 +00:00
|
|
|
- |
|
|
|
|
packer build \
|
2021-06-04 20:16:06 +00:00
|
|
|
-on-error=cleanup -timestamp-ui \
|
2021-01-27 11:32:52 +00:00
|
|
|
-var vm_name=$DRONE_BUILD_NUMBER-${DRONE_COMMIT_SHA:0:10} \
|
2021-01-23 15:04:42 +00:00
|
|
|
-var vsphere_password=$${VSPHERE_PASSWORD} \
|
|
|
|
-var winrm_password=$${WINRM_PASSWORD} \
|
2021-06-04 20:17:55 +00:00
|
|
|
./packer
|
2021-01-23 15:04:42 +00:00
|
|
|
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
|