Skip to content

Commit bd78e12

Browse files
authored
Update codecov uploader (#3435)
1 parent a14b4dc commit bd78e12

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

buildspec/linuxIntegrationTests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ phases:
5656
- VCS_COMMIT_ID="${CODEBUILD_RESOLVED_SOURCE_VERSION}"
5757
- CI_BUILD_URL=$(echo $CODEBUILD_BUILD_URL | sed 's/#/%23/g') # Encode `#` in the URL because otherwise the url is clipped in the Codecov.io site
5858
- CI_BUILD_ID="${CODEBUILD_BUILD_ID}"
59-
- test -n "$CODE_COV_TOKEN" && curl -s https://codecov.io/bash > codecov.sh || true # this sometimes times out but we don't want to fail the build
60-
- test -n "$CODE_COV_TOKEN" && bash ./codecov.sh -t $CODE_COV_TOKEN -F integtest || true
59+
- test -n "$CODE_COV_TOKEN" && curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov || true # this sometimes times out but we don't want to fail the build
60+
- test -n "$CODE_COV_TOKEN" && test -n "$CODEBUILD_BUILD_SUCCEEDING" && ./codecov -t $CODE_COV_TOKEN -F integtest || true
6161

6262
post_build:
6363
commands:

buildspec/linuxTests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ phases:
3131
- VCS_COMMIT_ID="${CODEBUILD_RESOLVED_SOURCE_VERSION}"
3232
- CI_BUILD_URL=$(echo $CODEBUILD_BUILD_URL | sed 's/#/%23/g') # Encode `#` in the URL because otherwise the url is clipped in the Codecov.io site
3333
- CI_BUILD_ID="${CODEBUILD_BUILD_ID}"
34-
- test -n "$CODE_COV_TOKEN" && curl -s https://codecov.io/bash > codecov.sh || true # this sometimes times out but we don't want to fail the build
35-
- test -n "$CODE_COV_TOKEN" && bash ./codecov.sh -t $CODE_COV_TOKEN -F unittest || true
34+
- test -n "$CODE_COV_TOKEN" && curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov || true # this sometimes times out but we don't want to fail the build
35+
- test -n "$CODE_COV_TOKEN" && test -n "$CODEBUILD_BUILD_SUCCEEDING" && ./codecov -t $CODE_COV_TOKEN -F unittest || true
3636

3737
post_build:
3838
commands:

buildspec/linuxUiTests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ phases:
6565
- VCS_COMMIT_ID="${CODEBUILD_RESOLVED_SOURCE_VERSION}"
6666
- CI_BUILD_URL=$(echo $CODEBUILD_BUILD_URL | sed 's/#/%23/g') # Encode `#` in the URL because otherwise the url is clipped in the Codecov.io site
6767
- CI_BUILD_ID="${CODEBUILD_BUILD_ID}"
68-
- test -n "$CODE_COV_TOKEN" && curl -s https://codecov.io/bash > codecov.sh || true # this sometimes times out but we don't want to fail the build
69-
- test -n "$CODE_COV_TOKEN" && test -n "$CODEBUILD_BUILD_SUCCEEDING" && bash ./codecov.sh -t $CODE_COV_TOKEN -F uitest || true
68+
- test -n "$CODE_COV_TOKEN" && curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov || true # this sometimes times out but we don't want to fail the build
69+
- test -n "$CODE_COV_TOKEN" && test -n "$CODEBUILD_BUILD_SUCCEEDING" && ./codecov -t $CODE_COV_TOKEN -F uitest || true
7070

7171
reports:
7272
ui-test:

buildspec/windowsTests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ phases:
2121
$JAVA_HOME = "C:\Program Files\Amazon Corretto\$javaName"
2222
- |
2323
if(-Not($Env:CODE_COV_TOKEN -eq $null)) {
24-
choco install -y --no-progress codecov
24+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
25+
Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile codecov.exe
2526
}
2627
- dotnet --list-sdks
2728
- |
@@ -82,7 +83,7 @@ phases:
8283
$env:VCS_COMMIT_ID=$Env:CODEBUILD_RESOLVED_SOURCE_VERSION;
8384
$env:CI_BUILD_URL=[uri]::EscapeUriString($Env:CODEBUILD_BUILD_URL);
8485
$env:CI_BUILD_ID=$Env:CODEBUILD_BUILD_ID;
85-
codecov -t $Env:CODE_COV_TOKEN `
86+
.\codecov.exe -t $Env:CODE_COV_TOKEN `
8687
--flag unittest `
8788
-f "build/reports/jacoco/coverageReport/coverageReport.xml" `
8889
-c $Env:CODEBUILD_RESOLVED_SOURCE_VERSION

0 commit comments

Comments
 (0)