From ae98042e4ea09293a967018b102ee4f2eea5375c Mon Sep 17 00:00:00 2001 From: djpbessems Date: Fri, 4 Jun 2021 22:31:53 +0200 Subject: [PATCH] Housekeeping;Add debugging information --- .drone.yml | 10 ++++++ packer/adds.json | 91 ------------------------------------------------ 2 files changed, 10 insertions(+), 91 deletions(-) delete mode 100644 packer/adds.json diff --git a/.drone.yml b/.drone.yml index 626068b..9b2e422 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,6 +3,16 @@ type: kubernetes name: 'Packer Build' steps: +- name: Debugging information + image: bv11-cr01.bessems.eu/library/packer-extended + commands: + - | + set -x + + yamllint --version + packer --version + pwsh --version + ovftool --version - name: Active Directory Domain Services image: bv11-cr01.bessems.eu/library/packer-extended pull: always diff --git a/packer/adds.json b/packer/adds.json deleted file mode 100644 index b91c154..0000000 --- a/packer/adds.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "builders": [ - { - "type": "vsphere-clone", - "name": "adds", - - "vcenter_server": "{{user `vcenter_server`}}", - "username": "{{user `vsphere_username`}}", - "password": "{{user `vsphere_password`}}", - "insecure_connection": "true", - - "vm_name": "adds-{{user `vm_name`}}", - "datastore": "{{user `vsphere_datastore`}}", - "folder": "{{user `vsphere_folder`}}", - "datacenter": "{{user `vsphere_datacenter`}}", - "host": "{{user `vsphere_host`}}", - "boot_order": "disk,cdrom", - - "communicator": "winrm", - "winrm_username": "administrator", - "winrm_password": "{{user `winrm_password`}}", - "winrm_timeout": "10m", - - "cpus": 2, - "RAM": 8192, - - "template": "Windows-Server-2019-LTSC", - - "floppy_files": [ - "packer/preseed/ADDS/Sysprep_Unattend.xml" - ], - - "boot_command": "", - "boot_wait": "2m30s", - - "shutdown_command": "C:\\Windows\\System32\\Sysprep\\sysprep.exe /generalize /oobe /unattend:A:\\Sysprep_Unattend.xml", - "shutdown_timeout": "1h", - - "export": { - "images": false - } - } - ], - "provisioners": [ - { - "type": "powershell", - "inline": [ - "New-Item -Path 'C:\\Payload\\Scripts' -ItemType 'Directory' -Force:$True -Confirm:$False" - ] - }, - { - "type": "file", - "source": "scripts/ADDS/payload/", - "destination": "C:\\Payload\\" - }, - { - "type": "powershell", - "scripts": [ - "scripts/ADDS/Install-Prerequisites.ps1", - "scripts/ADDS/Register-ScheduledTask.ps1" - ] - } - ], - "post-processors": [[ - { - "type": "shell-local", - "inline": [ - "pwsh -command \"& scripts/Update-OvfConfiguration.ps1 \\", - " -OVFFile './output-adds/adds-{{user `vm_name`}}.ovf' \\", - " -Parameter @{'appliance.name'='ADDS';'appliance.version'='{{user `vm_name`}}'}\"", - "pwsh -file scripts/Update-Manifest.ps1 \\", - " -ManifestFileName './output-adds/adds-{{user `vm_name`}}.mf'", - "ovftool --acceptAllEulas --allowExtraConfig --overwrite \\", - " './output-adds/adds-{{user `vm_name`}}.ovf' \\", - " /output/ADDS-appliance.ova" - ] - } - ], - [ - { - "type": "shell-local", - "inline": [ - "pwsh -file scripts/Remove-Resources.ps1 \\", - " -VMName 'adds-{{user `vm_name`}}' \\", - " -VSphereFQDN '{{user `vcenter_server`}}' \\", - " -VSphereUsername '{{user `vsphere_username`}}' \\", - " -VSpherePassword '{{user `vsphere_password`}}'" - ] - } - ]] -}