Commit Graph

864 Commits

Author SHA1 Message Date
Luke Kysow
3bb7c8d52f Fix version detection so it works with tf 0.12alph 2019-01-04 09:26:06 -05:00
Luke Kysow
41059d71f1 Merge pull request #407 from runatlantis/bump-test-image-tf-version
Document how to update the testing image.
v0.4.13
2018-12-20 13:26:03 -06:00
Luke Kysow
1df4be945c Document how to update the testing image. 2018-12-20 13:18:02 -06:00
Luke Kysow
f338209376 Merge pull request #406 from runatlantis/release-0.4.13
Release v0.4.13
2018-12-20 13:14:22 -06:00
Luke Kysow
9f3a7f2a08 Release v0.4.13 2018-12-20 13:11:37 -06:00
Luke Kysow
4c665b75c4 Merge pull request #403 from runatlantis/warn-target
Warn if using -target flag with apply.
2018-12-19 14:32:08 -06:00
Luke Kysow
a6ca764e87 Merge pull request #402 from runatlantis/logging-tweaks
Tweak logging. Add timezone, use everywhere.
2018-12-19 14:26:55 -06:00
Luke Kysow
d6917e49dc Merge pull request #396 from runatlantis/workspace-configured
If dir has workspaces configured only allow those
2018-12-19 14:26:35 -06:00
Luke Kysow
58493f3402 Warn if using -target flag with apply.
-target doesn't work with terraform apply when the apply is being run on
a planfile (which is how Atlantis runs plan). We should give the user an
error if they attempt this.

Fixes #399
2018-12-19 14:25:46 -06:00
Luke Kysow
0691f9f214 Merge pull request #400 from instacart/upgrade-tf-0-11-11
Bump Terraform version to 0.11.11
2018-12-19 13:44:34 -06:00
Luke Kysow
c4f89958d3 Tweak logging. Add timezone, use everywhere.
- Use logger for all warnings. Previously we were writing warnings from
cmd/server.go directly to stderr which bypassed our normal log format.
- Add the timezone to log output. This is just really nice to have if
you're looking at old logs.
- Change levels to all be 4 characters: DBUG, INFO, WARN, EROR. This
makes the logs easier to read because it lines up.
- Log when we first receive the request as well as when we send a
response. This makes it easier to see where the request starts and ends.
2018-12-19 13:40:13 -06:00
Luke Kysow
2b4f3f33bd Merge pull request #401 from runatlantis/comment-on-failure
Write error comment on early failures.
2018-12-19 13:30:11 -06:00
Luke Kysow
68ac049ad6 Write error comment on early failures.
Previously, we were just logging when an error happened early in our
comment processing code. However it's possible for us to write comments
on error even at this early stage which will make for a better user
experience.

