Azure / arm-deploy

ARM action to deploy an Azure Resource Manager (ARM) template to all the deployment scopes
MIT License
84 stars 39 forks source link

Ability to see logging output #127

Open peterbe opened 1 year ago

peterbe commented 1 year ago

We use

      - name: Run ARM deploy
        uses: azure/arm-deploy@65ae74fb7aec7c680c88ef456811f353adae4d06
        with:
          resourceGroupName: ${{ secrets.PREVIEW_ENV_RESOURCE_GROUP }}
          subscriptionId: ${{ secrets.NONPROD_SUBSCRIPTION_ID }}
          template: ./azure-preview-env-template.json
          deploymentName: ${{ env.DEPLOYMENT_NAME }}
          parameters: appName="${{ env.APP_NAME }}"
            containerImage="${{ env.DOCKER_IMAGE }}"
            dockerRegistryUrl="${{ secrets.NONPROD_REGISTRY_SERVER }}"
            dockerRegistryUsername="${{ env.NONPROD_REGISTRY_USERNAME }}"
            dockerRegistryPassword="${{ secrets.NONPROD_REGISTRY_PASSWORD }}"

It's working great. We're starting up Azure Container Instances nicely based on our Docker registry. But a couple of times, the web servers inside the Docker file has failed to start (and bind to a port). If you were to run it locally with, like, docker run -t -i --rm -p 4000:4000 my-tag you'd see on your terminal the error message which most likely is a traceback/stacktrace from the application pointing out something obvious like an undefined environment variable or something like that.

What would be great is if we could have output from the azure/arm-deploy command somehow. Then we could print it as part of our GitHub Action workflow. I'm guessing, by default, underlying'ly it starts the container in some sort of background process. But similar to the docker CLI you can do docker logs my-container (without the --follow) to get a glimpse of anything from stdout or stderr.