diff --git a/.github/workflows/pipeline-segment-electron-test.yml b/.github/workflows/pipeline-segment-electron-test.yml index 137fe91996..5282ac11e2 100644 --- a/.github/workflows/pipeline-segment-electron-test.yml +++ b/.github/workflows/pipeline-segment-electron-test.yml @@ -196,7 +196,10 @@ jobs: DD_API_KEY: ${{ secrets.DD_API_KEY }} DD_CIVISIBILITY_LOGS_ENABLED: true DD_TAGS: "os.architecture:${{ inputs.target-arch }},os.family:${{ inputs.target-platform }},os.platform:${{ inputs.target-platform }},asan:${{ inputs.is-asan }}" - run: datadog-ci junit upload src/electron/junit/test-results-main.xml + run: | + if ! [ -z $DD_API_KEY ]; then + datadog-ci junit upload src/electron/junit/test-results-main.xml + fi if: always() && !cancelled() - name: Upload Test Artifacts if: always() && !cancelled() diff --git a/appveyor-woa.yml b/appveyor-woa.yml index b5823be68c..efe6ce71f2 100644 --- a/appveyor-woa.yml +++ b/appveyor-woa.yml @@ -335,7 +335,7 @@ for: # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - if exist electron\junit\test-results-main.xml ( appveyor-retry appveyor PushArtifact electron\junit\test-results-main.xml ) - ps: | - if ($env:RUN_TESTS -eq 'true') { + if ($env:DD_API_KEY) { $env:DD_GIT_COMMIT_SHA = $env:APPVEYOR_REPO_COMMIT $env:DD_GIT_BRANCH = $env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH $env:DD_TAGS = "os.architecture:$env:TARGET_ARCH,os.family:windows,os.platform:win32" diff --git a/appveyor.yml b/appveyor.yml index 9df8a5b83c..8231c28d05 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -330,7 +330,7 @@ for: # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - if exist electron\junit\test-results-main.xml ( appveyor-retry appveyor PushArtifact electron\junit\test-results-main.xml ) - ps: | - if ($env:RUN_TESTS -eq 'true') { + if ($env:RUN_TESTS -eq 'true' -And $env:DD_API_KEY) { $env:DD_GIT_COMMIT_SHA = $env:APPVEYOR_REPO_COMMIT $env:DD_GIT_BRANCH = $env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH $env:DD_TAGS = "os.architecture:$env:TARGET_ARCH,os.family:windows,os.platform:win32"