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

event rule to stop codepipeline first run (rMain only for now) #261

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

cnfait
Copy link
Contributor

@cnfait cnfait commented Feb 5, 2024

Description of changes:
For some reason CodePipeline starts newly-created pipelines automatically. In SDLF this means they are usually failing, especially because source branches are not available yet: AWS::CodeCommit::Repository does not allow creating more than one branch through the Code parameter, so when creating pipelines for all environments (dev, test and main branches), dev and test would fail.

Even if these branches existed the content would need to be relevant to not fail in later stages of the pipelines.

This is confusing for users as these failures are not relevant. This PR adds an event rule and a Lambda function to stop CodePipelines as soon as they start their first run. This is a solution, not a great solution, but let's improve things bit by bit.

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

@cnfait cnfait self-assigned this Feb 5, 2024
@cnfait cnfait added this to the 2.1.0 milestone Feb 5, 2024
@cnfait cnfait merged commit c752dcd into main Feb 5, 2024
3 checks passed
@cnfait cnfait deleted the codepipeline-firstrun-stop branch February 5, 2024 16:19
cnfait added a commit that referenced this pull request Feb 5, 2024
this allows creating git branches ahead of CodePipelines - then they won't fail so fast,
allowing the CodePipeline stopper to kick in (see #261 or 4e290af)
cnfait added a commit that referenced this pull request Feb 5, 2024
this allows creating git branches ahead of CodePipelines - then they won't fail so fast,
allowing the CodePipeline stopper to kick in (see #261 or 4e290af)
cnfait added a commit that referenced this pull request Feb 5, 2024
…branches

this allows creating git branches ahead of CodePipelines - then they won't fail so fast,
allowing the CodePipeline stopper to kick in (see #261 or 4e290af)
cnfait added a commit that referenced this pull request Feb 5, 2024
…branches

this allows creating git branches ahead of CodePipelines - then they won't fail so fast,
allowing the CodePipeline stopper to kick in (see #261 or 4e290af)
cnfait added a commit that referenced this pull request Feb 5, 2024
…branches

this allows creating git branches ahead of CodePipelines - then they won't fail so fast,
allowing the CodePipeline stopper to kick in (see #261 or 4e290af)
cnfait added a commit that referenced this pull request Feb 5, 2024
…branches

this allows creating git branches ahead of CodePipelines - then they won't fail so fast,
allowing the CodePipeline stopper to kick in (see #261 or 4e290af)
cnfait added a commit that referenced this pull request Feb 5, 2024
…branches

this allows creating git branches ahead of CodePipelines - then they won't fail so fast,
allowing the CodePipeline stopper to kick in (see #261 or 4e290af)
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.

1 participant