dynatrace-github-action icon indicating copy to clipboard operation
dynatrace-github-action copied to clipboard

Does not fail action when required property is empty

Open luis-iaggbs opened this issue 2 months ago • 0 comments

Hi team!

I hope you are doing well. I am writing to inform you about an issue we have encountered with one of our GitHub Actions

Description: We are using the dynatrace-oss/dynatrace-github-action@v9 to validate certain properties during our CI/CD process. One of these properties is meant to be required (i.e., it should not be empty). However, when this property is missing or left empty, the action only generates a warning and completes successfully. We need it to fail (exit with a non-zero status) in order to clearly surface this misconfiguration and block subsequent steps if the rule is violated.

      - name: 📈 Notify Deployment to Dynatrace
        id: dynatrace
        uses: dynatrace-oss/dynatrace-github-action@v9
        with:
          url: ${{ vars.DYNATRACE_URL }}
          token: ${{ secrets.DYNATRACE_RELEASE_KEY }}
          events: |
            - title: "${{ env.APP_NAME }}: Deployed - Version: ${{ inputs.version }}"
              type: "CUSTOM_DEPLOYMENT"
              entity-selector: tag("application-name:${{ env.APP_NAME }},tag("product-name:${{ github.event.repository.custom_properties.product-name }}"),tag("business-domain:${{ github.event.repository.custom_properties.business-domain }}")
              properties:
                source: 'GitHub Actions'
                ci-backend: 'github'
                dt.event.deployment.name: "${{ env.APP_NAME }} - Version: ${{ inputs.version }}"
                dt.event.deployment.release_product: "${{ env.APP_NAME }}"
                dt.event.deployment.project: ""
                dt.event.deployment.version: ""
                dt.event.deployment.release_stage: "" 
                dt.event.deployment.release_build_version: ""
                dt.event.deployment.ci_back_link: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
                dt.event.deployment.remediation_action_link: "${{ github.server_url }}/${{ github.repository }}/releases"                        
                dt.event.is_rootcause_relevant: true

luis-iaggbs avatar Dec 24 '24 06:12 luis-iaggbs