Skip to content

Commit aa2f277

Browse files
ci: finished ci & pr pipeline configs
1 parent 6b4e49f commit aa2f277

File tree

2 files changed

+61
-3
lines changed

2 files changed

+61
-3
lines changed

.azure-pipelines/ci.yml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
trigger:
22
- master
33

4-
pr:
5-
- master
4+
pr: none
65

76
pool:
87
vmImage: 'Ubuntu-16.04'
@@ -22,5 +21,39 @@ steps:
2221
testResultsFormat: 'JUnit'
2322
testResultsFiles: 'xunit.xml'
2423
searchFolder: '$(Build.SourcesDirectory)/.testresults/unit'
25-
testRunTitle: 'vscode-python-pack::Unit Tests::Build $(Build.BuildId)'
24+
testRunTitle: 'vscode-python-pack::Unit Tests::CI Build $(Build.BuildId)'
25+
26+
27+
- script: |
28+
git checkout master
29+
git config user.name $(githubUser)
30+
git config user.email $(githubEmail)
31+
npm -f version $(packageBumpType) -m "chore: Bumped to version %s from release pipeline $(succinctAllSkipTokens)"
32+
export PACKAGE_VERSION=$(node -e "console.log(require('./package.json').version);")
33+
echo "##vso[task.setVariable variable=packageVersion]$PACKAGE_VERSION"
34+
npm run package:vsix
35+
git add package-lock.json
36+
git commit -n -m "chore: Bumped to version $PACKAGE_VERSION from release pipeline $(succinctAllSkipTokens)"
37+
git push https://$(githubPat)@github.com/swellaby/vscode-python-pack.git
38+
displayName: 'Bump version and check-in'
39+
40+
- script: |
41+
npm run package:vsix
42+
rm -rf node_modules/
43+
npm i vsce --no-save
44+
displayName: 'Package extension'
45+
46+
- task: ArchiveFiles@2
47+
displayName: 'Archive repo'
48+
inputs:
49+
rootFolderOrFile: '$(Build.SourcesDirectory)'
50+
includeRootFolder: false
51+
archiveType: tar
52+
archiveFile: '$(repoArchivePath)'
53+
54+
- task: PublishBuildArtifacts@1
55+
displayName: 'Publish repo tarball'
56+
inputs:
57+
PathtoPublish: '$(repoArchivePath)'
58+
ArtifactName: '$(repoArtifactName)'
2659

.azure-pipelines/pr.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
trigger: none
2+
3+
pr:
4+
- master
5+
6+
pool:
7+
vmImage: 'Ubuntu-16.04'
8+
9+
resources:
10+
repositories:
11+
- repository: templates
12+
type: github
13+
name: swellaby/azure-pipelines-templates
14+
endpoint: swellaby
15+
16+
steps:
17+
- template: templates/yml/node/combo/npm-test-lint-validation-xunit-cobertura.yml@templates
18+
parameters:
19+
publishTestResults:
20+
taskDisplayName: 'Publish unit test results'
21+
testResultsFormat: 'JUnit'
22+
testResultsFiles: 'xunit.xml'
23+
searchFolder: '$(Build.SourcesDirectory)/.testresults/unit'
24+
testRunTitle: 'vscode-python-pack::Unit Tests::PR Validation Build $(Build.BuildId)'
25+

0 commit comments

Comments
 (0)