Commit Graph

2135 Commits

Author SHA1 Message Date
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
Luke Kysow
1263ccb463 Move gitlab client setup into constructor. 2018-11-29 15:19:21 -06:00
Luke Kysow
09ecb27135 Merge pull request #363 from runatlantis/base
Use latest atlantis-base.
2018-11-29 08:38:57 -06:00
Luke Kysow
0ef5410fca Merge pull request #364 from runatlantis/openshift
Deployment docs for OpenShift.
2018-11-29 08:38:39 -06:00
Luke Kysow
e9ea788d21 Deployment docs for OpenShift.
After merging https://github.com/runatlantis/atlantis/pull/346, we now
support OpenShift however users need an additional flag to atlantis
server for it to work.
2018-11-28 15:43:21 -06:00
Luke Kysow
3cc465bafc Use latest atlantis-base.
- Upon merging https://github.com/runatlantis/atlantis/pull/346 I
manually built and pushed a new version of runatlantis/atlantis-base and
tagged it as runatlantis/atlantis-base:v2.0. This change uses that new
tag. Before it was using :latest which isn't good if other people see
that and use atlantis-base:latest because we could break it for them.
- I've also put back the fsContext to 1000 because the atlantis user is
still in that group so we need that for kubernetes.
2018-11-28 15:30:24 -06:00
Luke Kysow
8f4bf27616 Merge pull request #346 from jocelynthode/allow_arbitrary_user
Allow arbitrary user to run atlantis
2018-11-28 15:28:28 -06:00
Thode Jocelyn
176bbd852d Allow arbitrary user to run atlantis 2018-11-26 17:49:10 +01:00
Luke Kysow
67f7054cc1 Merge pull request #362 from runatlantis/helm-update
Update local helm chart until official one lands.
2018-11-23 08:33:05 -06:00
Luke Kysow
e0708c68e0 Merge pull request #360 from runatlantis/gh-comment-split
If GitHub comments are over max size, split into multiple comments.
2018-11-23 08:28:34 -06:00
Luke Kysow
bfd1754d7d Update local helm chart until official one lands.
Use helm chart from https://github.com/helm/charts/pull/8177
2018-11-23 08:23:45 -06:00
Luke Kysow
63557b4cb5 Change exact open/closing of split messages. Test. 2018-11-22 18:41:18 -06:00
Tobias Bielohlawek
e32a57b6f3 Fix broken format for continued comments on GitHub
Adds close and (re)open <details> tag in between the split portions to 
ensure the markup is correct across multiple comments. This isn't the prettiest, but a close result, under the assumption continued-comments are in 99% within a terraform output anyway...
2018-11-22 15:07:56 -06:00
Luke Kysow
762c466391 Merge pull request #359 from runatlantis/resolve-hostnames
Log warning if unable to resolve GitLab hostname.
2018-11-22 14:48:42 -06:00
Luke Kysow
af5c44c1df Log warning if unable to resolve GitLab hostname.
The GitLab client doesn't do a good job logging errors if the hostname
isn't resolvable so we log an error early to help users.
2018-11-22 13:57:00 -06:00
Luke Kysow
f1cced0e7f Merge pull request #357 from runatlantis/basepath
Allow running Atlantis behind a path-based proxy
2018-11-21 12:48:21 -06:00
Luke Kysow
fa4aad4a74 Refine basepath changes.
- Refactoring work from https://github.com/runatlantis/atlantis/pull/314
- Use just the path in templates, not the fully qualified URL since that
is a best practice.
- Add logging to errors when rendering templates.
- Silence help output on cli errors since the help output is now so
large that you have to scroll up to see the errors.
2018-11-21 11:33:31 -06:00
Luke Kysow
c6dcd658c5 Merge pull request #354 from runatlantis/bitbucket-nextpagestart
Use int instead of string for bitbucket response.
2018-11-16 19:14:43 -05:00
Luke Kysow
deebb22b5d Use int instead of string for bitbucket response. 2018-11-16 13:38:29 -05:00
Luke Kysow
b63f5699de Merge pull request #347 from jocelynthode/add_dockerignore
Add a dockerignore to speedup docker build
2018-11-09 11:15:26 -05:00
Thode Jocelyn
d630bd7c23 Add a dockerignore to speedup docker build 2018-11-09 16:22:34 +01:00
Jonathan Lange
670131fa63 Prefix URLs in templates with AtlantisURL
Resolves #213

Allows users to run Atlantis behind a shared reverse proxy, which is a fairly
common use case.
2018-11-06 11:03:58 +00:00
Luke Kysow
d52b3fd870 Merge pull request #343 from runatlantis/helm
Fix helm chart.
2018-11-01 11:17:20 -05:00
Luke Kysow
374b26f44e Fix non-deterministic tests. 2018-11-01 11:13:34 -05:00
Luke Kysow
ba8e54daca Fix helm chart.
- Set fsGroup for correct file permissions
- Set memory default to 256 since Atlantis doesn't need more unless you
have large TF
- Use latest version of Atlantis
2018-11-01 11:01:36 -05:00
Luke Kysow
2fbfeab63c Merge pull request #340 from runatlantis/release-0.4.11
Release 0.4.11
v0.4.11
2018-10-30 16:58:03 -05:00
Luke Kysow
896f46fbd2 Release 0.4.11 2018-10-30 16:55:14 -05:00
Luke Kysow
3b914926bc Merge pull request #339 from runatlantis/remove-refreshing
Remove "Refreshing..." output from top of plan.
2018-10-30 16:34:08 -05:00
Luke Kysow
16cdcf1165 Remove "Refreshing..." output from top of plan.
When running terraform plan, Terraform writes a line for each resource
it updates. For example:

	null_resource.b: Refreshing state... (ID: 700288721293508840)
	null_resource.a: Refreshing state... (ID: 2853194762920164292)
	null_resource.f: Refreshing state... (ID: 6634469389761751950)

This change removes those lines by splitting the output string after a
separator.

This change is being made because the Refreshing output isn't important
and it will make the comments shorter.
2018-10-30 16:27:55 -05:00
Luke Kysow
6af4d792c4 Merge pull request #338 from runatlantis/projectname
Allow slashes in project names
2018-10-30 13:10:43 -05:00