refer to env instead of secrets in ci (#4480)

#### Does this PR need a docs update or release note?

- [x]  No

#### Type of change

- [x] 💻 CI/Deployment
This commit is contained in:
Keepers 2023-10-11 12:33:41 -06:00 committed by GitHub
parent 06cefb2aa5
commit 3a0fcd4a8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -36,7 +36,7 @@ jobs:
CORSO_LOG_DIR: ${{ github.workspace }}/src/testlog CORSO_LOG_DIR: ${{ github.workspace }}/src/testlog
CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-longevity.log CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-longevity.log
RESTORE_DEST_PFX: Corso_Test_Longevity_ RESTORE_DEST_PFX: Corso_Test_Longevity_
TEST_USER: ${{ github.event.inputs.user != '' && github.event.inputs.user || secrets.CORSO_M365_TEST_USER_ID }} TEST_USER: ${{ github.event.inputs.user != '' && github.event.inputs.user || vars.CORSO_M365_TEST_USER_ID }}
PREFIX: 'longevity' PREFIX: 'longevity'
# Options for retention. # Options for retention.
@ -195,7 +195,7 @@ jobs:
./corso backup create sharepoint \ ./corso backup create sharepoint \
--no-stats \ --no-stats \
--hide-progress \ --hide-progress \
--site "${{ secrets.CORSO_M365_TEST_SITE_URL }}" \ --site "${{ vars.CORSO_M365_TEST_SITE_URL }}" \
--json \ --json \
2>&1 | tee ${{ env.CORSO_LOG_DIR }}/backup_sharepoint.txt 2>&1 | tee ${{ env.CORSO_LOG_DIR }}/backup_sharepoint.txt

View File

@ -38,7 +38,7 @@ jobs:
CORSO_LOG_DIR: ${{ github.workspace }}/src/testlog CORSO_LOG_DIR: ${{ github.workspace }}/src/testlog
CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-sanity.log CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-sanity.log
RESTORE_DEST_PFX: Corso_Test_Sanity_ RESTORE_DEST_PFX: Corso_Test_Sanity_
TEST_USER: ${{ github.event.inputs.user != '' && github.event.inputs.user || secrets.CORSO_M365_TEST_USER_ID }} TEST_USER: ${{ github.event.inputs.user != '' && github.event.inputs.user || vars.CORSO_M365_TEST_USER_ID }}
CORSO_ENABLE_GROUPS: true CORSO_ENABLE_GROUPS: true
defaults: defaults:
@ -93,7 +93,7 @@ jobs:
if: always() if: always()
uses: ./.github/actions/purge-m365-data uses: ./.github/actions/purge-m365-data
with: with:
site: ${{ secrets.CORSO_M365_TEST_SITE_URL }} site: ${{ vars.CORSO_M365_TEST_SITE_URL }}
folder-prefix: ${{ env.RESTORE_DEST_PFX }} folder-prefix: ${{ env.RESTORE_DEST_PFX }}
libraries: ${{ vars.CORSO_M365_TEST_SITE_LIBRARIES }} libraries: ${{ vars.CORSO_M365_TEST_SITE_LIBRARIES }}
older-than: ${{ env.NOW }} older-than: ${{ env.NOW }}
@ -291,7 +291,7 @@ jobs:
suffix=$(date +"%Y-%m-%d_%H-%M-%S") suffix=$(date +"%Y-%m-%d_%H-%M-%S")
go run . sharepoint files \ go run . sharepoint files \
--site ${{ secrets.CORSO_M365_TEST_SITE_URL }} \ --site ${{ vars.CORSO_M365_TEST_SITE_URL }} \
--user ${{ env.TEST_USER }} \ --user ${{ env.TEST_USER }} \
--secondaryuser ${{ env.CORSO_SECONDARY_M365_TEST_USER_ID }} \ --secondaryuser ${{ env.CORSO_SECONDARY_M365_TEST_USER_ID }} \
--tenant ${{ secrets.TENANT_ID }} \ --tenant ${{ secrets.TENANT_ID }} \
@ -306,7 +306,7 @@ jobs:
with: with:
service: sharepoint service: sharepoint
kind: first-backup kind: first-backup
backup-args: '--site "${{ secrets.CORSO_M365_TEST_SITE_URL }}"' backup-args: '--site "${{ vars.CORSO_M365_TEST_SITE_URL }}"'
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}' restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}'
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}' test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}'
log-dir: ${{ env.CORSO_LOG_DIR }} log-dir: ${{ env.CORSO_LOG_DIR }}
@ -317,7 +317,7 @@ jobs:
working-directory: ./src/cmd/factory working-directory: ./src/cmd/factory
run: | run: |
go run . sharepoint files \ go run . sharepoint files \
--site ${{ secrets.CORSO_M365_TEST_SITE_URL }} \ --site ${{ vars.CORSO_M365_TEST_SITE_URL }} \
--user ${{ env.TEST_USER }} \ --user ${{ env.TEST_USER }} \
--secondaryuser ${{ env.CORSO_SECONDARY_M365_TEST_USER_ID }} \ --secondaryuser ${{ env.CORSO_SECONDARY_M365_TEST_USER_ID }} \
--tenant ${{ secrets.TENANT_ID }} \ --tenant ${{ secrets.TENANT_ID }} \
@ -330,7 +330,7 @@ jobs:
with: with:
service: sharepoint service: sharepoint
kind: incremental kind: incremental
backup-args: '--site "${{ secrets.CORSO_M365_TEST_SITE_URL }}"' backup-args: '--site "${{ vars.CORSO_M365_TEST_SITE_URL }}"'
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}' restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}'
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}' test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}'
log-dir: ${{ env.CORSO_LOG_DIR }} log-dir: ${{ env.CORSO_LOG_DIR }}