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

feat: allow multiple pipelines per repository (#20) #36

Merged
merged 3 commits into from
Nov 17, 2024

Conversation

cornelcroi
Copy link
Contributor

  • Include branch name in pipeline name for GitHub source
  • Update pipeline name format to [repoOwner]-[repoName]-[branchName]
  • Maintain S3 source pipeline naming unchanged
  • Clean pipeline name from special characters

This enables:

  • Multiple pipelines per repository
  • Different pipelines for different branches
  • Support for multiple environments

Fixes #20

Issue number:

Summary

Changes

Please provide a summary of what's being changed

User experience

Please share what the user experience looks like before and after this change

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented
Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

- Include branch name in pipeline name for GitHub source
- Update pipeline name format to [repoOwner]-[repoName]-[branchName]
- Maintain S3 source pipeline naming unchanged
- Clean pipeline name from special characters

This enables:
- Multiple pipelines per repository
- Different pipelines for different branches
- Support for multiple environments

Fixes #20
@cornelcroi
Copy link
Contributor Author

This feature has been implemented and merged.

Changes made:

  • Modified pipeline name format to include branch name: [repoOwner]-[repoName]-[branchName]
  • Pipeline names are now unique per branch within the same repository
  • Maintained existing functionality for S3-triggered pipelines
  • Kept name sanitization to handle special characters

You can now create multiple pipelines for different branches in the same repository. For example:

  • owner-repo-main
  • owner-repo-develop
  • owner-repo-feature-x

This enables you to set up separate pipelines for different branches/environments without needing multiple AWS accounts. Closes #20.

@cornelcroi cornelcroi closed this Oct 24, 2024
@sazuma-0612
Copy link

@cornelcroi

Thank you for implementing this feature. However, I noticed that the changes have not been merged into the main branch yet. Specifically, the modification to include the branch name in the pipeline name format is not reflected in the main branch:

https://github.com/awslabs/cloudfront-hosting-toolkit/blob/main/lib/pipeline_infrastructure.ts#L129

Could you please review this and merge the changes into the main branch? This is an important update that would allow users to create multiple pipelines for different branches in the same repository, as described in your comment.

I apologize if I misunderstood something, but I believe it's crucial to have these changes in the main branch for all users to benefit from this new functionality. Could you please clarify the status of this merge or take action to complete it?

Thank you for your attention to this matter.

@cornelcroi cornelcroi reopened this Nov 17, 2024
@cornelcroi cornelcroi merged commit 66541c6 into main Nov 17, 2024
@cornelcroi
Copy link
Contributor Author

Hi,

Sorry about that, I must have hit the close PR button before merging the changes.
You will see this change
pipelineName = ${repoOwner}-${repoName}-${params.hostingConfiguration.branchName};
This should allow you to have multiple pipelines.

@sazuma-0612
Copy link

Thank you very much for your quick response and for addressing this issue. I really appreciate your attention to this matter.

I can see the change has now been merged into the main branch, which is great news. This update will indeed allow for multiple pipelines as needed, which is exactly what I was hoping for.

Thank you again for your work on this feature and for ensuring it was properly merged. Your efforts are much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants