-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
88 lines (75 loc) · 3.34 KB
/
.appveyor.yml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
version: 1.0.{build}
branches:
# whitelist
only:
- master
init:
skip_tags: true
image: Visual Studio 2019
shallow_clone: true
clone_depth: 1
environment:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
CERTES_ACME_ACCOUNT_KEY:
secure: fmkn8cbE+A1dHITS3s7NADqKi+2rYNKSSjuuLWvkX199WThoEptlCXKAwxlMhWZtBrXdNU5D+1RHI2ouDwWF7hwcIHcGf30v2UohFR+YHujT/N6c4EnK3261CNNm6AklbINPJ72+QPu04/NqEzDAtA==
CERTES_AZURE_SUBSCRIPTION_ID:
secure: qlIhQ+SrJd+0Cu5qi7NpEuMqyacUctIqLtIi8BnDzht1OIA/0wGm7XPmMXNNcpeQ
CERTES_AZURE_TENANT_ID:
secure: 4FrR9+ARA8H+bLFFQDT4C1TAZv/LTO69vFpfjpqR5BVTedqgsZcey6xuS2TDA46l
CERTES_AZURE_CLIENT_ID:
secure: VPw9cVS8bepAY/woGx28FZTNvqeLCqkn+ytg51Kpn+8NrQDqcVGPG7pXOJHp2Et/
CERTES_AZURE_CLIENT_SECRET:
secure: jhbz7sM4ULB23VuQJB9Spl5J2QMca8R1Rru4i0X8RcOinsfTJqdM6x2WuojKfR6m
cache:
install:
- ps: >-
$domain1 = "*.lo0.in";
$domain2 = "*.ci-$($env:APPVEYOR_BUILD_NUMBER).lo0.in";
- ps: dotnet new tool-manifest
- ps: dotnet tool install dotnet-certes --version *-* --add-source https://www.myget.org/F/certes/api/v3/index.json
nuget:
disable_publish_on_pr: true
build_script:
# create wildcard order
- ps: Add-AppveyorMessage -Message "certes order new $domain1 $domain2"
- ps: $order = dotnet certes order new $domain1 $domain2 | ConvertFrom-Json
- ps: $orderLocation = $order.location
# deploy DNS response to Azure
- ps: Add-AppveyorMessage -Message "certes az dns $orderLocation $domain1 --resource-group certes"
- ps: dotnet certes az dns $orderLocation $domain1 --resource-group certes
- ps: Add-AppveyorMessage -Message "certes az dns $orderLocation $domain2 --resource-group certes"
- ps: dotnet certes az dns $orderLocation $domain2 --resource-group certes
# validate DNS response
- ps: Add-AppveyorMessage -Message "certes order validate $orderLocation $domain1 dns"
- ps: dotnet certes order validate $orderLocation $domain1 dns
- ps: Add-AppveyorMessage -Message "certes order validate $orderLocation $domain2 dns"
- ps: dotnet certes order validate $orderLocation $domain2 dns
# submit CSR
- ps: Add-AppveyorMessage -Message "certes order finalize $orderLocation --dn `"CN=$($domain)`" --out ./key.pem"
- ps: dotnet certes order finalize $orderLocation --dn "CN=$($domain)" --out ./key.pem
# install SSL binding for Azure web app
- ps: Add-AppveyorMessage -Message "certes az app $orderLocation www.lo0.in certes --slot ci --resource-group certes --private-key ./key.pem"
- ps: dotnet certes az app $orderLocation www.lo0.in certes-qa --resource-group certes --private-key ./key.pem | Out-Null
# export certificate
- ps: Add-AppveyorMessage -Message "certes cert pem $orderLocation --out cert.pem"
- ps: dotnet certes cert pem $orderLocation --out cert.pem
- ps: Add-AppveyorMessage -Message "certes cert pfx $orderLocation certes --private-key ./key.pem --out cert.pfx"
- ps: dotnet certes cert pfx $orderLocation certes --private-key ./key.pem --out cert.pfx
test: off
artifacts:
- path: '**\*.pfx'
name: pfx
- path: '**\*.pem'
name: pem
deploy:
- provider: GitHub
release: v$(APPVEYOR_BUILD_VERSION)
description: 'PFX password: certes'
auth_token:
secure: h8W1UnvbXvIldJLmdlHeaXln2IOPfGCYF9eFx12tPBS4x+9F0yBX3y8kJSxIncun
artifact: pfx,pem
draft: false
prerelease: false
on:
branch: master