Fixes #398
2018-12-19 13:26:27 -06:00
Ninir
1b1ae67bb4 Bump Terraform version to 0.11.11 2018-12-19 10:11:35 -08:00
Luke Kysow
84289ea004 Merge pull request #397 from jkodroff/remove-helm-chart
Remove helm chart.
2018-12-19 10:30:54 -06:00
Luke Kysow
a018bda4ab If dir has workspaces configured only allow those
If users have created an atlantis.yaml config for a specific directory,
only allow commands for workspaces that have been configured in that
directory. This will help prevent errors when users mis-type a workspace
name.
2018-12-18 07:25:33 -06:00
Josh Kodroff
546127a836 Remove helm chart.
There's now an official chart in the Helm repository: https://github.com/helm/charts/tree/master/stable/atlantis
2018-12-17 17:03:05 -05:00
Ivan
1d34ca8cde Added download link (#387)
There's no download link, added the one from getting-started.md
Authored-By: ivankisic <ivan.kisic@gmail.com>
2018-12-17 09:19:46 -06:00
Luke Kysow
0054198b1b Merge pull request #392 from runatlantis/better-gitlab-warnings
Don't parse gitlab comment events when on commit
2018-12-14 12:47:54 -06:00
Luke Kysow
52714485a9 Don't exit script before we can print test failure 2018-12-14 12:18:26 -06:00
Luke Kysow
985c30c097 Don't parse gitlab comment events when on commit
Detect if the GitLab event is a comment on a commit instead of a merge
request and log a debug message that we don't support this.

Previously, Atlantis would panic if it received this event.
2018-12-14 12:04:19 -06:00
Luke Kysow
858dbe4ed1 Merge pull request #388 from runatlantis/mergeable-pr
Introduce new `mergeable` requirement
2018-12-12 14:33:09 -06:00
Luke Kysow
b6d821326d Update docs about mergeability 2018-12-12 14:26:46 -06:00
Luke Kysow
40d427c898 Check GitLab required approvers for mergeability 2018-12-12 12:41:33 -06:00
Luke Kysow
3c1e1ab6e3 Update gitlab lib. Fix breakages. 2018-12-12 12:41:33 -06:00
Luke Kysow
e93384fdb0 Use mergeable_state to determine if mergeable
- Need to use the mergeable_state field in GitHub to know if a pull
request is mergeable.
- Add tests.
- Since we updated our vendored go-github library, fix how we were
creating webhooks in testdrive.
2018-12-12 11:17:09 -06:00
Luke Kysow
139f05ab49 Update go-github library 2018-12-12 09:55:17 -06:00
Brenden Matthews
e001353ae9 Add mergeable requirement.
Introduce new `mergeable` requirement, in similar vein to the `approved`
requirement. Ran `make go-generate` to update mocks accordingly.

This addresses issue #43.
2018-12-11 16:00:04 -05:00
Luke Kysow
27eb577215 Merge pull request #386 from runatlantis/mocks
Update pegomock, regen mocks.
2018-12-11 08:35:59 -06:00
Luke Kysow
d211036137 Regen mocks and remove unused 2018-12-11 08:31:59 -06:00
Luke Kysow
359e9e2a50 Update pegomock 2018-12-11 08:20:13 -06:00
Luke Kysow
10bbe0abe3 Merge pull request #378 from jocelynthode/fix_regression_gitlab
Fix URL parsing not working when passing only a domain to GitlabHostname
2018-12-10 08:39:51 -06:00
Jocelyn Thode
2adaf4b24c Fix URL parsing not working when passing only a domain to GitlabHostname
Fixes https://github.com/runatlantis/atlantis/issues/377
2018-12-08 20:27:57 +01:00
Luke Kysow
d8c75f8f84 Merge pull request #381 from runatlantis/plan-output
Return plan output on error.
2018-12-07 10:19:23 -06:00
Luke Kysow
5f89527049 Return plan output on error.
If terraform plan returns an error, we still want to print the output to
the pull request.
2018-12-07 10:15:42 -06:00
Luke Kysow
555312e244 Merge pull request #380 from runatlantis/helm-fix
Use correct service name and port for ingress.
2018-12-07 09:15:25 -06:00
Luke Kysow
ec3a1204fb Use correct service name and port for ingress.
Fixes #379
2018-12-07 08:15:07 -06:00
Luke Kysow
284fa2eefc Merge pull request #373 from runatlantis/project-name-comments
Add project name to comments
2018-12-04 12:05:41 -06:00
Luke Kysow
934b51b64f Add project name to comments.
If projects are configured using an atlantis.yaml with a specific
project name, include that in the output for comments. This is useful
because often the project names are better identifiers than the
directory and workspace names and also because some projects use the
same dir and workspace so the only way to differentiate them is via
their names.

Fixes #353
2018-12-04 12:01:05 -06:00
Luke Kysow
9adb7eb89a Merge pull request #372 from runatlantis/bitbucket-comment-length
Split Bitbucket Server comments if over max length
2018-12-04 10:07:55 -06:00
Luke Kysow
521b50987a Merge pull request #371 from runatlantis/bitbucket-cloud-api
Use Bitbucket 2.0 API for comments.
2018-12-04 10:07:03 -06:00
Luke Kysow
b13a85b4f1 Use Bitbucket 2.0 API for comments.
Bitbucket released the 2.0 version for the commenting on pull requests
API:
https://community.atlassian.com/t5/Bitbucket-questions/Re-Bitbucket-Cloud-REST-API-v2-0-Commenting-on-Pull-Re/qaq-p/849427/comment-id/30070#M30070.
Previously, this was only available in version 1.0. Since 1.0 will be
deprecated, it's best to move to the latest version.
2018-12-04 09:58:52 -06:00
Luke Kysow
bf19968cec Split Bitbucket Server comments if over max length
- Refactor the comment split method into a common package
2018-12-04 09:58:37 -06:00
Luke Kysow
387186e9d0 Merge pull request #368 from runatlantis/release-0.4.12
Release 0.4.12
v0.4.12
2018-11-30 10:15:50 -06:00
Luke Kysow
781ded10b4 Output logs on e2e failures.
Also disable the make test step because there are no unit tests in the
e2e directory (as expected).
2018-11-30 10:10:53 -06:00
Luke Kysow
620100e5eb Release 0.4.12 2018-11-30 10:10:53 -06:00
Luke Kysow
a2c7e7a055 Merge pull request #367 from runatlantis/output-bug
Fix pre plan output being removed.
2018-11-30 09:06:27 -06:00
Luke Kysow
70d194830a Fix pre plan output being removed.
Prior to this change, we were formatting the output from terraform plan
inside the markdown_renderer. Part of this formatting is to remove all
output relating to refreshing state. The way we were doing this was to
simply delete all lines before the refreshing completes.

The problem with this approach was that any output from custom steps
that ran before plan would also be deleted. This change moves the
formatting of the plan output inside the plan step. Then the
markdown_renderer deals with the pre-formatted output and doesn't need
to delete anything before it combines all the step outputs into one.
2018-11-30 08:54:20 -06:00
Luke Kysow
01aca29734 Merge pull request #366 from runatlantis/gitlab-version
Disable markdown folding on gitlab < 11.1
2018-11-30 08:19:08 -06:00
Luke Kysow
ba04564e2a Disable markdown folding on gitlab < 11.1.
On startup, make a call to the /version endpoint of Gitlab to get which
version we're running. Then use that version to determine whether we
should use the markdown folding syntax where the code is expandable.
Versions of Gitlab < 11.1 don't support the "Common Mark" markdown
format.

Fixes https://github.com/runatlantis/atlantis/issues/315
2018-11-29 17:09:12 -06:00