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

Bug: PipelineProject badge error #1749

Closed
seawatts opened this issue Feb 12, 2019 · 5 comments · Fixed by #2242 · May be fixed by MechanicalRock/account-reaper#6
Closed

Bug: PipelineProject badge error #1749

seawatts opened this issue Feb 12, 2019 · 5 comments · Fixed by #2242 · May be fixed by MechanicalRock/account-reaper#6
Labels
@aws-cdk/aws-codebuild Related to AWS CodeBuild @aws-cdk/aws-codepipeline Related to AWS CodePipeline effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md

Comments

@seawatts
Copy link

When creating a new PipelineProject I get an error when trying to enable badge

 const project = new codebuild.PipelineProject(this, 'TestProject', {
      environment: {
        buildImage: codebuild.LinuxBuildImage.UBUNTU_14_04_NODEJS_8_11_0
      },
      badge: true
    });
UPDATE_FAILED  | AWS::CodeBuild::Project  | TestProject (TestProjectF1529E8A) Failed to call UpdateProject, reason: Build badges are not supported for CodePipeline source (Service: AWSCodeBuild; Status Code: 400; Error Code: InvalidInputException; 
@eladb
Copy link
Contributor

eladb commented Feb 13, 2019

As the error says, I don't believe badges are supported for a PipelineProject, you should use a regular codebuild.Project construct instead.

We should add a validation in PipelineProject (or even better, remove this property from PipelineProject).

@eladb eladb added feature-request A feature should be added or improved. @aws-cdk/aws-codepipeline Related to AWS CodePipeline @aws-cdk/aws-codebuild Related to AWS CodeBuild labels Feb 13, 2019
@seawatts
Copy link
Author

seawatts commented Feb 13, 2019 via email

@skinny85 skinny85 added good first issue Related to contributions. See CONTRIBUTING.md effort/small Small work item – less than a day of effort labels Mar 18, 2019
@skinny85 skinny85 removed their assignment Mar 18, 2019
Kaixiang-AWS added a commit to Kaixiang-AWS/aws-cdk that referenced this issue Apr 11, 2019
Badge should not be allow to set to true if source is not GITHUB, GITHUB_ENTERPRISE or BITBUCKET

Fixes aws#1749
skinny85 pushed a commit that referenced this issue Apr 11, 2019
…true (#2242)

Badge should not be allowed to be true if Source is not of type GitHub, GitHub Enterprise or Bitbucket.

Fixes #1749
@jamiepmullan
Copy link
Contributor

Hey @eladb & @skinny85 - are there any plans to fix this? i.e. so you can use PipelineProject and badges?

@skinny85
Copy link
Contributor

Hi @jamiepmullan ,

like the error says:

UPDATE_FAILED  | AWS::CodeBuild::Project  | TestProject (TestProjectF1529E8A) Failed to call UpdateProject, reason: Build badges are not supported for CodePipeline source (Service: AWSCodeBuild; Status Code: 400; Error Code: InvalidInputException; 

this is actually a CodeBuild limitation - there's nothing we can do in the CDK to ad support for these, since the service itself doesn't support this usecase.

Sorry!

@mmuller88
Copy link
Contributor

With today I released an AWS CDK custom construct for creating badges with using a lambda https://github.com/mmuller88/aws-cdk-build-badge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-codebuild Related to AWS CodeBuild @aws-cdk/aws-codepipeline Related to AWS CodePipeline effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md
Projects
None yet
6 participants