I am using Classic release pipelines in Azure DevOps and configured simple SSH task what calls docker-compose:
cd /home/asem/platform/$(ServiceName) && sudo docker-compose up -d --force-recreate
Issue: task fails with errors:
Docker-compose returns 0 exit code, but write some messages in STDERR. Pipeline task treat them as errors and fails.
Questions:
Workaround 1: pipe docker compose STDERR to STDOUT like cd /home/asem/platform/$(ServiceName) && sudo docker-compose up -d --force-recreate 2 >&1
sudo docker-compose up -d --force-recreate 2 >&1
That works, but I don’t like it because it can hide some real errors
Workaround 2: Uncheck “Fail on STDERR” for task
That works, but release stage displays errors which is not good though.