Azure-pipelines-tasks: VSTS Docker Agent can't find docker-compose.yml

Created on 10 Jan 2018  路  2Comments  路  Source: microsoft/azure-pipelines-tasks

Issue Description

I am creating a vsts task that first builds a series of docker images and then publishes them to a private ACR. I want to use the previously built docker-compose.yml to effect the multi dockerfile build. Even though it pulls sources correctly and I can see the docker-compose.yml on the path

image

the agent cannot find the file. I've tried both way, with the **/docker-compose.yml and Source/docker-compose.yml (the direct file path). The debug shows the right path, but it still doesn't find it.

Shown here is the definition in vsts (relative but have also tried **/docker-compose.yml)

image

Environment

  • Server - VSTS + Azure Linux Docker Agent

    • Team: pageflex-pando-dev.visualstudio.com

    • Project: Teamcity.DocumentReleaseNotes

    • Build: TeamCity.DocumentReleaseNotes-CB

  • Linux Agent - Hosted in Azure:

    • Ubuntu 16.04 (from the docker image specified around the various help articles)

Error logs

Error log 1 using double star
2018-01-10T15:21:47.8651969Z ##[debug] /home/docker-user/vsts-agent/_work/1/s/Source/docker-compose.yml (file)
2018-01-10T15:21:47.9067891Z ##[debug]149 results
2018-01-10T15:21:47.9494067Z ##[debug]patternRoot: '/home/docker-user/vsts-agent/_work/1/s'
2018-01-10T15:21:47.9959948Z ##[debug]matchOptions.debug: 'undefined'
2018-01-10T15:21:48.0393138Z ##[debug]matchOptions.nobrace: 'undefined'
2018-01-10T15:21:48.0850033Z ##[debug]matchOptions.noglobstar: 'undefined'
2018-01-10T15:21:48.1261199Z ##[debug]matchOptions.dot: 'undefined'
2018-01-10T15:21:48.1719619Z ##[debug]matchOptions.noext: 'undefined'
2018-01-10T15:21:48.2136018Z ##[debug]matchOptions.nocase: 'undefined'
2018-01-10T15:21:48.2553143Z ##[debug]matchOptions.nonull: 'undefined'
2018-01-10T15:21:48.2967736Z ##[debug]matchOptions.matchBase: 'true'
2018-01-10T15:21:48.3424865Z ##[debug]matchOptions.nocomment: 'undefined'
2018-01-10T15:21:48.3839372Z ##[debug]matchOptions.nonegate: 'undefined'
2018-01-10T15:21:48.4256480Z ##[debug]matchOptions.flipNegate: 'undefined'
2018-01-10T15:21:48.4720902Z ##[debug]pattern: '/home/docker-user/vsts-agent/_work/1/s/**/docker-compose.yml'
2018-01-10T15:21:48.5137292Z ##[debug]expanding braces
2018-01-10T15:21:48.5521657Z ##[debug]applying include pattern against original list
2018-01-10T15:21:48.5936201Z ##[debug]1 matches
2018-01-10T15:21:48.6388426Z ##[debug]1 final results
2018-01-10T15:21:48.6803068Z ##[debug]check path : /usr/bin/docker
2018-01-10T15:21:48.7216821Z ##[debug]docker=/usr/bin/docker
2018-01-10T15:21:48.7666944Z ##[debug]check path : null
2018-01-10T15:21:48.7997630Z ##[debug]task result: Failed
2018-01-10T15:21:48.8881941Z ##[error]Unhandled: Failed which: Not found docker-compose: null
2018-01-10T15:21:48.9193326Z ##[debug]Processed: ##vso[task.issue type=error;]Unhandled: Failed which: Not found docker-compose: null
2018-01-10T15:21:48.9868130Z ##[debug]Processed: ##vso[task.complete result=Failed;]Unhandled: Failed which: Not found docker-compose: null

Error Log 2 with relative path
2018-01-10T15:27:38.7700769Z ##[debug]dockerComposeFile=/home/docker-user/vsts-agent/_work/1/s/Source/docker-compose.yml
2018-01-10T15:27:38.8121625Z ##[debug]nopIfNoDockerComposeFile=false
2018-01-10T15:27:38.8782864Z ##[debug]No pattern found in docker compose filepath parameter
2018-01-10T15:27:38.9219178Z ##[debug]check path : /usr/bin/docker
2018-01-10T15:27:38.9629658Z ##[debug]docker=/usr/bin/docker
2018-01-10T15:27:39.0058722Z ##[debug]check path : null
2018-01-10T15:27:39.0504112Z ##[debug]task result: Failed
2018-01-10T15:27:39.1411317Z ##[error]Unhandled: Failed which: Not found docker-compose: null
2018-01-10T15:27:39.1726903Z ##[debug]Processed: ##vso[task.issue type=error;]Unhandled: Failed which: Not found docker-compose: null
2018-01-10T15:27:39.2332228Z ##[debug]Processed: ##vso[task.complete result=Failed;]Unhandled: Failed which: Not found docker-compose: null

System.Debug is set to true. Attaching full logs here.
logs_6.zip
logs_7.zip

Release

Most helpful comment

1) is there any way to make the verbiage more clear in the error? Surely it's understandable that I made the assumption that it couldn't find the docker-compose file itself.

All 2 comments

Error explicitly says that "which docker-compose: command failed means docker-compose is not installed on the agent machine.
"Unhandled: Failed which: Not found docker-compose: null"
Its able to find docker-compose.yml

1) is there any way to make the verbiage more clear in the error? Surely it's understandable that I made the assumption that it couldn't find the docker-compose file itself.

Was this page helpful?
0 / 5 - 0 ratings