MicrosoftLearning / AZ400-DesigningandImplementingMicrosoftDevOpsSolutions

AZ-400 Course Repository for Labs and Demos.
https://microsoftlearning.github.io/AZ400-DesigningandImplementingMicrosoftDevOpsSolutions/
MIT License
518 stars 963 forks source link

Integrating Azure Key Vault with Azure DevOps : Docker-compose task problem #567

Closed chtourou-youssef closed 2 months ago

chtourou-youssef commented 3 months ago

Contact Details

No response

What happened?

Exercise : 1 Task: 2 Step: 3

Description of issue:

The pipeline dosen't work with the new docker compose version ( without - between docker and compose )

The error message is : ### Docker Compose was not found. You can provide the path to docker-compose via 'dockerComposePath'

Repro steps: add dockerComposePath to DockerCompose@0 task dockerComposePath: '/home/vsts/.docker/cli-plugins/docker-compose' so the task will be like that :

    - task: DockerCompose@0
      displayName: Build Docker Compose
      inputs:
        containerregistrytype: 'Azure Container Registry'
        azureSubscription: '$(azureserviceconnection)'
        azureContainerRegistry: '$(acrloginserver)'
        dockerComposeFile: '**/docker-compose.yml'
        projectName: 
        action: 'Build services'
        additionalImageTags: '$(Build.BuildNumber)'
        includeLatestTag: true
        dockerComposePath: '/usr/libexec/docker/cli-plugins/docker-compose'
    - task: DockerCompose@0
      displayName: Push Docker Compose
      inputs:
        containerregistrytype: 'Azure Container Registry'
        azureSubscription: $(azureserviceconnection)
        azureContainerRegistry: '$(acrloginserver)'
        dockerComposeFile: '**/docker-compose.yml'
        projectName: 
        action: 'Push services'
        additionalImageTags: '$(Build.BuildNumber)'
        includeLatestTag: true
        dockerComposePath: '/usr/libexec/docker/cli-plugins/docker-compose'

Lab

Integrate Azure Key Vault with Azure DevOps

Relevant screenshots

No response

Do you want to help us? 👏

rob-foulkrod commented 3 months ago

I have run the lab as written and did not encounter an issue during the CI Docker Compose Pipeline.

image

If I am misunderstanding, please let me know.

chtourou-youssef commented 3 months ago

I'm using the next version V2 of Docker Compose which uses the docker CLI 'compose' command instead of the docker-compose executable.

The task is looking for the 'docker-compose' executable and gives me an error.

rob-foulkrod commented 3 months ago

I don't mean to be a pain here, but if you follow the lab steps without additions, the lab functions correctly in the hosted agent as specified and does not have a bug.

I am still open to understanding, but unless you can show me where the written lab steps are flawed, I will close out the issue.

chtourou-youssef commented 2 months ago

@rob-foulkrod thanks for the feedback.