diff --git a/.drone.yml b/.drone.yml index 7ae8713..9eedba0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -136,14 +136,24 @@ steps: script: - | powershell -Command " - $path = 'C:/Temp/docker-config'; + $path = 'C:/Users/Public/docker-config'; + Write-Host 'Checking path: ' $path; if (!(Test-Path $path)) { New-Item -Path $path -ItemType Directory -Force | Out-Null }; $json = '{\"credsStore\": \"\"}'; $json | Out-File -FilePath \"$path/config.json\" -Encoding ascii; + Write-Host 'Config file created.'; + docker --config $path pull khwezi/webapitest:latest; + + Write-Host 'Attempting to stop/remove container...'; docker --config $path stop webapi 2>$null; docker --config $path rm webapi 2>$null; + + Write-Host 'Starting container...'; docker --config $path run -d --name webapi --restart unless-stopped -e ASPNETCORE_ENVIRONMENT=Production -p 4001:8081 khwezi/webapitest:latest; + + Write-Host 'Final container status:'; + docker ps -a --filter 'name=webapi'; " when: event: