-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines.yml
77 lines (75 loc) · 4.16 KB
/
azure-pipelines.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
trigger:
- master
- develop
schedules:
- cron: "0 0 * * *"
displayName: Nightly build
branches:
include:
- master
always: true
jobs:
- job: "Windows"
pool:
vmImage: "windows-2019"
steps:
- task: DownloadPipelineArtifact@2
inputs:
buildType: "specific"
project: "2d442586-71f6-4212-8f0e-b684fcfa4e1a"
definition: 6
specificBuildWithTriggering: false
buildVersionToDownload: "latestFromBranch"
branchName: "$(Build.SourceBranch)"
artifactName: "windows-dll"
targetPath: "$(System.ArtifactsDirectory)"
displayName: "Download pahkat-client-core artifact"
- bash: |
set -e
curl -sLo pahkat.exe https://github.com/divvun/pahkat/releases/download/0.6.0/pahkat.exe
git clone https://github.com/divvun/divvun-ci-config.git
openssl aes-256-cbc -d -in ./divvun-ci-config/config.txz.enc -pass pass:$DIVVUN_KEY -out config.txz -md md5
7z e config.txz
tar xf config.tar
mv $SYSTEM_ARTIFACTSDIRECTORY/pahkat_client.dll Pahkat.Sdk
displayName: "Install prerequisites"
env:
DIVVUN_KEY: $(divvunKey)
- task: NuGetCommand@2
inputs:
command: "restore"
restoreSolution: "Pahkat.sln"
displayName: "Restore NuGet packages"
- task: VSBuild@1
inputs:
solution: Pahkat.sln
platform: x86
configuration: release
displayName: "Build"
- script: |
set PATH="%PATH%;C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool;$(System.DefaultWorkingDirectory)"
"C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool" sign /t http://timestamp.verisign.com/scripts/timstamp.dll /f "$(System.DefaultWorkingDirectory)\enc\creds\windows\divvun.pfx" /p %PFX_PASSWORD% /d "Divvun Updater" .\Pahkat\bin\x86\Release\updater.exe
"C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool" sign /t http://timestamp.verisign.com/scripts/timstamp.dll /f "$(System.DefaultWorkingDirectory)\enc\creds\windows\divvun.pfx" /p %PFX_PASSWORD% /d "Divvun Installer" .\Pahkat\bin\x86\Release\Pahkat.Sdk.dll
"C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool" sign /t http://timestamp.verisign.com/scripts/timstamp.dll /f "$(System.DefaultWorkingDirectory)\enc\creds\windows\divvun.pfx" /p %PFX_PASSWORD% /d "Divvun Installer" .\Pahkat\bin\x86\Release\pahkat_client.dll
"C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool" sign /t http://timestamp.verisign.com/scripts/timstamp.dll /f "$(System.DefaultWorkingDirectory)\enc\creds\windows\divvun.pfx" /p %PFX_PASSWORD% /d "Divvun Installer" .\Pahkat\bin\x86\Release\DivvunInstaller.exe
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /Qp /O.\output /S"signtool=C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool.exe sign /t http://timestamp.verisign.com/scripts/timstamp.dll /f "$(System.DefaultWorkingDirectory)\enc\creds\windows\divvun.pfx" /p %PFX_PASSWORD% $f" /dMyAppVersion="$(GitAssemblyInformationalVersion)" setup.iss
copy output\install.exe "$(System.DefaultWorkingDirectory)\divvun-installer.exe"
displayName: "Sign"
env:
PFX_PASSWORD: $(pfxPassword)
- task: PublishPipelineArtifact@0
inputs:
targetPath: "$(System.DefaultWorkingDirectory)/divvun-installer.exe"
artifactName: windows
displayName: "Publish artifact"
- powershell: |
$Date = Get-Date -UFormat '+%Y-%m-%dT%H:%M:%S.000Z'
$Env:PATH += ";$(System.DefaultWorkingDirectory)"
. .\divvun-ci-config\repo\scripts\PahkatDeploySvn.ps1
PahkatDeploySvn -SvnUrl https://pahkat.uit.no/repo/divvun-installer -Artifact "$(System.DefaultWorkingDirectory)\divvun-installer.exe" -Package divvun-installer-windows -Version $Date
displayName: "Deploy to nightly channel"
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
env:
DEPLOY_SVN_USER: $(svnUser)
DEPLOY_SVN_PASSWORD: $(svnPassword)
DEPLOY_SVN_COMMIT: $(svnCommit)