hide groups/teams cli behind env (#4128)
#### Does this PR need a docs update or release note? - [x] ⛔ No #### Type of change - [x] 🤖 Supportability/Tests #### Test Plan - [x] ⚡ Unit test - [x] 💚 E2E
This commit is contained in:
parent
3e43028a88
commit
d1f098b398
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -172,6 +172,7 @@ jobs:
|
|||||||
CORSO_SECONDARY_M365_TEST_USER_ID: ${{ vars.CORSO_SECONDARY_M365_TEST_USER_ID }}
|
CORSO_SECONDARY_M365_TEST_USER_ID: ${{ vars.CORSO_SECONDARY_M365_TEST_USER_ID }}
|
||||||
CORSO_PASSPHRASE: ${{ secrets.INTEGRATION_TEST_CORSO_PASSPHRASE }}
|
CORSO_PASSPHRASE: ${{ secrets.INTEGRATION_TEST_CORSO_PASSPHRASE }}
|
||||||
S3_BUCKET: ${{ secrets.CI_TESTS_S3_BUCKET }}
|
S3_BUCKET: ${{ secrets.CI_TESTS_S3_BUCKET }}
|
||||||
|
CORSO_ENABLE_GROUPS: true
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
go test \
|
go test \
|
||||||
@ -242,6 +243,7 @@ jobs:
|
|||||||
CORSO_SECONDARY_M365_TEST_USER_ID: ${{ vars.CORSO_SECONDARY_M365_TEST_USER_ID }}
|
CORSO_SECONDARY_M365_TEST_USER_ID: ${{ vars.CORSO_SECONDARY_M365_TEST_USER_ID }}
|
||||||
CORSO_PASSPHRASE: ${{ secrets.INTEGRATION_TEST_CORSO_PASSPHRASE }}
|
CORSO_PASSPHRASE: ${{ secrets.INTEGRATION_TEST_CORSO_PASSPHRASE }}
|
||||||
S3_BUCKET: ${{ secrets.CI_RETENTION_TESTS_S3_BUCKET }}
|
S3_BUCKET: ${{ secrets.CI_RETENTION_TESTS_S3_BUCKET }}
|
||||||
|
CORSO_ENABLE_GROUPS: true
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
go test \
|
go test \
|
||||||
@ -275,6 +277,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-unit.log
|
CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-unit.log
|
||||||
LOG_GRAPH_REQUESTS: true
|
LOG_GRAPH_REQUESTS: true
|
||||||
|
CORSO_ENABLE_GROUPS: true
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
@ -329,6 +332,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CORSO_LOG_FILE: ${{ github.workspace }}/testlog/run-fork.log
|
CORSO_LOG_FILE: ${{ github.workspace }}/testlog/run-fork.log
|
||||||
LOG_GRAPH_REQUESTS: true
|
LOG_GRAPH_REQUESTS: true
|
||||||
|
CORSO_ENABLE_GROUPS: true
|
||||||
steps:
|
steps:
|
||||||
- name: Fail check if not repository_dispatch
|
- name: Fail check if not repository_dispatch
|
||||||
if: github.event_name != 'repository_dispatch'
|
if: github.event_name != 'repository_dispatch'
|
||||||
|
|||||||
1
.github/workflows/nightly_test.yml
vendored
1
.github/workflows/nightly_test.yml
vendored
@ -59,6 +59,7 @@ jobs:
|
|||||||
AZURE_CLIENT_ID_NAME: ${{ needs.SetM365App.outputs.client_id_env }}
|
AZURE_CLIENT_ID_NAME: ${{ needs.SetM365App.outputs.client_id_env }}
|
||||||
AZURE_CLIENT_SECRET_NAME: ${{ needs.SetM365App.outputs.client_secret_env }}
|
AZURE_CLIENT_SECRET_NAME: ${{ needs.SetM365App.outputs.client_secret_env }}
|
||||||
CLIENT_APP_SLOT: ${{ needs.SetM365App.outputs.client_app_slot }}
|
CLIENT_APP_SLOT: ${{ needs.SetM365App.outputs.client_app_slot }}
|
||||||
|
CORSO_ENABLE_GROUPS: true
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
|||||||
1
.github/workflows/sanity-test.yaml
vendored
1
.github/workflows/sanity-test.yaml
vendored
@ -39,6 +39,7 @@ jobs:
|
|||||||
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 || secrets.CORSO_M365_TEST_USER_ID }}
|
||||||
|
CORSO_ENABLE_GROUPS: true
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package backup
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/alcionai/clues"
|
"github.com/alcionai/clues"
|
||||||
@ -39,8 +40,9 @@ var serviceCommands = []func(cmd *cobra.Command) *cobra.Command{
|
|||||||
addExchangeCommands,
|
addExchangeCommands,
|
||||||
addOneDriveCommands,
|
addOneDriveCommands,
|
||||||
addSharePointCommands,
|
addSharePointCommands,
|
||||||
addGroupsCommands,
|
// awaiting release
|
||||||
addTeamsCommands,
|
// addGroupsCommands,
|
||||||
|
// addTeamsCommands,
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddCommands attaches all `corso backup * *` commands to the parent.
|
// AddCommands attaches all `corso backup * *` commands to the parent.
|
||||||
@ -55,6 +57,12 @@ func AddCommands(cmd *cobra.Command) {
|
|||||||
for _, addBackupTo := range serviceCommands {
|
for _, addBackupTo := range serviceCommands {
|
||||||
addBackupTo(subCommand)
|
addBackupTo(subCommand)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// delete after release
|
||||||
|
if len(os.Getenv("CORSO_ENABLE_GROUPS")) > 0 {
|
||||||
|
addGroupsCommands(subCommand)
|
||||||
|
addTeamsCommands(subCommand)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package export
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
"os"
|
||||||
|
|
||||||
"github.com/alcionai/clues"
|
"github.com/alcionai/clues"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
@ -21,8 +22,9 @@ import (
|
|||||||
var exportCommands = []func(cmd *cobra.Command) *cobra.Command{
|
var exportCommands = []func(cmd *cobra.Command) *cobra.Command{
|
||||||
addOneDriveCommands,
|
addOneDriveCommands,
|
||||||
addSharePointCommands,
|
addSharePointCommands,
|
||||||
addGroupsCommands,
|
// awaiting release
|
||||||
addTeamsCommands,
|
// addGroupsCommands,
|
||||||
|
// addTeamsCommands,
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddCommands attaches all `corso export * *` commands to the parent.
|
// AddCommands attaches all `corso export * *` commands to the parent.
|
||||||
@ -33,6 +35,12 @@ func AddCommands(cmd *cobra.Command) {
|
|||||||
for _, addExportTo := range exportCommands {
|
for _, addExportTo := range exportCommands {
|
||||||
addExportTo(exportC)
|
addExportTo(exportC)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// delete after release
|
||||||
|
if len(os.Getenv("CORSO_ENABLE_GROUPS")) > 0 {
|
||||||
|
addGroupsCommands(exportC)
|
||||||
|
addTeamsCommands(exportC)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const exportCommand = "export"
|
const exportCommand = "export"
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package restore
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"os"
|
||||||
|
|
||||||
"github.com/alcionai/clues"
|
"github.com/alcionai/clues"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
@ -20,6 +21,9 @@ var restoreCommands = []func(cmd *cobra.Command) *cobra.Command{
|
|||||||
addExchangeCommands,
|
addExchangeCommands,
|
||||||
addOneDriveCommands,
|
addOneDriveCommands,
|
||||||
addSharePointCommands,
|
addSharePointCommands,
|
||||||
|
// awaiting release
|
||||||
|
// addGroupsCommands,
|
||||||
|
// addTeamsCommands,
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddCommands attaches all `corso restore * *` commands to the parent.
|
// AddCommands attaches all `corso restore * *` commands to the parent.
|
||||||
@ -30,6 +34,12 @@ func AddCommands(cmd *cobra.Command) {
|
|||||||
for _, addRestoreTo := range restoreCommands {
|
for _, addRestoreTo := range restoreCommands {
|
||||||
addRestoreTo(restoreC)
|
addRestoreTo(restoreC)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// delete after release
|
||||||
|
if len(os.Getenv("CORSO_ENABLE_GROUPS")) > 0 {
|
||||||
|
addGroupsCommands(restoreC)
|
||||||
|
addTeamsCommands(restoreC)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const restoreCommand = "restore"
|
const restoreCommand = "restore"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user