Skip to content

Commit

Permalink
Set up CI with Azure Pipelines
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
akannan1087 committed Jan 9, 2025
1 parent 36e92cd commit 7456301
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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: 'd676875f-d1fb-485a-8da4-88d6bfb04604'
imageRepository: 'mypythondockerrepo'
containerRegistry: 'myacrrep31.azurecr.io'
dockerfilePath: '$(Build.SourcesDirectory)/Dockerfile'
tag: '$(Build.BuildId)'

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)

0 comments on commit 7456301

Please sign in to comment.