Commit Graph

934 Commits

Author SHA1 Message Date
Andrew Urwin
aec79b95e1 adding -upgrade to init cmd 2019-02-26 15:53:54 +00:00
Luke Kysow
5e9464b820 Merge pull request #488 from runatlantis/tfe-remote-ops
Detect if using TFE remote plan/apply backend
2019-02-25 11:12:58 -05:00
Luke Kysow
40bfb53212 Merge pull request #489 from zillow/feature/add-username-env-variable
Add user_name environment variable
2019-02-22 11:57:48 -05:00
Kip McEntire
901a9f6a44 Add user_name environment variable
Add USER_NAME environment variable to the documenation
2019-02-22 16:50:36 +00:00
Luke Kysow
f030fdd609 Detect if using TFE remote plan/apply backend
If so, don't run plan with -out because this isn't currently supported.
Instead, write a planfile afterwards with the text contents of the plan.

During apply, detect that the planfile was generated using a remote plan
and run apply with -auto-approve and without the planfile arg which
isn't supported.
2019-02-21 12:10:46 -05:00
Luke Kysow
ce5e127ed6 Merge pull request #484 from runatlantis/bb-server-automerge
Fix automerge bug in Bitbucket Server
2019-02-20 14:37:47 -05:00
Luke Kysow
bebbcb8a4d Fix automerge bug in Bitbucket Server
BB Server requires we send a 'version' parameter along with our call to
/merge.
2019-02-19 17:30:28 -05:00
Luke Kysow
cceb979ee4 Merge pull request #480 from posquit0/patch-1
Fix typo
2019-02-16 13:37:12 -06:00
Byungjin Park
3f4811c9bf Fix typo 2019-02-16 23:18:17 +09:00
Luke Kysow
ba0271cea3 Merge pull request #475 from Zophar78/bitbucket-webhookcheck
Allow bitbucket webhook to check atlantis server
2019-02-15 15:20:57 -06:00
Pierre Hanselmann
dd6c3241b9 Set specific check on diagnostics:ping bitbucket event 2019-02-15 13:58:32 +01:00
Luke Kysow
7d682b611d Merge pull request #470 from runatlantis/release-v0.4.15
Release v0.4.15
v0.4.15
2019-02-11 15:05:11 -06:00
Luke Kysow
27f54667fc Release v0.4.15 2019-02-11 15:03:21 -06:00
Luke Kysow
f4e1472aef Merge pull request #469 from runatlantis/mergeability
Get mergeable status *before* changing build status
2019-02-11 14:49:40 -06:00
Luke Kysow
4e429581b0 Refactor changes to get mergeability early 2019-02-11 14:46:18 -06:00
Luke Kysow
6b079386c0 Merge pull request #467 from runatlantis/bb-server-automerge
Add header to disable bitbucket xsrf
2019-02-11 11:44:39 -06:00
Luke Kysow
81693d79b3 Add header to disable bitbucket xsrf
Fixes #465 which is caused by XSRF detection on Bitbucket server and
cloud.
2019-02-11 11:38:44 -06:00
Luke Kysow
45a6823eb2 Merge pull request #466 from runatlantis/gh-automerge
GitHub Automerge Types
2019-02-11 11:22:49 -06:00
Luke Kysow
1de40340ea Merge pull request #464 from runatlantis/fix-long-output
Fix issues with terraform execution.
2019-02-11 11:21:57 -06:00
Luke Kysow
def41f6cef Add tests for GH merge-type detection. 2019-02-11 11:12:15 -06:00
Luke Kysow
5002397bda Document check-lint target 2019-02-11 10:21:57 -06:00
Luke Kysow
44f0094b75 Fix issues with terraform execution.
Previously I wrote a bunch of code to deal with terraform panicking.
This code used a pipe as the stdout/err buffer and there was a bug
because I wasn't reading off the pipe and it would get full.

While testing a fix, I realized when Terraform panics, the previous code
using CombinedOutput() just worked. As a result, I'm switching back to
that code.
2019-02-11 10:20:55 -06:00
Pratik Mallya
09782c4b6d Allow "Mergeable" apply requirement to work
Get the Mergeable status of the PR before updating the
Status. This allows for the Status to be a required
Status for merging the PR. This allows us to use the
atlantis status as a Required status, which is the
configuration often used, since most deployments
want to ensure tf plans have all been successfully
applied before merging

Issue: https://github.com/runatlantis/atlantis/issues/453
2019-02-09 03:26:26 -08:00
Brenden Matthews
862b5228d0 [automerge] Use available merge methods.
For repos with certain merge methods disabled (such as 'merge'), simply
hitting the GitHub `/merge` endpoint is not sufficient. Instead, we need
to check which methods are actually available, then use the appropriate
method.

With this change it will:

 1. Default to 'merge' if enabled
 2. Use 'rebase' if 'merge' is disabled and rebase is enabled
 3. Use 'squash' if 'merge' is disabled
