2019-09-24 04:24:05 +00:00
|
|
|
# .NET Desktop
|
2019-10-12 05:06:16 +00:00
|
|
|
|
2019-09-24 04:24:05 +00:00
|
|
|
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
|
|
|
|
# Add steps that publish symbols, save build artifacts, and more:
|
|
|
|
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
- master
|
|
|
|
|
|
|
|
pool:
|
2019-10-25 03:27:17 +00:00
|
|
|
name: Default
|
2019-09-24 04:24:05 +00:00
|
|
|
vmImage: 'windows-latest'
|
|
|
|
|
|
|
|
variables:
|
2019-10-16 21:04:01 +00:00
|
|
|
- group: main-pipeline-keys
|
2019-10-16 21:02:04 +00:00
|
|
|
- name: solution
|
|
|
|
value: 'Wabbajack.sln'
|
|
|
|
- name: buildPlatform
|
|
|
|
value: 'x64'
|
|
|
|
- name: buildConfiguration
|
|
|
|
value: 'Debug'
|
2019-09-24 04:24:05 +00:00
|
|
|
|
|
|
|
steps:
|
2019-09-24 20:12:03 +00:00
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
submodules: true
|
|
|
|
|
2019-09-24 04:24:05 +00:00
|
|
|
- task: NuGetToolInstaller@1
|
|
|
|
|
|
|
|
- task: NuGetCommand@2
|
|
|
|
inputs:
|
|
|
|
restoreSolution: '$(solution)'
|
|
|
|
|
|
|
|
- task: VSBuild@1
|
|
|
|
inputs:
|
|
|
|
solution: '$(solution)'
|
|
|
|
platform: '$(buildPlatform)'
|
|
|
|
configuration: '$(buildConfiguration)'
|
2019-10-13 02:54:04 +00:00
|
|
|
|
2019-09-24 04:24:05 +00:00
|
|
|
- task: VSTest@2
|
|
|
|
inputs:
|
|
|
|
platform: '$(buildPlatform)'
|
|
|
|
configuration: '$(buildConfiguration)'
|
2019-11-05 22:48:30 +00:00
|
|
|
testFiltercriteria: 'TestCategory!=ListValidation'
|
2019-10-12 05:06:16 +00:00
|
|
|
- task: DownloadSecureFile@1
|
|
|
|
inputs:
|
2019-10-12 05:08:44 +00:00
|
|
|
secureFile: 'CertFile.p12'
|
2019-10-12 05:00:04 +00:00
|
|
|
- task: codesigning@2
|
2019-10-12 14:33:24 +00:00
|
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
2019-10-12 05:00:04 +00:00
|
|
|
inputs:
|
2019-10-12 05:08:44 +00:00
|
|
|
secureFileId: 'CertFile.p12'
|
2019-10-12 05:00:04 +00:00
|
|
|
signCertPassword: '$(CertPassword)'
|
|
|
|
files: '$(System.DefaultWorkingDirectory)/Wabbajack/bin/x64/Debug/Wabbajack.exe'
|
|
|
|
timeServer: 'http://timestamp.digicert.com'
|
|
|
|
hashingAlgorithm: 'SHA256'
|
|
|
|
description: 'Wabbajack Modlist Installer'
|
2019-10-12 14:21:59 +00:00
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
|
|
|
script: 'pip install requests'
|
2019-10-12 14:16:41 +00:00
|
|
|
- task: PythonScript@0
|
2019-10-12 14:33:24 +00:00
|
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
2019-10-12 13:06:03 +00:00
|
|
|
inputs:
|
2019-10-12 14:16:41 +00:00
|
|
|
scriptSource: 'inline'
|
2019-10-12 13:06:03 +00:00
|
|
|
script: |
|
2019-10-12 14:16:41 +00:00
|
|
|
import requests, sys
|
|
|
|
|
|
|
|
url = 'https://www.virustotal.com/vtapi/v2/file/scan'
|
|
|
|
|
|
|
|
params = {'apikey': sys.argv[1]}
|
|
|
|
|
|
|
|
files = {'file': ('Wabbajack.exe', open(sys.argv[2], 'rb'))}
|
|
|
|
|
|
|
|
response = requests.post(url, files=files, params=params)
|
|
|
|
|
|
|
|
print(response.json())
|
|
|
|
arguments: '$(VirusTotalAPIKey) $(System.DefaultWorkingDirectory)/Wabbajack/bin/x64/Debug/Wabbajack.exe'
|
2019-10-12 13:06:03 +00:00
|
|
|
|
2019-10-12 04:34:56 +00:00
|
|
|
- task: PublishBuildArtifacts@1
|
2019-10-12 14:33:24 +00:00
|
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
2019-10-12 04:34:56 +00:00
|
|
|
inputs:
|
2019-10-12 04:51:16 +00:00
|
|
|
PathtoPublish: '$(System.DefaultWorkingDirectory)/Wabbajack/bin/x64/Debug/Wabbajack.exe'
|
2019-10-12 04:34:56 +00:00
|
|
|
ArtifactName: 'Wabbajack.exe'
|
|
|
|
publishLocation: 'Container'
|