-
Notifications
You must be signed in to change notification settings - Fork 36
/
azure-pipelines.yml
87 lines (71 loc) · 2.14 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
78
79
80
81
82
83
84
85
86
87
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
vmImage: 'vs2017-win2016'
variables:
update_type: patch
group: build_vars
system.debug: true
steps:
- checkout: self
persistCredentials: true
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: true
- powershell: |
Write-Host "vsce setup"
npm install vsce -g
displayName: 'install vsce'
- powershell: |
npm config set package-lock false
displayName: 'npm disable package lock'
- powershell: |
if ((test-path .\package-lock.json) -eq "True") {rm package-lock.json -force} else {}
displayName: "remove package lock if present"
- powershell: |
(Get-Content -Raw .\snippets\snippets.json | ConvertFrom-Json)
(Get-Content -Raw .\snippets\yaml-snippets.json | ConvertFrom-Json)
displayName: "validate extension JSON schema"
- powershell: |
Write-Host "setting up git properties for npm version"
git config --global user.email "[email protected]"
git config --global user.name "AWS Scripting Guy from Azure DevOps"
displayName: "set up git properties"
- powershell: |
git status
git show
git checkout master
displayName: "git checkout master"
- powershell: |
Write-Host "npm version $(UPDATE_TYPE)"
npm version
npm version $(UPDATE_TYPE) -m "***NO_CI*** %s" -f
displayName: 'update version field in package.json'
- powershell: |
Write-Host "vsce package"
vsce package
displayName: 'package into .vsix'
- powershell: |
.\scripts\git-package.ps1
env:
BUILD_REASON: $(Build.Reason)
displayName: "push updated package.json to remote git"
- task: CopyFiles@2
displayName: 'Copy Files to Artifact Directory)'
inputs:
Contents: |
**\*.vsix
**\package.json
**\images\ManagementTools_CloudFormation.png
TargetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: false
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact'
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: MyBuildOutputs