From f950f62b8f1b9290d4a58eea72cdfaafc05f16dc Mon Sep 17 00:00:00 2001 From: durgapraveena <88362905+durgapraveena@users.noreply.github.com> Date: Tue, 7 Sep 2021 13:25:39 +0530 Subject: [PATCH] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..e49b162 --- /dev/null +++ b/azure-pipelines.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: 'ab7a879b-e3c8-434f-b0c5-89f91295e7c0' + imageRepository: 'durgapraveenahttpsgithubcommicrosoftdocspipelinesj' + containerRegistry: 'a4eacrr.azurecr.io' + dockerfilePath: '$(Build.SourcesDirectory)/app/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)