From 7117172a159a344e4a1f9397545b52d22bba5715 Mon Sep 17 00:00:00 2001 From: Shreeya Date: Wed, 18 Nov 2026 18:45:34 +0200 Subject: [PATCH 1/5] Test Azure Boards traceability AB#16 --- traceability-test.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 traceability-test.txt 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 From f3da3c06df8919d23ea836e61e4e70d7ed88bbc9 Mon Sep 17 00:00:00 2001 From: Shreeya Date: Tue, 24 Nov 2026 14:43:15 +0200 Subject: [PATCH 2/5] Create Azure CI pipeline AB#17 [skip ci] --- azure-pipelines.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..7a856f49 --- /dev/null +++ b/azure-pipelines.yml @@ -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' From 87066e721a4b3b458447e3e5770c2ade495b4f6d Mon Sep 17 00:00:00 2001 From: Shreeya Date: Tue, 24 Nov 2026 15:29:53 +0200 Subject: [PATCH 3/5] Intentionally introduce syntax error for Shift-Left exercise --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 5689779e..eea4bb6a 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); From 2cf99f8a4a36915aca082350b926068bda52127b Mon Sep 17 00:00:00 2001 From: Shreeya Date: Tue, 24 Nov 2026 15:37:45 +0200 Subject: [PATCH 4/5] Fix JavaScript syntax error AB#17 --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index eea4bb6a..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); + }).catch(err => console.log(err)); From eb12d544ce12caf4ad055bf1f038e174ae6ccc59 Mon Sep 17 00:00:00 2001 From: Shreeya Date: Tue, 24 Nov 2026 15:47:54 +0200 Subject: [PATCH 5/5] Add ZIP artifact publishing to CI pipeline AB#17 --- azure-pipelines.yml | 58 ++++++++++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7a856f49..2f71c973 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,21 +1,47 @@ -# 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 + - main pool: - vmImage: ubuntu-latest + vmImage: 'ubuntu-latest' + +variables: + nodeVersion: '18.x' steps: -- task: NodeTool@0 - inputs: - versionSpec: '20.x' - displayName: 'Install Node.js' - -- script: | - npm install - npm run build - displayName: 'npm install and build' + # 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'