Skip to content

Commit

Permalink
Change GitHub source to connection
Browse files Browse the repository at this point in the history
This removes the need to store credentials all the time
  • Loading branch information
jonodrew committed Nov 7, 2023
1 parent 03f329c commit a5507d1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions mentor_match_infra/mentor_match_infra/mentor_match_pipeline.py
@@ -1,5 +1,4 @@
from aws_cdk import Stack, Environment
from aws_cdk.aws_secretsmanager import Secret
from aws_cdk.pipelines import (
CodePipeline,
ShellStep,
Expand All @@ -22,12 +21,11 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs):
cross_account_keys=True,
synth=ShellStep(
"Synth",
input=CodePipelineSource.git_hub(
input=CodePipelineSource.connection(
"mentor-matching-online/mentor-match",
"main",
authentication=Secret.from_secret_name_v2(
self, "SecretGetter", "github-token"
).secret_value,
branch="main",
connection_arn="arn:aws:codestar-connections:eu-west-2:661101848753:connection/99c2d217-1c7c-4ff5-9769-eebe35880557", # noqa
action_name="github_source",
),
commands=[
"npm install -g aws-cdk",
Expand Down

0 comments on commit a5507d1

Please sign in to comment.