Skip to content

Instantly share code, notes, and snippets.

@Castone22
Created February 11, 2021 13:23
Show Gist options
  • Save Castone22/4105b26c749533a69451b0084ec23a30 to your computer and use it in GitHub Desktop.
Save Castone22/4105b26c749533a69451b0084ec23a30 to your computer and use it in GitHub Desktop.
Azure Pipelines Docker Compose environment variable with in pipeline env variable configuration
jobs:
- job: Example
displayName: Example
pool:
vmImage: 'ubuntu-latest'
steps:
- bash: echo $(Build.BuildId)
- task: DockerCompose@0
inputs:
containerregistrytype: 'Container Registry'
dockerRegistryEndpoint: 'qeregistry'
dockerComposeFile: '**/docker-compose.yml'
dockerComposeFileArgs: |
BUILD_ID=$(Build.BuildId)
action: 'Run a specific service'
serviceName: 'example'
containerCommand: echo $BUILD_ID
detached: false
services:
example:
build: .
FROM busybox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment