forked from Azure/AgentBaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer.mk
executable file
·26 lines (18 loc) · 1011 Bytes
/
packer.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
build-packer:
@packer build -var-file=vhdbuilder/packer/settings.json vhdbuilder/packer/vhd-image-builder.json
build-packer-windows:
@packer build -var-file=vhdbuilder/packer/settings.json vhdbuilder/packer/windows-vhd-builder.json
init-packer:
@./vhdbuilder/packer/init-variables.sh
az-login:
az login --service-principal -u ${CLIENT_ID} -p ${CLIENT_SECRET} --tenant ${TENANT_ID}
run-packer: az-login
@packer version && ($(MAKE) -f packer.mk init-packer | tee packer-output) && ($(MAKE) -f packer.mk build-packer | tee -a packer-output)
run-packer-windows: az-login
@packer version && ($(MAKE) -f packer.mk init-packer | tee packer-output) && ($(MAKE) -f packer.mk build-packer-windows | tee -a packer-output)
az-copy: az-login
azcopy-preview copy "${OS_DISK_SAS}" "${CLASSIC_BLOB}${CLASSIC_SAS_TOKEN}" --recursive=true
delete-sa: az-login
az storage account delete -n ${SA_NAME} -g ${AZURE_RESOURCE_GROUP_NAME} --yes
generate-sas: az-login
@./vhdbuilder/packer/generate-vhd-publishing-info.sh