From d8e71e1eed09cdb4abe0221224755ac0cff3707d Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Fri, 13 May 2022 12:00:54 +0530 Subject: [PATCH 01/29] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..e435ef189 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,16 @@ +trigger: +- master + +pool: + vmImage: ubuntu-latest + +steps: +- task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + +- script: | + npm install + npm run build + displayName: 'npm install and build' From 0a15aa9d713214994ce210758e8a764fdc3c6f57 Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Sat, 14 May 2022 19:44:39 +0530 Subject: [PATCH 02/29] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e435ef189..6172ad77b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,7 +10,7 @@ steps: versionSpec: '10.x' displayName: 'Install Node.js' -- script: | +- script: npm install npm run build displayName: 'npm install and build' From af962c353978f2068ec0fdfa6f015d2f196518bd Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Sat, 14 May 2022 20:30:42 +0530 Subject: [PATCH 03/29] Update azure-pipelines.yml for Azure Pipelines updated arifact --- azure-pipelines.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6172ad77b..dc621d633 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,3 +14,8 @@ steps: npm install npm run build displayName: 'npm install and build' +- task: CopyPublishBuildArtifacts@1 + inputs: + Contents: 'Artifact' + ArtifactName: 'drop' + ArtifactType: 'FilePath' \ No newline at end of file From 3b943b12035a3a6c5f501f3a5d3cb7290ed1361b Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Sun, 15 May 2022 14:59:45 +0530 Subject: [PATCH 04/29] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index dc621d633..6172ad77b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,8 +14,3 @@ steps: npm install npm run build displayName: 'npm install and build' -- task: CopyPublishBuildArtifacts@1 - inputs: - Contents: 'Artifact' - ArtifactName: 'drop' - ArtifactType: 'FilePath' \ No newline at end of file From dc31532b4aa7f329de4e936539531415c0998e9f Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Sun, 15 May 2022 15:09:39 +0530 Subject: [PATCH 05/29] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines-1.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 azure-pipelines-1.yml diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml new file mode 100644 index 000000000..fa346f3ea --- /dev/null +++ b/azure-pipelines-1.yml @@ -0,0 +1,17 @@ + +trigger: +- master + +pool: + vmImage: ubuntu-latest + +steps: +- task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + +- script: | + npm install + npm run build + displayName: 'npm install and build' From cbb10761f2fb12802e12f8ca27ad3b899a61b5cf Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Mon, 16 May 2022 10:18:01 +0530 Subject: [PATCH 06/29] Update azure-pipelines-1.yml --- azure-pipelines-1.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml index fa346f3ea..170174e49 100644 --- a/azure-pipelines-1.yml +++ b/azure-pipelines-1.yml @@ -11,7 +11,7 @@ steps: versionSpec: '10.x' displayName: 'Install Node.js' -- script: | +- script: npm install npm run build displayName: 'npm install and build' From bdd774b16a9ceb649b666f9ed5f1fd0be3cb5d69 Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Sat, 9 Jul 2022 22:16:06 +0530 Subject: [PATCH 07/29] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6172ad77b..ffc79f668 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,8 +9,12 @@ steps: inputs: versionSpec: '10.x' displayName: 'Install Node.js' - + steps: +- publish: $(System.DefaultWorkingDirectory)/bin/WebApp + artifact: WebApp + - script: npm install npm run build + npm package displayName: 'npm install and build' From 7c4194760f185a3125e2ea7296f7cea98da8315c Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Sat, 9 Jul 2022 22:17:26 +0530 Subject: [PATCH 08/29] Publish artifact --- azure-pipelines.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ffc79f668..e9b777d67 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,7 +9,6 @@ steps: inputs: versionSpec: '10.x' displayName: 'Install Node.js' - steps: - publish: $(System.DefaultWorkingDirectory)/bin/WebApp artifact: WebApp From 8ec027ff4f861a22349f3d8e1a926fcdc302207f Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Wed, 29 Mar 2023 15:04:51 +0530 Subject: [PATCH 09/29] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e9b777d67..64e20e08f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,5 +1,6 @@ trigger: - master +- dev pool: vmImage: ubuntu-latest From ddb9c56731302efb11e1b11b2df12db84e5074cc Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Wed, 29 Mar 2023 15:06:49 +0530 Subject: [PATCH 10/29] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 64e20e08f..4a39bc630 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,7 +1,5 @@ trigger: - master -- dev - pool: vmImage: ubuntu-latest From af1704ac5e7c5835032d5cba8411f83f60953a68 Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Wed, 29 Mar 2023 15:11:26 +0530 Subject: [PATCH 11/29] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4a39bc630..0e3a255ae 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -8,8 +8,14 @@ steps: inputs: versionSpec: '10.x' displayName: 'Install Node.js' -- publish: $(System.DefaultWorkingDirectory)/bin/WebApp - artifact: WebApp + +#- publish: $(System.DefaultWorkingDirectory)/bin/WebApp + # artifact: WebApp +- task: PublishPipelineArtifact@1 + inputs: + targetPath: '$(Pipeline.Workspace)' + artifact: 'drop' + publishLocation: 'pipeline' - script: npm install From 1b945ef63ae004a0d1b41d6f0bf86ea1850fc2cf Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Thu, 30 Mar 2023 15:17:22 +0530 Subject: [PATCH 12/29] Create DockerFile --- DockerFile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 DockerFile diff --git a/DockerFile b/DockerFile new file mode 100644 index 000000000..3b4c04af8 --- /dev/null +++ b/DockerFile @@ -0,0 +1,19 @@ +FROM node:10 + +# Create app directory +WORKDIR /usr/app + +# Install app dependencies +# A wildcard is used to ensure both package.json AND package-lock.json are copied +# where available (npm@5+) +COPY package*.json ./ + +RUN npm install +# If you are building your code for production +# RUN npm ci --only=production + +# Bundle app source +COPY . . + +EXPOSE 8080 +CMD [ "node", "server.js" ] From d35fd5f2a4e250e7885d2fbd984ab25d4fa2f528 Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Thu, 30 Mar 2023 15:29:10 +0530 Subject: [PATCH 13/29] Update azure-pipelines.yml --- azure-pipelines.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0e3a255ae..f78fce9e2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,3 +22,19 @@ steps: npm run build npm package displayName: 'npm install and build' +- task: Docker@1 + displayName: 'Build an image' + inputs: + azureSubscriptionEndpoint: '$(Azure.ServiceConnectionId)' + azureContainerRegistry: '$(ACR.FullName)' + imageName: '$(ACR.ImageName)' + command: build + dockerFile: '**/Dockerfile' + +- task: Docker@2 + displayName: 'Push an image' + inputs: + azureSubscriptionEndpoint: '$(Azure.ServiceConnectionId)' + azureContainerRegistry: '$(ACR.FullName)' + imageName: '$(ACR.ImageName)' + command: push From 2d29b01547ea5bb4e6fb63cdb4f62d879ec4998e Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Thu, 30 Mar 2023 15:33:29 +0530 Subject: [PATCH 14/29] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f78fce9e2..7f0609730 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,19 +22,7 @@ steps: npm run build npm package displayName: 'npm install and build' -- task: Docker@1 - displayName: 'Build an image' - inputs: - azureSubscriptionEndpoint: '$(Azure.ServiceConnectionId)' - azureContainerRegistry: '$(ACR.FullName)' - imageName: '$(ACR.ImageName)' - command: build - dockerFile: '**/Dockerfile' - - task: Docker@2 - displayName: 'Push an image' - inputs: - azureSubscriptionEndpoint: '$(Azure.ServiceConnectionId)' - azureContainerRegistry: '$(ACR.FullName)' - imageName: '$(ACR.ImageName)' - command: push + inputs: + command: 'buildAndPush' + Dockerfile: '**/Dockerfile' \ No newline at end of file From 614ad96dc103e05db2f64755e696e1c36399d168 Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Thu, 30 Mar 2023 15:36:30 +0530 Subject: [PATCH 15/29] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7f0609730..fec061c49 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,4 +25,4 @@ steps: - task: Docker@2 inputs: command: 'buildAndPush' - Dockerfile: '**/Dockerfile' \ No newline at end of file + Dockerfile: 'DockerFile' \ No newline at end of file From 7f001547e8de6d7ed54056b3f7eec50f6ac71cf2 Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Thu, 30 Mar 2023 16:13:37 +0530 Subject: [PATCH 16/29] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fec061c49..717d39e44 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,9 +13,9 @@ steps: # artifact: WebApp - task: PublishPipelineArtifact@1 inputs: - targetPath: '$(Pipeline.Workspace)' - artifact: 'drop' - publishLocation: 'pipeline' + #targetPath: '$(Pipeline.Workspace)' + #artifact: 'drop' + #publishLocation: 'pipeline' - script: npm install From 05ebd59ea3f0b1fc34e82f7060c0d846fcb9f83c Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Thu, 30 Mar 2023 16:15:14 +0530 Subject: [PATCH 17/29] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 717d39e44..fec061c49 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,9 +13,9 @@ steps: # artifact: WebApp - task: PublishPipelineArtifact@1 inputs: - #targetPath: '$(Pipeline.Workspace)' - #artifact: 'drop' - #publishLocation: 'pipeline' + targetPath: '$(Pipeline.Workspace)' + artifact: 'drop' + publishLocation: 'pipeline' - script: npm install From 3477c3f0e6936473c38ddde26d33b79e2478e3e5 Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Thu, 30 Mar 2023 16:21:01 +0530 Subject: [PATCH 18/29] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fec061c49..aa640e125 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,28 +1,26 @@ trigger: - master pool: - vmImage: ubuntu-latest - -steps: +vmImage:ubuntu-latest +- steps: - task: NodeTool@0 inputs: versionSpec: '10.x' displayName: 'Install Node.js' - -#- publish: $(System.DefaultWorkingDirectory)/bin/WebApp - # artifact: WebApp -- task: PublishPipelineArtifact@1 - inputs: - targetPath: '$(Pipeline.Workspace)' - artifact: 'drop' - publishLocation: 'pipeline' - -- script: - npm install - npm run build - npm package - displayName: 'npm install and build' -- task: Docker@2 - inputs: - command: 'buildAndPush' - Dockerfile: 'DockerFile' \ No newline at end of file +- stage:Build + displayname:Build +jobs: + - job: Build + displayName: Build job + pool: + vmImage: $(vmImageName) + steps: + - task: Docker@2 + displayName: Build and push an image to container registry + inputs: + command: buildAndPush + repository: $(imageRepository) + dockerfile: $(dockerfilePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) \ No newline at end of file From f55bfb5d7d7d1595020a05752de221faec39a420 Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Thu, 30 Mar 2023 16:29:08 +0530 Subject: [PATCH 19/29] Delete azure-pipelines-1.yml --- azure-pipelines-1.yml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 azure-pipelines-1.yml diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml deleted file mode 100644 index 170174e49..000000000 --- a/azure-pipelines-1.yml +++ /dev/null @@ -1,17 +0,0 @@ - -trigger: -- master - -pool: - vmImage: ubuntu-latest - -steps: -- task: NodeTool@0 - inputs: - versionSpec: '10.x' - displayName: 'Install Node.js' - -- script: - npm install - npm run build - displayName: 'npm install and build' From 094c543c585e9882c1f175e6883f875e5f0d8611 Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Fri, 31 Mar 2023 15:33:03 +0530 Subject: [PATCH 20/29] Update azure-pipelines.yml --- azure-pipelines.yml | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index aa640e125..02671e2d4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,26 +1,25 @@ trigger: - master pool: -vmImage:ubuntu-latest -- steps: + vmImage: ubuntu-latest + +steps: - task: NodeTool@0 inputs: versionSpec: '10.x' displayName: 'Install Node.js' -- stage:Build - displayname:Build -jobs: - - job: Build - displayName: Build job - pool: - vmImage: $(vmImageName) - steps: - - task: Docker@2 - displayName: Build and push an image to container registry - inputs: - command: buildAndPush - repository: $(imageRepository) - dockerfile: $(dockerfilePath) - containerRegistry: $(dockerRegistryServiceConnection) - tags: | - $(tag) \ No newline at end of file + +- publish: $(System.DefaultWorkingDirectory)/bin/WebApp + # artifact: WebApp +- task: PublishPipelineArtifact@1 + inputs: + targetPath: '$(Pipeline.Workspace)' + artifact: 'drop' + publishLocation: 'pipeline' + +- script: + npm install + npm run build + npm package + displayName: 'npm install and build' + From 705e4e42c55340b10e1c06d1c159895e1aec1f5d Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Fri, 31 Mar 2023 15:41:17 +0530 Subject: [PATCH 21/29] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 02671e2d4..78f0f7805 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,8 +9,7 @@ steps: versionSpec: '10.x' displayName: 'Install Node.js' -- publish: $(System.DefaultWorkingDirectory)/bin/WebApp - # artifact: WebApp + - task: PublishPipelineArtifact@1 inputs: targetPath: '$(Pipeline.Workspace)' From 5b56f51cb4cb9d463ce6ad83c7e02d6f63e12d6e Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Sat, 1 Apr 2023 19:43:55 +0530 Subject: [PATCH 22/29] Update azure-pipelines.yml --- azure-pipelines.yml | 46 ++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 78f0f7805..a53a7bdb0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,22 +3,30 @@ trigger: pool: vmImage: ubuntu-latest -steps: -- task: NodeTool@0 - inputs: - versionSpec: '10.x' - displayName: 'Install Node.js' - - -- task: PublishPipelineArtifact@1 - inputs: - targetPath: '$(Pipeline.Workspace)' - artifact: 'drop' - publishLocation: 'pipeline' - -- script: - npm install - npm run build - npm package - displayName: 'npm install and build' - +stages: +- stage: Build + displayName: Build and push stage + jobs: + - job: Build + displayName: Build + pool: + vmImage: $(vmImageName) + steps: + - task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + - script: | + npm install + npm run build + npm run test + displayName: 'npm install, build, and test' + tags: | + $(tag) + - task: Docker@2 + displayName: Push an image + inputs: + azureSubscriptionEndpoint: '$(5a0eee50-4814-4a84-babe-068c6bee0201)' + azureContainerRegistry: '$(mynodejs.azurecr.io)' + imageName: '$(mynodejs.azurecr.io.image)' + command: push From c822ff7e2fe7e6c3ba5ed7f589e6618d76350a37 Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Sat, 1 Apr 2023 19:47:04 +0530 Subject: [PATCH 23/29] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a53a7bdb0..cc87bd57e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,8 +21,7 @@ stages: npm run build npm run test displayName: 'npm install, build, and test' - tags: | - $(tag) + - task: Docker@2 displayName: Push an image inputs: From d4ed4b38a63cd42142b3c83ee6d3031ef25cd6a1 Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Sat, 1 Apr 2023 19:51:19 +0530 Subject: [PATCH 24/29] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cc87bd57e..f45897a34 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,7 +21,7 @@ stages: npm run build npm run test displayName: 'npm install, build, and test' - + - task: Docker@2 displayName: Push an image inputs: From 30918ef73aa7accd48b0455f0a958681ebb12bbe Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Sat, 1 Apr 2023 20:04:10 +0530 Subject: [PATCH 25/29] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines-1.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 azure-pipelines-1.yml diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml new file mode 100644 index 000000000..354d0ae6f --- /dev/null +++ b/azure-pipelines-1.yml @@ -0,0 +1,39 @@ +# Docker +# Build and push an image to Azure Container Registry +# https://docs.microsoft.com/azure/devops/pipelines/languages/docker + +trigger: +- master + +resources: +- repo: self + +variables: + # Container registry service connection established during pipeline creation + dockerRegistryServiceConnection: '7ca82645-4e44-4cf9-89be-c396b9ec0b3c' + imageRepository: 'kphaniprasadnodejsdocshelloworld' + containerRegistry: 'mynodejs.azurecr.io' + dockerfilePath: '$(Build.SourcesDirectory)/DockerFile' + tag: '$(Build.BuildId)' + + # Agent VM image name + vmImageName: 'ubuntu-latest' + +stages: +- stage: Build + displayName: Build and push stage + jobs: + - job: Build + displayName: Build + pool: + vmImage: $(vmImageName) + steps: + - task: Docker@2 + displayName: Build and push an image to container registry + inputs: + command: buildAndPush + repository: $(imageRepository) + dockerfile: $(dockerfilePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) From a2286d5d48868a73b98c40132b990c8c5d878ebe Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Sat, 8 Apr 2023 16:17:06 +0530 Subject: [PATCH 26/29] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f45897a34..af960921c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -29,3 +29,23 @@ stages: azureContainerRegistry: '$(mynodejs.azurecr.io)' imageName: '$(mynodejs.azurecr.io.image)' command: push + +- stage: Deploy + displayName: Deploy to Kubernetes + dependsOn: Build + variables: + acrsecret: k8sexamplesacrauth + acrdevurl: 'k8sexamplesacr.azurecr.io' + replicaNo: 3 + jobs: + - deployment: Deploy + displayName: Deploy to AKS + environment: 'K8sdev.deafult' + pool: + vmImage: ubuntu-latest + strategy: + runOnce: + deploy: + steps: + - + \ No newline at end of file From e932224e9c825b3dab6c908c36c9b041084341a3 Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Fri, 30 Jun 2023 11:13:23 +0530 Subject: [PATCH 27/29] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index af960921c..b473a4d5d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,28 +24,8 @@ stages: - task: Docker@2 displayName: Push an image - inputs: + inputs: azureSubscriptionEndpoint: '$(5a0eee50-4814-4a84-babe-068c6bee0201)' - azureContainerRegistry: '$(mynodejs.azurecr.io)' - imageName: '$(mynodejs.azurecr.io.image)' - command: push - -- stage: Deploy - displayName: Deploy to Kubernetes - dependsOn: Build - variables: - acrsecret: k8sexamplesacrauth - acrdevurl: 'k8sexamplesacr.azurecr.io' - replicaNo: 3 - jobs: - - deployment: Deploy - displayName: Deploy to AKS - environment: 'K8sdev.deafult' - pool: - vmImage: ubuntu-latest - strategy: - runOnce: - deploy: - steps: - - - \ No newline at end of file + azureContainerRegistry: '$(classicpipeline.azurecr.io)' + imageName: '$(classicpipeline.azurecr.io.image)' + command: push \ No newline at end of file From b09486016de7c3a882a5a18501e741f49ea58fdc Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Sat, 18 Nov 2023 11:17:33 +0530 Subject: [PATCH 28/29] Create npm-publish.yml --- .github/workflows/npm-publish.yml | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 000000000..6cdebafb6 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,33 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm ci + - run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} From 294cde046a3e688d8ee2181545262d3db3cf1b90 Mon Sep 17 00:00:00 2001 From: KPhaniPrasad <37287890+KPhaniPrasad@users.noreply.github.com> Date: Sat, 18 Nov 2023 11:18:26 +0530 Subject: [PATCH 29/29] Update npm-publish.yml --- .github/workflows/npm-publish.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 6cdebafb6..63b3b68f8 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -4,9 +4,8 @@ name: Node.js Package on: - release: - types: [created] - + push: + jobs: build: runs-on: ubuntu-latest