Skip to content

Commit 60b9d34

Browse files
Pipeline fixing (#897)
* Pipeline fixing * Indentation fix * Formating * Node version was reverted
1 parent 39c14da commit 60b9d34

File tree

3 files changed

+27
-59
lines changed

3 files changed

+27
-59
lines changed

azure-pipelines-steps-node.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ parameters:
44

55
steps:
66
# npm install
7-
- task: Npm@1
8-
displayName: (azure-pipelines-task-lib) npm install
9-
inputs:
10-
command: install
11-
workingDir: node
7+
- task: Npm@1
8+
displayName: npm install
9+
inputs:
10+
command: install
11+
workingDir: node
1212

13-
- task: NodeTool@0
14-
displayName: (azure-pipelines-task-lib) use node ${{parameters.nodeVersion}}
15-
inputs:
16-
versionSpec: ${{parameters.nodeVersion}}
13+
- task: NodeTool@0
14+
displayName: use node ${{parameters.nodeVersion}}
15+
inputs:
16+
versionSpec: ${{parameters.nodeVersion}}

azure-pipelines-steps-test-build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
steps:
22
# test
3-
- script: node make.js test
4-
workingDirectory: node
5-
displayName: (azure-pipelines-task-lib) node make.js test
3+
- script: node make.js test
4+
workingDirectory: node
5+
displayName: node make.js test
66

77
# build
8-
- script: node make.js build
9-
displayName: (azure-pipelines-task-lib) node make.js build
10-
workingDirectory: node
8+
- script: node make.js build
9+
displayName: node make.js build
10+
workingDirectory: node

azure-pipelines.yml

Lines changed: 12 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ trigger:
44
- releases/*
55

66
variables:
7-
nodeVersion: 10.23.0
8-
7+
- group: npm-tokens
8+
- name: nodeVersion
9+
value: '10.23.0'
10+
911
jobs:
1012
#################################################
1113
- job: windows
@@ -15,44 +17,11 @@ jobs:
1517
vmImage: windows-2019
1618

1719
steps:
18-
################################################################################
19-
# azure-pipelines-task-lib
20-
################################################################################
21-
2220
- template: azure-pipelines-steps-node.yml
2321
parameters:
2422
nodeVersion: $(nodeVersion)
25-
26-
# test
27-
- script: |
28-
chcp 437
29-
node make.js test
30-
workingDirectory: node
31-
displayName: (azure-pipelines-task-lib) node make.js test
32-
33-
# build
34-
- script: |
35-
chcp 437
36-
node make.js build
37-
displayName: (azure-pipelines-task-lib) node make.js build
38-
workingDirectory: node
39-
40-
################################################################################
41-
# VstsTaskSdk
42-
################################################################################
43-
44-
# npm install
45-
- task: Npm@1
46-
displayName: (VstsTaskSdk) npm install
47-
inputs:
48-
command: install
49-
workingDir: powershell
50-
51-
# npm test
52-
- script: npm test
53-
displayName: (VstsTaskSdk) npm test
54-
workingDirectory: powershell
55-
23+
- template: azure-pipelines-steps-test-build.yml
24+
5625
#################################################
5726
- job: linux
5827
#################################################
@@ -74,14 +43,13 @@ jobs:
7443

7544
# For CI runs on master, automatically publish packages
7645
- bash: |
77-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
78-
cd _build
46+
echo //registry.npmjs.org/:_authToken=\${NPM_TOKEN} > .npmrc
7947
npm publish || true # Ignore publish failures, usually will happen because package already exists
80-
displayName: (azure-pipelines-task-lib) npm publish
81-
workingDirectory: node
82-
condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), in(variables['build.sourcebranchname'], 'master', 'releases/3.x'))
48+
displayName: npm publish
49+
workingDirectory: node/_build
50+
condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), in(variables['build.sourcebranch'], 'refs/heads/master'))
8351
env:
84-
NPM_TOKEN: $(npmPublishToken)
52+
NPM_TOKEN: $(npm-automation.token)
8553
8654
#################################################
8755
- job: macOS
@@ -94,4 +62,4 @@ jobs:
9462
- template: azure-pipelines-steps-node.yml
9563
parameters:
9664
nodeVersion: $(nodeVersion)
97-
- template: azure-pipelines-steps-test-build.yml
65+
- template: azure-pipelines-steps-test-build.yml

0 commit comments

Comments
 (0)