diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d39aa392..fe66bc3f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -172,6 +172,7 @@ jobs: CORSO_SECONDARY_M365_TEST_USER_ID: ${{ vars.CORSO_SECONDARY_M365_TEST_USER_ID }} CORSO_PASSPHRASE: ${{ secrets.INTEGRATION_TEST_CORSO_PASSPHRASE }} S3_BUCKET: ${{ secrets.CI_TESTS_S3_BUCKET }} + CORSO_ENABLE_GROUPS: true run: | set -euo pipefail go test \ @@ -242,6 +243,7 @@ jobs: CORSO_SECONDARY_M365_TEST_USER_ID: ${{ vars.CORSO_SECONDARY_M365_TEST_USER_ID }} CORSO_PASSPHRASE: ${{ secrets.INTEGRATION_TEST_CORSO_PASSPHRASE }} S3_BUCKET: ${{ secrets.CI_RETENTION_TESTS_S3_BUCKET }} + CORSO_ENABLE_GROUPS: true run: | set -euo pipefail go test \ @@ -275,6 +277,7 @@ jobs: env: CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-unit.log LOG_GRAPH_REQUESTS: true + CORSO_ENABLE_GROUPS: true steps: - uses: actions/checkout@v3 @@ -329,6 +332,7 @@ jobs: env: CORSO_LOG_FILE: ${{ github.workspace }}/testlog/run-fork.log LOG_GRAPH_REQUESTS: true + CORSO_ENABLE_GROUPS: true steps: - name: Fail check if not repository_dispatch if: github.event_name != 'repository_dispatch' diff --git a/.github/workflows/nightly_test.yml b/.github/workflows/nightly_test.yml index a676a5bac..5d47eb2d3 100644 --- a/.github/workflows/nightly_test.yml +++ b/.github/workflows/nightly_test.yml @@ -59,6 +59,7 @@ jobs: AZURE_CLIENT_ID_NAME: ${{ needs.SetM365App.outputs.client_id_env }} AZURE_CLIENT_SECRET_NAME: ${{ needs.SetM365App.outputs.client_secret_env }} CLIENT_APP_SLOT: ${{ needs.SetM365App.outputs.client_app_slot }} + CORSO_ENABLE_GROUPS: true steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/sanity-test.yaml b/.github/workflows/sanity-test.yaml index d7774c66e..b6350dd14 100644 --- a/.github/workflows/sanity-test.yaml +++ b/.github/workflows/sanity-test.yaml @@ -39,6 +39,7 @@ jobs: CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-sanity.log RESTORE_DEST_PFX: Corso_Test_Sanity_ TEST_USER: ${{ github.event.inputs.user != '' && github.event.inputs.user || secrets.CORSO_M365_TEST_USER_ID }} + CORSO_ENABLE_GROUPS: true defaults: run: diff --git a/src/cli/backup/backup.go b/src/cli/backup/backup.go index c21f5cbb3..f9bdc3781 100644 --- a/src/cli/backup/backup.go +++ b/src/cli/backup/backup.go @@ -3,6 +3,7 @@ package backup import ( "context" "fmt" + "os" "strings" "github.com/alcionai/clues" @@ -39,8 +40,9 @@ var serviceCommands = []func(cmd *cobra.Command) *cobra.Command{ addExchangeCommands, addOneDriveCommands, addSharePointCommands, - addGroupsCommands, - addTeamsCommands, + // awaiting release + // addGroupsCommands, + // addTeamsCommands, } // AddCommands attaches all `corso backup * *` commands to the parent. @@ -55,6 +57,12 @@ func AddCommands(cmd *cobra.Command) { for _, addBackupTo := range serviceCommands { addBackupTo(subCommand) } + + // delete after release + if len(os.Getenv("CORSO_ENABLE_GROUPS")) > 0 { + addGroupsCommands(subCommand) + addTeamsCommands(subCommand) + } } } diff --git a/src/cli/export/export.go b/src/cli/export/export.go index 5f63895c0..20dd0f155 100644 --- a/src/cli/export/export.go +++ b/src/cli/export/export.go @@ -3,6 +3,7 @@ package export import ( "context" "errors" + "os" "github.com/alcionai/clues" "github.com/spf13/cobra" @@ -21,8 +22,9 @@ import ( var exportCommands = []func(cmd *cobra.Command) *cobra.Command{ addOneDriveCommands, addSharePointCommands, - addGroupsCommands, - addTeamsCommands, + // awaiting release + // addGroupsCommands, + // addTeamsCommands, } // AddCommands attaches all `corso export * *` commands to the parent. @@ -33,6 +35,12 @@ func AddCommands(cmd *cobra.Command) { for _, addExportTo := range exportCommands { addExportTo(exportC) } + + // delete after release + if len(os.Getenv("CORSO_ENABLE_GROUPS")) > 0 { + addGroupsCommands(exportC) + addTeamsCommands(exportC) + } } const exportCommand = "export" diff --git a/src/cli/restore/restore.go b/src/cli/restore/restore.go index 2ca3ed0eb..444f713a5 100644 --- a/src/cli/restore/restore.go +++ b/src/cli/restore/restore.go @@ -2,6 +2,7 @@ package restore import ( "context" + "os" "github.com/alcionai/clues" "github.com/pkg/errors" @@ -20,6 +21,9 @@ var restoreCommands = []func(cmd *cobra.Command) *cobra.Command{ addExchangeCommands, addOneDriveCommands, addSharePointCommands, + // awaiting release + // addGroupsCommands, + // addTeamsCommands, } // AddCommands attaches all `corso restore * *` commands to the parent. @@ -30,6 +34,12 @@ func AddCommands(cmd *cobra.Command) { for _, addRestoreTo := range restoreCommands { addRestoreTo(restoreC) } + + // delete after release + if len(os.Getenv("CORSO_ENABLE_GROUPS")) > 0 { + addGroupsCommands(restoreC) + addTeamsCommands(restoreC) + } } const restoreCommand = "restore"