Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pipeline to include a step for publishing artifacts. #848

Merged
merged 4 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions azure-pipelines-steps-node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
parameters:
- name: nodeVersion
type: string

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

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

# build
- script: node make.js build
displayName: (azure-pipelines-task-lib) node make.js build
workingDirectory: node
90 changes: 23 additions & 67 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ trigger:
- features/*
- releases/*

variables:
nodeVersion: 10.23.0

jobs:
#################################################
- job: windows
Expand All @@ -16,31 +19,22 @@ jobs:
# azure-pipelines-task-lib
################################################################################

# npm install
- task: Npm@1
displayName: (azure-pipelines-task-lib) npm install
inputs:
command: install
workingDir: node
- template: azure-pipelines-steps-node.yml
parameters:
nodeVersion: $(nodeVersion)

# use node 10
- task: NodeTool@0
displayName: (azure-pipelines-task-lib) use node 10.23.0
inputs:
versionSpec: "10.23.0"

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

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

################################################################################
Expand All @@ -66,33 +60,17 @@ jobs:
pool:
vmImage: ubuntu-18.04

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

# npm install
- task: Npm@1
displayName: (azure-pipelines-task-lib) npm install
inputs:
command: install
workingDir: node
steps:
- template: azure-pipelines-steps-node.yml
parameters:
nodeVersion: $(nodeVersion)
- template: azure-pipelines-steps-test-build.yml

# use node 10
- task: NodeTool@0
displayName: (azure-pipelines-task-lib) use node 10.23.0
- task: PublishPipelineArtifact@1
inputs:
versionSpec: "10.23.0"

# build/test
- script: node make.js test
workingDirectory: node
displayName: (azure-pipelines-task-lib) node make.js test

# build/test
- script: node make.js test
displayName: (azure-pipelines-task-lib) node make.js test
workingDirectory: node
targetPath: 'node/_build'
artifactType: 'pipeline'
artifactName: 'npm-package'

# For CI runs on master, automatically publish packages
- bash: |
Expand All @@ -113,29 +91,7 @@ jobs:
vmImage: macOS-10.15

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

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

# use node 10
- task: NodeTool@0
displayName: (azure-pipelines-task-lib) use node 10.23.0
inputs:
versionSpec: "10.23.0"

# build/test
- script: node make.js test
workingDirectory: node
displayName: (azure-pipelines-task-lib) node make.js test

# build/test
- script: node make.js test
displayName: (azure-pipelines-task-lib) node make.js test
workingDirectory: node
- template: azure-pipelines-steps-node.yml
parameters:
nodeVersion: $(nodeVersion)
- template: azure-pipelines-steps-test-build.yml