This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 558
/
.vsts-ci.yaml
58 lines (56 loc) · 2.19 KB
/
.vsts-ci.yaml
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
trigger: none
# steps:
# - create an VHD in Packer to normal storage account
# - copy from Packer storage account to classic storage account using AzCopy
# - generate SAS link from azure CLI
# - POST a new SKU to azure marketplace
phases:
- phase: build_vhd
queue:
name: Hosted Ubuntu 1604
timeoutInMinutes: 120
steps:
- script: |
docker run --rm \
-v ${PWD}:/go/src/github.com/Azure/acs-engine \
-w /go/src/github.com/Azure/acs-engine \
-e CLIENT_ID=${CLIENT_ID} \
-e CLIENT_SECRET="$(CLIENT_SECRET)" \
-e TENANT_ID=${TENANT_ID} \
-e AZURE_VM_SIZE=${AZURE_VM_SIZE} \
-e AZURE_RESOURCE_GROUP_NAME=${AZURE_RESOURCE_GROUP_NAME} \
-e AZURE_LOCATION=${AZURE_LOCATION} \
-e FEATURE_FLAGS=${FEATURE_FLAGS} \
-e GIT_VERSION=$(Build.SourceVersion) \
-e BUILD_ID=$(Build.BuildId) \
-e BUILD_NUMBER=$(Build.BuildNumber) \
${DEIS_GO_DEV_IMAGE} make run-packer
displayName: Building VHD
- script: |
OS_DISK_SAS="$(cat packer-output | grep "OSDiskUriReadOnlySas:" | cut -d " " -f 2)" && \
VHD_NAME="$(echo $OS_DISK_SAS | cut -d "/" -f 8 | cut -d "?" -f 1)" && \
printf "COPY ME ----> ${CLASSIC_BLOB}/${VHD_NAME}?" | tee -a vhd-sas && \
docker run --rm \
-v ${PWD}:/go/src/github.com/Azure/acs-engine \
-w /go/src/github.com/Azure/acs-engine \
-e CLIENT_ID=${CLIENT_ID} \
-e CLIENT_SECRET="$(CLIENT_SECRET)" \
-e TENANT_ID=${TENANT_ID} \
-e CLASSIC_BLOB=${CLASSIC_BLOB} \
-e CLASSIC_SAS_TOKEN="$(SAS_TOKEN)" \
-e OS_DISK_SAS=${OS_DISK_SAS} \
-e VHD_NAME=${VHD_NAME} \
${DEIS_GO_DEV_IMAGE} make az-copy
displayName: Copying resource to Classic Storage Account
- script: |
docker run --rm \
-v ${PWD}:/go/src/github.com/Azure/acs-engine \
-w /go/src/github.com/Azure/acs-engine \
-e CLIENT_ID=${CLIENT_ID} \
-e CLIENT_SECRET="$(CLIENT_SECRET)" \
-e TENANT_ID=${TENANT_ID} \
-e CLASSIC_SA_CONNECTION_STRING="$(CLASSIC_SA_CONNECTION_STRING)" \
-e START_DATE=${START_DATE} \
-e EXPIRY_DATE=${EXPIRY_DATE} \
${DEIS_GO_DEV_IMAGE} make generate-sas
displayName: Getting Shared Access Signature URI