We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1786810 commit 394b70aCopy full SHA for 394b70a
azure-pipelines.yml
@@ -75,10 +75,16 @@ steps:
75
cp $(node_private_key.secureFilePath) code-examples-node-private/config/private.key
76
displayName: 'place private.key'
77
78
-- task: CmdLine@2
79
- inputs:
80
- script: 'docker rm -f $(docker ps -a -q)'
81
- continueOnError: true
+- script: |
+ echo "Checking for running Docker containers..."
+ containers=$(docker ps -q)
+ if [ ! -z "$containers" ]; then
82
+ echo "Stopping running Docker containers..."
83
+ docker stop $(docker ps -q)
84
+ else
85
+ echo "No Docker containers are running."
86
+ fi
87
+ displayName: "check for running containers"
88
89
- script: |
90
docker system prune -a --force
0 commit comments