-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
49 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,49 @@ | ||
parameters: | ||
- name: nodeVersion | ||
- name: os | ||
type: string | ||
|
||
steps: | ||
# npm install | ||
- task: Npm@1 | ||
displayName: npm install | ||
inputs: | ||
command: install | ||
workingDir: node | ||
|
||
- task: NodeTool@0 | ||
displayName: use node ${{parameters.nodeVersion}} | ||
displayName: use node $(nodeVersion) | ||
inputs: | ||
versionSpec: ${{parameters.nodeVersion}} | ||
versionSpec: $(nodeVersion) | ||
|
||
- script: npm ci | ||
displayName: (task-lib) npm ci | ||
workingDirectory: node | ||
|
||
- script: npm test | ||
workingDirectory: node | ||
displayName: (task-lib) npm test | ||
|
||
# Only on Linux. For CI runs on master, automatically publish packages | ||
- ${{ if eq(parameters.os, 'Linux') }}: | ||
- bash: | | ||
echo //registry.npmjs.org/:_authToken=\${NPM_TOKEN} > .npmrc | ||
npm publish || true # Ignore publish failures, usually will happen because package already exists | ||
displayName: (task-lib) 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: $(npm-automation.token) | ||
# PublishPipelineArtifact step is configured in the base template. | ||
# See the templateContext section in the azure-pipelines.yml file | ||
|
||
# Only on Windows. Build VstsTaskSdk for powershell | ||
- ${{ if eq(parameters.os, 'Windows_NT') }}: | ||
# Build step for .NET source code. This is needed to enable CodeQL for C# code | ||
- task: DotNetCoreCLI@2 | ||
displayName: 'Build .NET project(s)' | ||
inputs: | ||
command: build | ||
projects: 'powershell/CompiledHelpers/VstsTaskSdk.csproj' | ||
arguments: '--configuration Release' | ||
|
||
- script: npm ci | ||
displayName: (VstsTaskSdk) npm ci | ||
workingDirectory: powershell | ||
|
||
- script: npm test | ||
displayName: (VstsTaskSdk) npm test | ||
workingDirectory: powershell |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters