From 236ef7b5c7a959d2eefbbffe2ebef4957e53b4cc Mon Sep 17 00:00:00 2001 From: DeepaliSa <117808453+DeepaliSa@users.noreply.github.com> Date: Tue, 18 Mar 2025 18:37:57 +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 00000000..aa193675 --- /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: 'ec353e79-3991-44a1-83dd-ea0dfc02a4cf' + imageRepository: 'deepalisamlopspython' + containerRegistry: '570b88e2b4274b1a9fa62ddaeabcb39c.azurecr.io' + dockerfilePath: '$(Build.SourcesDirectory)/environment_setup/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)