Add upstream feature: extra:Config

This commit is contained in:
Danny Bessems 2021-01-27 12:32:52 +01:00
parent 09f36ea66a
commit a77e189730
3 changed files with 22 additions and 5 deletions

View File

@ -9,7 +9,7 @@ steps:
- | - |
packer validate \ packer validate \
-var-file=packer/variables.vsphere.json \ -var-file=packer/variables.vsphere.json \
-var vm_name=${DRONE_COMMIT_SHA:0:10}-$DRONE_BUILD_NUMBER \ -var vm_name=$DRONE_BUILD_NUMBER-${DRONE_COMMIT_SHA:0:10} \
-var vsphere_password=$${VSPHERE_PASSWORD} \ -var vsphere_password=$${VSPHERE_PASSWORD} \
-var winrm_password=$${WINRM_PASSWORD} \ -var winrm_password=$${WINRM_PASSWORD} \
packer/adds.json packer/adds.json
@ -17,7 +17,7 @@ steps:
packer build \ packer build \
-on-error=cleanup \ -on-error=cleanup \
-var-file=packer/variables.vsphere.json \ -var-file=packer/variables.vsphere.json \
-var vm_name=${DRONE_COMMIT_SHA:0:10}-$DRONE_BUILD_NUMBER \ -var vm_name=$DRONE_BUILD_NUMBER-${DRONE_COMMIT_SHA:0:10} \
-var vsphere_password=$${VSPHERE_PASSWORD} \ -var vsphere_password=$${VSPHERE_PASSWORD} \
-var winrm_password=$${WINRM_PASSWORD} \ -var winrm_password=$${WINRM_PASSWORD} \
packer/adds.json packer/adds.json

View File

@ -65,8 +65,9 @@
{ {
"type": "shell-local", "type": "shell-local",
"inline": [ "inline": [
"pwsh -file scripts/Update-OvfConfiguration.ps1 \\", "pwsh -command \"& scripts/Update-OvfConfiguration.ps1 \\",
" -OVFFile './output-adds/adds-{{user `vm_name`}}.ovf'", " -OVFFile './output-adds/adds-{{user `vm_name`}}.ovf' \\",
" -Parameter @{'appliance.name'='ADDS';'appliance.version'='{{user `vm_name`}}'}\"",
"pwsh -file scripts/Update-Manifest.ps1 \\", "pwsh -file scripts/Update-Manifest.ps1 \\",
" -ManifestFileName './output-adds/adds-{{user `vm_name`}}.mf'", " -ManifestFileName './output-adds/adds-{{user `vm_name`}}.mf'",
"ovftool --acceptAllEulas --allowExtraConfig --overwrite \\", "ovftool --acceptAllEulas --allowExtraConfig --overwrite \\",

View File

@ -144,3 +144,19 @@ PropertyCategories:
- secondary - secondary
- standalone - standalone
UserConfigurable: true UserConfigurable: true
AdvancedOptions:
- Key: appliance.name
Value: "{{ appliance.name }}"
Required: false
- Key: appliance.version
Value: "{{ appliance.version }}"
Required: false
---
Variables:
- Name: appliance.name
Expression: |
$Parameter['appliance.name']
- Name: appliance.version
Expression: |
$Parameter['appliance.version']