Skip to content
Open

test #46

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
21 changes: 21 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

trigger:
- main

pool:
vmImage: ubuntu-latest

steps:
- task: NodeTool@0
inputs:
versionSpec: '20.x'
displayName: 'Install Node.js'

- script: |
npm install
npm run build
displayName: 'npm install and build'
43 changes: 43 additions & 0 deletions npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
trigger:
- none

pool:
vmImage: 'ubuntu-latest'

steps:
- task: UseNode@1
inputs:
version: '16.X'
displayName: 'Install Node.js'


- script: |
npm install
displayName: 'npm install'

- script: |
npm run build
displayName: 'npm build'
- task: CopyFiles@2
inputs:
sourceFolder: '$(Build.SourcesDirectory)'
contents: |
src/*
public/*
targetFolder: '$(Build.ArtifactStagingDirectory)'
displayName: 'Copy project files'

- task: PublishPipelineArtifact@1
inputs:
artifactName: e2e-server
targetPath: '$(Build.ArtifactStagingDirectory)'
publishLocation: 'pipeline'
displayName: 'Publish npm artifact'


- task: Npm@1
inputs:
command: 'publish'
workingDir: '$(Build.Repository.LocalPath)'
publishRegistry: 'useFeed'
publishFeed: 'NPM test/holi'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "js-e2e-express-server",
"version": "1.0.0",
"version": "1.1.0",
"description": "JavaScript server written with Express.js",
"main": "index.js",
"directories": {
Expand Down