2018-08-15 00:32:58 +03:00
|
|
|
build-packer:
|
2020-01-17 01:56:25 +03:00
|
|
|
@packer build -var-file=vhd/packer/settings.json vhd/packer/vhd-image-builder.json
|
2018-08-15 00:32:58 +03:00
|
|
|
|
2020-03-25 19:52:57 +03:00
|
|
|
build-packer-ubuntu-gen2:
|
|
|
|
@packer build -var-file=vhd/packer/settings.json vhd/packer/vhd-image-builder-ubuntu-gen2.json
|
|
|
|
|
2019-08-19 23:07:40 +03:00
|
|
|
build-packer-windows:
|
2020-10-09 02:16:32 +03:00
|
|
|
@packer build -var-file=vhd/packer/settings.json -var-file=vhd/packer/windows-${WINDOWS_SERVER_VERSION}-vars.json vhd/packer/windows-vhd-builder.json
|
2019-08-19 23:07:40 +03:00
|
|
|
|
2018-08-15 00:32:58 +03:00
|
|
|
init-packer:
|
2020-01-17 01:56:25 +03:00
|
|
|
@./vhd/packer/init-variables.sh
|
2018-08-15 00:32:58 +03:00
|
|
|
|
|
|
|
az-login:
|
|
|
|
az login --service-principal -u ${CLIENT_ID} -p ${CLIENT_SECRET} --tenant ${TENANT_ID}
|
|
|
|
|
|
|
|
run-packer: az-login
|
2019-03-05 20:31:16 +03:00
|
|
|
@packer version && set -o pipefail && ($(MAKE) init-packer | tee packer-output) && ($(MAKE) build-packer | tee -a packer-output)
|
2018-08-15 00:32:58 +03:00
|
|
|
|
2020-03-25 19:52:57 +03:00
|
|
|
run-packer-ubuntu-gen2: az-login
|
|
|
|
@packer version && set -o pipefail && ($(MAKE) init-packer | tee packer-output) && ($(MAKE) build-packer-ubuntu-gen2 | tee -a packer-output)
|
|
|
|
|
2019-08-19 23:07:40 +03:00
|
|
|
run-packer-windows: az-login
|
|
|
|
@packer version && set -o pipefail && ($(MAKE) init-packer | tee packer-output) && ($(MAKE) build-packer-windows | tee -a packer-output)
|
|
|
|
|
2018-08-15 00:32:58 +03:00
|
|
|
az-copy: az-login
|
2019-08-21 19:41:22 +03:00
|
|
|
azcopy-preview copy "${OS_DISK_SAS}" "${CLASSIC_BLOB}${CLASSIC_SAS_TOKEN}"
|
2018-08-15 00:32:58 +03:00
|
|
|
|
2019-02-27 20:39:59 +03:00
|
|
|
delete-sa: az-login
|
|
|
|
az storage account delete -n ${SA_NAME} -g ${AZURE_RESOURCE_GROUP_NAME} --yes
|
|
|
|
|
2018-08-15 00:32:58 +03:00
|
|
|
generate-sas: az-login
|
2019-03-05 20:31:16 +03:00
|
|
|
az storage container generate-sas --name vhds --permissions lr --connection-string "${CLASSIC_SA_CONNECTION_STRING}" --start ${START_DATE} --expiry ${EXPIRY_DATE} | tr -d '"' | tee -a vhd-sas && cat vhd-sas
|
2020-01-09 22:08:47 +03:00
|
|
|
|
|
|
|
windows-vhd-publishing-info: az-login
|
2020-01-17 01:56:25 +03:00
|
|
|
@./vhd/packer/generate-windows-vhd-publishing-info.sh
|