Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codebuild reads cognito-test-users param from environment account #1295

Merged
merged 1 commit into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions deploy/stacks/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,12 +670,6 @@ def set_approval_tests_stage(
id='ApprovalTests',
build_environment=codebuild.BuildEnvironment(
build_image=codebuild.LinuxBuildImage.AMAZON_LINUX_2_5,
environment_variables={
'USERDATA': BuildEnvironmentVariable(
value=os.path.join('/', self.resource_prefix, target_env['envname'], 'cognito-test-users'),
type=BuildEnvironmentVariableType.PARAMETER_STORE,
),
},
),
partial_build_spec=codebuild.BuildSpec.from_object(
dict(
Expand All @@ -691,6 +685,7 @@ def set_approval_tests_stage(
'aws sts get-caller-identity --profile buildprofile',
f'export COGNITO_CLIENT=$(aws ssm get-parameter --name /dataall/{target_env["envname"]}/cognito/appclient --profile buildprofile --output text --query "Parameter.Value")',
f'export API_ENDPOINT=$(aws ssm get-parameter --name /dataall/{target_env["envname"]}/apiGateway/backendUrl --profile buildprofile --output text --query "Parameter.Value")',
f'export USERDATA=$(aws ssm get-parameter --name /dataall/{target_env["envname"]}/cognito-test-users --profile buildprofile --output text --query "Parameter.Value")',
f'export ENVNAME={target_env["envname"]}',
f'export AWS_REGION={target_env["region"]}',
f'aws codeartifact login --tool pip --repository {self.codeartifact.codeartifact_pip_repo_name} --domain {self.codeartifact.codeartifact_domain_name} --domain-owner {self.codeartifact.domain.attr_owner}',
Expand Down
Loading