xxxxプログラマのメモ

先人に感謝と敬意:自分の困ったこと調べたことのメモ

Azure Devops Build #任意の場所から実行

stackoverflow.com
learn.microsoft.com

buildContext: $(Build.Repository.LocalPath)/xxx/xxxx
みたいにパスを記入することで実行パスの指定が可能。

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)
        buildContext: $(Build.Repository.LocalPath)/xxx/xxxx
        containerRegistry: $(dockerRegistryServiceConnection)
        tags: |
          $(tag)
          latest


Thanks!