mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-30 18:17:55 +00:00 
			
		
		
		
	Send the UI test results from the CI to DataDog (#28412)
This commit is contained in:
		
							
								
								
									
										27
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										27
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -194,6 +194,7 @@ jobs: | ||||
|           secrets: | | ||||
|             kv/data/github/hashicorp/vault-enterprise/github-token username-and-token | PRIVATE_REPO_GITHUB_TOKEN; | ||||
|             kv/data/github/hashicorp/vault-enterprise/license license_1 | VAULT_LICENSE; | ||||
|             kv/data/github/${{ github.repository }}/datadog-ci DATADOG_API_KEY; | ||||
|       - if: needs.setup.outputs.is-enterprise == 'true' | ||||
|         name: Set up Git | ||||
|         run: git config --global url."https://${{ steps.secrets.outputs.PRIVATE_REPO_GITHUB_TOKEN }}@github.com".insteadOf https://github.com | ||||
| @@ -217,6 +218,32 @@ jobs: | ||||
|         with: | ||||
|           name: test-results-ui | ||||
|           path: ui/test-results | ||||
|       - name: Prepare datadog-ci | ||||
|         if: (github.repository == 'hashicorp/vault' || github.repository == 'hashicorp/vault-enterprise') && (success() || failure()) | ||||
|         continue-on-error: true | ||||
|         run: | | ||||
|           if type datadog-ci > /dev/null 2>&1; then | ||||
|             exit 0 | ||||
|           fi | ||||
|           # Curl does not always exit 1 if things go wrong. To determine if this is successful | ||||
|           # we'll silence all non-error output and check the results to determine success. | ||||
|           if ! out="$(curl -sSL --fail https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64 --output /usr/local/bin/datadog-ci 2>&1)"; then | ||||
|             printf "failed to download datadog-ci: %s" "$out" | ||||
|           fi | ||||
|           if [[ -n "$out" ]]; then | ||||
|             printf "failed to download datadog-ci: %s" "$out" | ||||
|           fi | ||||
|           chmod +x /usr/local/bin/datadog-ci | ||||
|       - name: Upload test results to DataDog | ||||
|         if: success() || failure() | ||||
|         continue-on-error: true | ||||
|         env: | ||||
|           DD_ENV: ci | ||||
|         run: | | ||||
|           if [[ ${{ github.repository }} == 'hashicorp/vault' ]]; then | ||||
|             export DATADOG_API_KEY=${{ secrets.DATADOG_API_KEY }} | ||||
|           fi | ||||
|           datadog-ci junit upload --service "$GITHUB_REPOSITORY" 'ui/test-results/qunit/results.xml' | ||||
|       - if: always() | ||||
|         uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 | ||||
|         with: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Kuba Wieczorek
					Kuba Wieczorek