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

fix(pipelines): repos with dashes cannot be used as additionalInputs #16017

Merged
merged 2 commits into from
Aug 12, 2021

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Aug 12, 2021

Cause: dashes are valid in artifact names in CodePipeline, but are not
valid in secondary source names in CodeBuild.

Do a sanitization to the intersection of requirements between
CodePipeline and CodeBuild.

Fixes #15753.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Cause: dashes are valid in *artifact names* in CodePipeline, but are *not*
valid in *secondary source names* in CodeBuild.

Do a sanitization to the intersection of requirements between
CodePipeline and CodeBuild.

Fixes #15753.
@rix0rrr rix0rrr requested a review from a team August 12, 2021 12:37
@rix0rrr rix0rrr self-assigned this Aug 12, 2021
@gitpod-io
Copy link

gitpod-io bot commented Aug 12, 2021

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Aug 12, 2021
function sanitizeArtifactName(x: string): string {
// FIXME: Does this REALLY not allow '.'? The docs don't mention it, but action names etc. do!
return x.replace(/[^A-Za-z0-9@\-_]/g, '_');
let sani = x.replace(/[^A-Za-z0-9_]/g, '_'); // Charset requirement is imposed by CodeBuild
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not directly related to this change, but this function can cause name clashes. Is this a problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered it but didn't think so.

@mergify
Copy link
Contributor

mergify bot commented Aug 12, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: c1948eb
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 400a59d into master Aug 12, 2021
@mergify mergify bot deleted the huijbers/pipelines-secondary-dashes branch August 12, 2021 13:56
@mergify
Copy link
Contributor

mergify bot commented Aug 12, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
…ws#16017)

Cause: dashes are valid in *artifact names* in CodePipeline, but are *not*
valid in *secondary source names* in CodeBuild.

Do a sanitization to the intersection of requirements between
CodePipeline and CodeBuild.

Fixes aws#15753.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
david-doyle-as24 pushed a commit to david-doyle-as24/aws-cdk that referenced this pull request Sep 7, 2021
…ws#16017)

Cause: dashes are valid in *artifact names* in CodePipeline, but are *not*
valid in *secondary source names* in CodeBuild.

Do a sanitization to the intersection of requirements between
CodePipeline and CodeBuild.

Fixes aws#15753.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(pipelines): additionalInputs fails for certain repository names
3 participants