-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathazp-ci.yaml
More file actions
64 lines (55 loc) · 1.57 KB
/
Copy pathazp-ci.yaml
File metadata and controls
64 lines (55 loc) · 1.57 KB
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
trigger:
- main
pool:
name: WindowsVMSS
variables:
- group: MagnetForensics-Github
steps:
- checkout: self
clean: true
lfs: true
fetchDepth: 0
path: s
- checkout: git://Griffeye/pipelines
displayName: 'Checkout pipelines'
clean: true
- powershell: pipelines/SetupAgent.ps1 -nugetConfigPath $(Build.SourcesDirectory)\NuGet.Config
displayName: 'Setup nuget credentials'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
- task: PowerShell@2
displayName: 'Build and test'
inputs:
filePath: build.ps1
- task: PublishTestResults@2
inputs:
searchFolder: 'test-results'
testResultsFiles: '*.trx'
testResultsFormat: VSTest
- task: PublishPipelineArtifact@1
displayName: 'Publish NuGet Package artifacts'
inputs:
targetPath: 'artifacts'
artifact: 'NuGet'
- task: NuGetCommand@2
displayName: "Nuget Push to Azure Feed"
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'main'))
inputs:
command: 'push'
packagesToPush: 'artifacts\*.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: 'Griffeye/Library'
allowPackageConflicts: true # --skip-duplicate
- task: PowerShell@2
displayName: 'Push to GitHub'
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'main'))
inputs:
targetType: 'inline'
script: |
git config user.email "Azure@Bot.com"
git config user.name "AzureDevOpsBot"
git remote remove github
git remote add github "https://$(PAT)@github.com/MagnetForensics/griffeye-vlc-wrapper.git"
git push --force github HEAD:master
env:
PAT: $(PAT)