Skip to content

Commit

Permalink
RUNNING_IN_CODEPIPELINE
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPates committed Sep 23, 2022
1 parent dd92276 commit 2a343f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/awslabs/ssosync/internal"
"github.com/awslabs/ssosync/internal/config"

"github.com/aws/aws-sdk-go/service/codepipeline"
"github.com/aws/aws-lambda-go/lambda"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/secretsmanager"
Expand Down Expand Up @@ -77,6 +78,7 @@ func init() {
// init config
cfg = config.New()
cfg.IsLambda = len(os.Getenv("_LAMBDA_SERVER_PORT")) > 0
cfg.IsLambdaRunningInCodePipeline = os.Getenv("RUNNING_IN_CODEPIPELINE") == "True"

// initialize cobra
cobra.OnInitialize(initConfig)
Expand Down
2 changes: 2 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ type Config struct {
SCIMAccessToken string `mapstructure:"scim_access_token"`
// IsLambda ...
IsLambda bool
// IsLambdaRunningInCodePipeline ...
IsLambdaRunningInCodePipeline bool
// Ignore users ...
IgnoreUsers []string `mapstructure:"ignore_users"`
// Ignore groups ...
Expand Down

0 comments on commit 2a343f3

Please sign in to comment.