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

Allow merging of PR only after a successful apply #348

Closed
reulan opened this issue Nov 9, 2018 · 6 comments
Closed

Allow merging of PR only after a successful apply #348

reulan opened this issue Nov 9, 2018 · 6 comments
Labels
feature New functionality/enhancement

Comments

@reulan
Copy link
Contributor

reulan commented Nov 9, 2018

Some users who are unfamiliar with Terraform GitHub collaboration via Atlantis, attempt to merge their Terraform code after a successful plan before applying.

I would like to reduce the failure modes with Atlantis for these users by preventing the user from merging after a successful plan and only after a successful apply.

I would like to keep as similar workflow which requires status checks to pass before merging the GitHub Pull Request, but instead of using the general catch-all Atlantis status, I'd like to split it into:

  • Atlantis - Plan
  • Atlantis - Apply

This way, a successful Plan AND a successful Apply are both required before the user can merge the Pull Request.

@mumoshu
Copy link

mumoshu commented Dec 4, 2018

This sounds like a great idea, and it should be possible by changing atlantis to have a dedicated pull request status for apply.

Currently, atlantis mark the same pull request status successful either plan or apply succeeds. Once they're separated, we use the GitHub's branch protection feature to require status checks to be successful before allowing a merge.

@osterman
Copy link

Similarly, it would be nice if we could auto-merge after successful apply, so its closer to a traditional CD pipeline

@dbolack
Copy link

dbolack commented Jan 4, 2019

This looks related to the needs I'm trying to satisfy. We tried doing this but found that applies would always fail because the mergable test would go from passing to incomplete as part atlantis firing off the reply causing it to no longer be mergable and be an instant atlantis apply fail.

@reulan
Copy link
Contributor Author

reulan commented Mar 7, 2019

Closed by:
#514

@reulan reulan closed this as completed Mar 7, 2019
@lkysow lkysow added the feature New functionality/enhancement label Apr 9, 2019
@brandon-fryslie
Copy link

Has this functionality been implemented? We would like to prevent any merge on an atlantis PR that hasn't had apply run if possible. I apologize if I'm missing it, but I'm not seeing how PR #514 gives us that functionality. Not every PR in our repo has an associated terraform change, so we can't make atlantis apply a required check for every PR

@benoittgt
Copy link

I am also interested in this. I have the same needs as @brandon-fryslie

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

No branches or pull requests

7 participants