diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..2f71c973 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,47 @@ +trigger: + - main + +pool: + vmImage: 'ubuntu-latest' + +variables: + nodeVersion: '18.x' + +steps: + # Install Node.js + - task: UseNode@1 + inputs: + version: $(nodeVersion) + displayName: 'Install Node.js' + + # Install dependencies + - script: | + npm install + displayName: 'Install dependencies' + + # Build the project + - script: | + npm run build + displayName: 'Build project' + + # Run tests + - script: | + npm test + displayName: 'Run tests' + + # Copy project files to artifact staging directory + - task: CopyFiles@2 + inputs: + sourceFolder: '$(Build.SourcesDirectory)' + contents: | + src/** + public/** + targetFolder: '$(Build.ArtifactStagingDirectory)' + displayName: 'Copy project files' + + # Publish pipeline artifact + - task: PublishPipelineArtifact@1 + inputs: + artifactName: 'nodejs-app' + targetPath: '$(Build.ArtifactStagingDirectory)' + displayName: 'Publish pipeline artifact' diff --git a/src/index.js b/src/index.js index 5689779e..620921c9 100644 --- a/src/index.js +++ b/src/index.js @@ -10,4 +10,4 @@ server.create() app.listen(port, hostname, () => { console.log(`Server has started on port ${port}!`); }); - }).catch(err => console.log(err)); \ No newline at end of file + }).catch(err => console.log(err)); diff --git a/traceability-test.txt b/traceability-test.txt new file mode 100644 index 00000000..7be1d1d1 --- /dev/null +++ b/traceability-test.txt @@ -0,0 +1,2 @@ +Testing Azure Boards and GitHub integration. +Work Item: AB#16