diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 059ddd126..d739ac2de 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,39 +1,16 @@ -# Docker -# Build and push an image to Azure Container Registry -# https://docs.microsoft.com/azure/devops/pipelines/languages/docker - trigger: -- master - -resources: -- repo: self + - main -variables: - # Container registry service connection established during pipeline creation - dockerRegistryServiceConnection: 'bbc00546-6924-4a6f-981e-eb246a6761fb' - imageRepository: 'mydocimage1' - containerRegistry: 'devsecopscontainer212.azurecr.io' - dockerfilePath: '$(Build.SourcesDirectory)/app/Dockerfile' - tag: '$(Build.BuildId)' + pool: + vmImage: 'ubuntu-latest' # set to windows-latest or another Windows vmImage for Windows builds - # Agent VM image name - vmImageName: 'ubuntu-latest' + variables: + imageName: 'pipelines-javascript-docker' -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) + steps: + - task: Docker@2 + displayName: Build an image + inputs: + repository: $(imageName) + command: build + Dockerfile: app/Dockerfile \ No newline at end of file