Skip to content

Commit 4c37c10

Browse files
azure-pipelines[bot]riezebosch
authored andcommitted
Set up CI with Azure Pipelines
1 parent 4e8a493 commit 4c37c10

File tree

5 files changed

+37
-7
lines changed

5 files changed

+37
-7
lines changed

Packer/PackerV1/package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
"main": "src/index.js",
66
"scripts": {
77
"build": "tsc -p .",
8-
"build:prod": "npm i && npm run build && npm prune --production && npm dedupe",
8+
"build:prod": "npm i && npm run build && npm run test && npm run stryker -- --reporters clear-text,progress,baseline && npm prune --production && npm dedupe",
99
"pretest": "npm run build",
1010
"test": "mocha --recursive",
11-
"upload": "npm run build:prod && tfx build tasks upload --task-path .",
12-
"delete": "tfx build tasks delete --task-id b3c6bb07-1292-44e7-9ec9-b211fc98b6d2"
11+
"stryker": "stryker run stryker.conf.js"
1312
},
1413
"keywords": [
1514
"packer",

Packer/PackerV1/stryker.conf.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ module.exports = function(config) {
77
testFramework: "mocha",
88
coverageAnalysis: "perTest",
99
tsconfigFile: "tsconfig.json",
10-
mutate: ["src/**/*.ts"]
10+
mutate: ["src/**/*.ts"],
11+
thresholds: {
12+
break: 98,
13+
high: 100,
14+
low: 100
15+
}
1116
});
1217
};

azure-pipelines.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
pool:
2+
vmImage: 'Ubuntu 16.04'
3+
4+
steps:
5+
- task: NodeTool@0
6+
inputs:
7+
versionSpec: '8.x'
8+
displayName: 'Install Node.js'
9+
10+
- script: |
11+
npm install
12+
npm run build
13+
displayName: 'npm install and build'
14+
15+
- task: ms-devlabs.vsts-developer-tools-build-tasks.package-extension-build-task.PackageVSTSExtension@1
16+
inputs:
17+
outputPath: $(build.stagingDirectory)
18+
extensionVersion: 0.9.${Build.BuildId}
19+
extensionVisibility: private_preview
20+
updateTasksVersion: true
21+
updateTasksVersionType: patch
22+
23+
- task: PublishBuildArtifacts@1
24+
inputs:
25+
PathtoPublish: $(Build.StagingDirectory)
26+
ArtifactName: extension

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"build:packerV0": "cd Packer/PackerV0 && npm run build:prod",
88
"build:packerV1": "cd Packer/PackerV1 && npm run build:prod",
99
"build:tool": "cd PackerTool && npm run build:prod",
10-
"build": "npm run build:packerV0 && npm run build:packerV1 && npm run build:tool && tfx extension create --manifest-globs vss-extension.json"
10+
"build": "npm run build:packerV0 && npm run build:packerV1 && npm run build:tool"
1111
},
1212
"repository": {
1313
"type": "git",

vss-extension.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"description": "Build Automated Machine Images using Packer",
1414
"categories": [
15-
"Build and release"
15+
"Azure Pipelines"
1616
],
1717
"icons": {
1818
"default": "images/extension-icon.png"
@@ -54,7 +54,7 @@
5454
"ms.vss-distributed-task.tasks"
5555
],
5656
"properties": {
57-
"name": "packer"
57+
"name": "Packer"
5858
}
5959
},
6060
{

0 commit comments

Comments
 (0)