From 4dc3a11e2a489c3946fca758de788aef3357da10 Mon Sep 17 00:00:00 2001 From: Umesh Phendarkar Date: Fri, 23 Oct 2026 08:39:38 +0530 Subject: [PATCH] Create azure-pipelines.yml --- azure-pipelines.yml | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 azure-pipelines.yml 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'