Integration: Switch to `upload-cloud-storage` Gcloud action.
Switch to using the new `google-github-actions/upload-cloud-storage`
GitHub action for uploading the CI results for the Windows Periodic
Tests.
@@ -41,11 +41,11 @@ jobs:
- win_ver: ltsc2019
AZURE_IMG: "MicrosoftWindowsServer:WindowsServer:2019-Datacenter-with-Containers-smalldisk:17763.1935.2105080716"
AZURE_RESOURCE_GROUP: ctrd-integration-ltsc2019-${{ github.run_id }}
- GOOGLE_BUCKET: "gs://containerd-integration/logs/windows-ltsc2019/"
+ GOOGLE_BUCKET: "containerd-integration/logs/windows-ltsc2019/"
- win_ver: ltsc2022
AZURE_IMG: "MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:20348.169.2108120020"
AZURE_RESOURCE_GROUP: ctrd-integration-ltsc2022-${{ github.run_id }}
- GOOGLE_BUCKET: "gs://containerd-integration/logs/windows-ltsc2022/"
+ GOOGLE_BUCKET: "containerd-integration/logs/windows-ltsc2022/"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@@ -196,7 +196,7 @@ jobs:
- name: FinishJob
run: |
jq -n --arg result SUCCESS --arg timestamp $(date +%s) '$timestamp|tonumber|{timestamp:.,$result}' > ${{ env.LOGS_DIR }}/finished.json
- echo "${{ env.STARTED_TIME }}" > $HOME/latest-build.txt
+ echo "${{ env.STARTED_TIME }}" > ${{ github.workspace }}/latest-build.txt
- name: AssignGcpCreds
id: AssignGcpCreds
@@ -211,14 +211,21 @@ jobs:
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
- - name: SetUpGcpSdk
- uses: google-github-actions/setup-gcloud@master
+ - name: UploadJobReport
+ uses: google-github-actions/upload-cloud-storage@v0
+ if: steps.AssignGcpCreds.outputs.GCP_SERVICE_ACCOUNT && steps.AssignGcpCreds.outputs.GCP_WORKLOAD_IDENTITY_PROVIDER
+ with:
+ path: ${{ github.workspace }}/latest-build.txt
+ destination: ${{ matrix.GOOGLE_BUCKET }}
+ parent: false
- - name: UploadArtifacts
- if: steps.AssignGcpCreds.outputs.GCP_PROJECT_ID && steps.AssignGcpCreds.outputs.GCP_SA_KEY
- run: |
- gsutil cp -r ${{ env.LOGS_DIR }} ${{ matrix.GOOGLE_BUCKET }}
- gsutil cp $HOME/latest-build.txt ${{ matrix.GOOGLE_BUCKET }}
+ - name: UploadLogsDir
+ uses: google-github-actions/upload-cloud-storage@v0
+ if: steps.AssignGcpCreds.outputs.GCP_SERVICE_ACCOUNT && steps.AssignGcpCreds.outputs.GCP_WORKLOAD_IDENTITY_PROVIDER
+ with:
+ path: ${{ env.LOGS_DIR }}
+ destination: ${{ matrix.GOOGLE_BUCKET }}${{ env.STARTED_TIME}}
+ parent: false
- name: ResourceCleanup
uses: azure/CLI@v1
