question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(CodeStarConnectionsSourceAction): repo name wrongly formated

See original GitHub issue

❓ Repo name wrongly submitted. (Pipeline fail) Unwanted character added.

When a repo name is specified, e.g. f’dso’, a ‘/’ is always inserted in front. Example: f’Greenwidget/dso’ become /Greenwidget/dso’ f’dso’ become /dso’

Code Sample

self.mssp_pip_for_tf = codepipeline.Pipeline(
    self, "Pipeline",
    stages=[
        codepipeline.StageProps(stage_name="Source",
                                actions=[
                                    codepipeline_actions.CodeStarConnectionsSourceAction(
                                        action_name='Greenwidget-GitHub-' + self.repo_name.split("/", 1)[1],
                                        connection_arn=self.connection_arn,
                                        owner=self.repo_owner,
                                        repo=self.repo_name,
                                        branch=self.branch_name,
                                        trigger_on_push=True,
                                        code_build_clone_output=True,
                                        output=self.mssp_tf_source_output)]),
        codepipeline.StageProps(stage_name="Build",
                                actions=[
                                    codepipeline_actions.CodeBuildAction(
                                        action_name="Terraform_Build",
                                        project=self.mssp_pipj_for_tf,
                                        input=self.mssp_tf_source_output,
                                        outputs=[self.mssp_tf_build_output])])
    ]
)

The Question

Repo field must have the ability to pass the name without formatting, e.g. Organization/RepoName, example: Greenwidget/dso.

Environment

  • CDK CLI Version: 1.8
  • Module Version: 1.8
  • Node.js Version: 16.3.0
  • OS: Windows 10
  • Language (Version): Python (3.9)

Other information

Destination repo is GitHub with repo’s in an organization

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
evanerwee01commented, Jun 16, 2021

Code snippet now.

        for pod in helpers.CDK_PODS:
            self.team_name = f'{pod}'.lower()
            self.mssp_pipeline_id = f'{helpers.NESTED_ENTITY_PREFIX}-{self.team_name}-pipeline-{helpers.STAGE}'
            self.mssp_pipeline_state = CDKPipelineMasterStack(
                self,
                self.mssp_pipeline_id,
                branch_name='main',
                repo_name=f'mssp-dso-{pod}',
                repo_owner='Greenwidget',
                env=helpers.ENV_DSO,
                pipeline_policy=getattr(policy_def, f'{pod.upper()}_DSO_POLICY'),
                team_name=self.team_name,
                props=props
            )
1reaction
evanerwee01commented, Jun 16, 2021

Fantastic. Let me change the code and I will post back shortly. Thank You.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CodeStarSourceConnection for Bitbucket, GitHub, and GitHub ...
The date when the commit was authored, in timestamp format. BranchName. The name of the branch for the repository where the source change...
Read more >
Does CodeStarConnectionsSourceAction support filters like ...
The Question. Hi ,. I do have git hub repo like mono-repo which is having multiple folders for which we created multiple pipelines....
Read more >
@aws-cdk/aws-codepipeline-actions | Yarn - Package Manager
const repo = new codecommit. ... CodePipeline can deploy to an existing ECS service which uses the ECS service ARN format that contains...
Read more >
In AWS CDK, how should CodeStarConnectionsSourceAction ...
I figured it out, this is the working code, much shorter/concise: import * as cdk from "aws-cdk-lib" import {Construct} from "constructs" ...
Read more >
Creating CDK Pipelines with Github Source and Codestar ...
Select the Github provider, give the connection a name, and hit ... Sign in with Github, select the repository the connector is to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found