Skip to content

Commit

Permalink
Pipeline fixing (microsoft#897)
Browse files Browse the repository at this point in the history
* Pipeline fixing

* Indentation fix

* Formating

* Node version was reverted
  • Loading branch information
Roman-Shchukin authored Nov 24, 2022
1 parent 39c14da commit 60b9d34
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 59 deletions.
18 changes: 9 additions & 9 deletions azure-pipelines-steps-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ parameters:

steps:
# npm install
- task: Npm@1
displayName: (azure-pipelines-task-lib) npm install
inputs:
command: install
workingDir: node
- task: Npm@1
displayName: npm install
inputs:
command: install
workingDir: node

- task: NodeTool@0
displayName: (azure-pipelines-task-lib) use node ${{parameters.nodeVersion}}
inputs:
versionSpec: ${{parameters.nodeVersion}}
- task: NodeTool@0
displayName: use node ${{parameters.nodeVersion}}
inputs:
versionSpec: ${{parameters.nodeVersion}}
12 changes: 6 additions & 6 deletions azure-pipelines-steps-test-build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
steps:
# test
- script: node make.js test
workingDirectory: node
displayName: (azure-pipelines-task-lib) node make.js test
- script: node make.js test
workingDirectory: node
displayName: node make.js test

# build
- script: node make.js build
displayName: (azure-pipelines-task-lib) node make.js build
workingDirectory: node
- script: node make.js build
displayName: node make.js build
workingDirectory: node
56 changes: 12 additions & 44 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ trigger:
- releases/*

variables:
nodeVersion: 10.23.0

- group: npm-tokens
- name: nodeVersion
value: '10.23.0'

jobs:
#################################################
- job: windows
Expand All @@ -15,44 +17,11 @@ jobs:
vmImage: windows-2019

steps:
################################################################################
# azure-pipelines-task-lib
################################################################################

- template: azure-pipelines-steps-node.yml
parameters:
nodeVersion: $(nodeVersion)

# test
- script: |
chcp 437
node make.js test
workingDirectory: node
displayName: (azure-pipelines-task-lib) node make.js test
# build
- script: |
chcp 437
node make.js build
displayName: (azure-pipelines-task-lib) node make.js build
workingDirectory: node
################################################################################
# VstsTaskSdk
################################################################################

# npm install
- task: Npm@1
displayName: (VstsTaskSdk) npm install
inputs:
command: install
workingDir: powershell

# npm test
- script: npm test
displayName: (VstsTaskSdk) npm test
workingDirectory: powershell

- template: azure-pipelines-steps-test-build.yml

#################################################
- job: linux
#################################################
Expand All @@ -74,14 +43,13 @@ jobs:

# For CI runs on master, automatically publish packages
- bash: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
cd _build
echo //registry.npmjs.org/:_authToken=\${NPM_TOKEN} > .npmrc
npm publish || true # Ignore publish failures, usually will happen because package already exists
displayName: (azure-pipelines-task-lib) npm publish
workingDirectory: node
condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), in(variables['build.sourcebranchname'], 'master', 'releases/3.x'))
displayName: npm publish
workingDirectory: node/_build
condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), in(variables['build.sourcebranch'], 'refs/heads/master'))
env:
NPM_TOKEN: $(npmPublishToken)
NPM_TOKEN: $(npm-automation.token)
#################################################
- job: macOS
Expand All @@ -94,4 +62,4 @@ jobs:
- template: azure-pipelines-steps-node.yml
parameters:
nodeVersion: $(nodeVersion)
- template: azure-pipelines-steps-test-build.yml
- template: azure-pipelines-steps-test-build.yml

0 comments on commit 60b9d34

Please sign in to comment.