2019-02-07 16:18:28 -05:00
Luke Kysow
a08cec9691 Merge pull request #458 from runatlantis/release-0.4.14
Release 0.4.14
v0.4.14
2019-02-07 10:28:58 -06:00
Luke Kysow
f5b2757a83 Release 0.4.14 2019-02-07 10:27:04 -06:00
Luke Kysow
102addcaa4 Merge pull request #457 from runatlantis/automerge
Add automerge capability
2019-02-07 09:33:27 -06:00
Luke Kysow
74e9bbb82b Add automerge feature.
Automerging merges pull requests automatically if all plans have been
successfully applied.

* Save status of PR's to BoltDB so after each apply, we can check if
there are pending plans.
* Add new feature where we delete successful plans *unless* all plans
have succeeded *if* automerge is enabled. This was requested by users
because when automerge is enabled, they want to enforce that a pull
request's changes have been fully applied. They asked that plans not be
allowed to be applied "piecemeal" and instead, all plans must be
generated successfully prior to allowing any plans to be applied.
2019-02-06 16:27:43 -06:00
Luke Kysow
2225da9c61 Switch to golangci-lint from gometalinter.
Hoping that this is more stable.
2019-02-06 16:26:46 -06:00
Luke Kysow
2c6b87d09b Merge pull request #451 from runatlantis/tfe-free-docs
Update docs to point at tfe free link.
2019-02-01 09:56:37 -05:00
Luke Kysow
34e3bfdb85 Update docs to point at tfe free link. 2019-02-01 09:55:04 -05:00
Luke Kysow
84c89ba7ea Merge pull request #442 from runatlantis/slack-token
Add slack-token to flags.
2019-01-22 22:32:21 -05:00
Luke Kysow
7aca997a06 Add missing period to flag docs. 2019-01-22 22:30:30 -05:00
Jacob Foard
2e65e03055 Adding in slack-token to flags
Signed-off-by: Jacob Foard <jacob.foard@formation.ai>
2019-01-22 22:30:30 -05:00
Luke Kysow
5341e7d843 Merge pull request #441 from runatlantis/website-testing
Test website for broken links during build.
2019-01-22 22:25:08 -05:00
Luke Kysow
8cb27aba02 Test website for broken links during build. 2019-01-22 22:21:36 -05:00
Luke Kysow
c0b89d9f1f Merge pull request #440 from runatlantis/gometalint
Update to latest linters. Fix errors.
2019-01-22 13:32:42 -05:00
Luke Kysow
70235d8e8f Update to latest linters. Fix errors. 2019-01-22 13:29:42 -05:00
Luke Kysow
d2c2e8de4f Merge pull request #439 from runatlantis/tfe-docs
Tfe docs
2019-01-22 12:16:08 -05:00
Luke Kysow
505ec77a5c Remove website-link-check build step.
This step doesn't work for forked pull requests so I'm removing it for
now.
2019-01-22 12:03:21 -05:00
Luke Kysow
61269e547b Update TFE free remote state mgmt docs 2019-01-22 12:02:31 -05:00
Luke Kysow
56b09b6d14 Merge pull request #433 from runatlantis/checkout-strategy
Document checkout strategy
2019-01-17 10:13:32 -05:00
Luke Kysow
108ffd8eea Document checkout strategy 2019-01-17 10:10:12 -05:00
Luke Kysow
a9d5feac84 Merge pull request #427 from runatlantis/checkout-strategy
Add new --checkout-strategy flag
2019-01-17 10:09:51 -05:00
Luke Kysow
16a4946bea Test new checkout logic. 2019-01-16 18:32:02 -05:00
Luke Kysow
3b7542b392 Merge pull request #430 from runatlantis/skipped-test
Fix skipped test
2019-01-16 17:52:40 -05:00
Luke Kysow
054d3bc5f6 Fix skipped test 2019-01-16 12:13:37 -05:00
Luke Kysow
501db6b66e Fix gometalinter errors
Also disable test linters since we already run tests.
2019-01-15 15:45:01 -05:00
Luke Kysow
8b77b95a16 Add checkout-strategy flag.
This flag can be set to either branch (default) or merge. If set to
branch, we will check out the head branch of the pull request (the
source). If set to merge, we will check out the base branch of the pull
request (the destination) and then attempt to perform a git merge of the
pull request branch. This simulates what will happen if the pull request
is merged.

This allows us to perform terraform commands on what the state of the
repo will be *after* the pull request is merged. This is useful if users
are often opening up pull requests from branches that aren't up to date
with master. With the branch strategy, the terraform plan might be
deleting resources that have been created in the master branch but with
the merge strategy, we merge the branch's changes into the master branch
and so don't have this problem.
2019-01-15 15:45:01 -05:00
Luke Kysow
d2abdb569a Provide base branch name in pull request model
This is needed in order to support the ability to check out the repo as
it would appear after the pull request is merged into the base branch.
2019-01-15 13:45:35 -05:00