Closed geekzter closed 3 years ago
This issue is marked need-to-triage for generating issues report.
This issue is idle because it has been open for 14 days with no activity.
Hi @geekzter , Can you share your workflow here.
@geekzter any updates?
Hi @kanika1894,
The workflow I use is at https://github.com/geekzter/azure-minecraft-docker/blob/main/.github/workflows/ci-vanilla.yml (line 173):
- name: Test connection to Minecraft Server (pwsh)
if: ${{ github.event_name == 'pull_request' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
uses: Azure/powershell@v1
env:
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
with:
inlineScript: |
# Wait for Minecraft to boot up
$connectionAttempts = 0
do {
Start-Sleep -Seconds 10
Write-Host "Pinging ${env:TF_OUT_minecraft_server_fqdn} on port ${env:TF_OUT_minecraft_server_port}..."
try {
$connectionAttempts++
$mineCraftConnection = New-Object System.Net.Sockets.TcpClient($env:TF_OUT_minecraft_server_fqdn, $env:TF_OUT_minecraft_server_port) -ErrorAction SilentlyContinue
} catch [System.Management.Automation.MethodInvocationException] {
Write-Warning $_
}
} while ((!$mineCraftConnection || !$mineCraftConnection.Connected) -and ($connectionAttempts -le 10))
az container show --ids ${{ steps.terraform-apply.outputs.container_group_id }} --query instanceView
az container logs --ids ${{ steps.terraform-apply.outputs.container_group_id }}
# BUG: no tty
# az container exec --ids ${{ steps.terraform-apply.outputs.container_group_id }} --exec-command "rcon-cli say hello from ci" --container-name minecraft
azPSVersion: latest
errorActionPreference: Stop
failOnStandardError: true # BUG: setting not honored! `https://github.com/Azure/powershell/issues/33`
I've learned that this task is not really needed if you use azure/login@v1 and then the stock run task with shell pwsh.
This issue is idle because it has been open for 14 days with no activity.
hey @geekzter if you add a step for azure/login@v1
before you execute az-pwsh commands, you will not face the issue. Make sure you setenable-AzPSSession: true
in azure/login
Have a look at the detailed example . Let us know if it works.
Hi @BALAGA-GAYATRI. Yes, that's what I already did and that works. That solved some other stability issue's as well. So I'm no longer impacted by the issue.
That's good to know @geekzter 😇
Hi,
On my workflow step, I have configured:
Still the step succeeds, as can be seen below: