Commit Graph

437 Commits

Author SHA1 Message Date
Nuru
4e8d1e64ac Use bigger logo on the web pages 2019-09-20 03:24:01 -07:00
Dave D'Amico
83b2adb593 Issue 720: display workspace name in locks UI list (#763)
* final updates for PR

* more updates

* final changes - ready for re-review

* changes based on feedabck

* forgot to update test
2019-09-16 13:07:10 -04:00
Dave D'Amico
b025a9037a Fix for Issue 727 (#762)
* initial commit for testing

* testing update

* go fmt
2019-09-03 13:00:17 -04:00
Luke Kysow
b81fe9a5e5 Switch to gomod 2019-08-26 18:38:22 +02:00
Luke Kysow
3919f05548 Update to latest version of go-gitlab 2019-08-26 18:23:52 +02:00
Jesse Bye
295fa93943 Support terragrunt.hcl for autoplanning 2019-08-26 15:06:04 +02:00
Luke Kysow
c646f20c34 Actually pass env vars between steps
Also some refactoring and testing.
2019-08-21 15:12:35 +02:00
Andrii Nasinnyk
33c0a72add Add var step to workflows
Add new var step for setting environment variable in workflows.
2019-08-21 15:06:49 +02:00
Luke Kysow
3ebebe590f Merge pull request #711 from ImperialXT/master
Create .git-credentials to allow secure auth when cloning private repos
2019-08-06 12:18:58 +01:00
Andrew Jeffree
e140823408 Add flag for configuring git-credentials-store
--write-git-creds will create a .git-credentials file and configure
git to use it. To allow authentication with your git remotes over https.
To access private repos.
2019-08-02 10:12:30 +10:00
Maxime Deravet
d6f2579cf9 Ensure terraform_version is downloaded when using non built-in step. Fixes #675 2019-08-01 14:32:32 -07:00
Maxime Deravet
8180f35a1a Append terraform binary dir to PATH when running custom commands (#678)
Append Atlantis terraform binary dir to PATH when running custom commands
2019-07-16 15:00:10 +01:00
Luke Kysow
ee8707d239 Add flag for setting Terraform Enterprise hostname (#706)
--tfe-hostname will allow for creating a .terraformrc file with a
different hostname than app.terraform.io
2019-07-12 15:19:43 +01:00
Luke Kysow
b7d4e998f6 Detect remote ops for TF >= 0.12.0 (#705)
The error message we use to detect remote ops changed between 0.11.14
and 0.12.0. Recognize this new error message.
2019-07-12 11:14:52 +01:00
Luke Kysow
9a21eef7a0 Escape additional comment args. (#699)
Remove extra quoting and instead add a backslach to each character in
the extra args before appending it to the command.
ex. atlantis plan -- -var key=val will result in:
  sh -c "atlantis plan \-\v\a\r \k\e\y\=\v\a\l"
Fixes #697.
2019-07-11 17:42:32 +01:00
Alex Rowley
dd02deaf76 Add CommentArgs to run step runner (#693)
Add CommentArgs to run step runner

This should allow the extra args passed in the comment to be used by
run steps

Fixes #670
2019-07-11 14:21:36 +01:00
Luke Kysow
915e15f30e Upgrade pegomock to 2.5 2019-06-14 14:39:26 +01:00
Luke Kysow
a2349b64d7 Fix bug parsing BB Cloud pull rejected events
Was using the word DECLINE but the actual keyword is DECLINED.
2019-06-13 14:47:29 +01:00
Luke Kysow
91eecbcb68 Add comment for bitbucket merge conflict detection 2019-06-12 12:28:52 +01:00
Luke Kysow
8bcb3726d4 Switch to Bitbucket 2.0 API for mergeable check 2019-06-12 12:21:47 +01:00
Luke Kysow
4944ee1687 Add comment explaining . => / replace 2019-06-05 11:30:24 +01:00
Tollef Fog Heen
8a3e342344 Include directory in slack webhook message
Fixes: https://github.com/runatlantis/atlantis/issues/660
2019-06-05 11:37:37 +02:00
Luke Kysow
8f81568e24 Fix require-approval for Bitbucket Cloud.
Bitbucket Cloud changed their APIs to deprecate the username fields.
This broke how we were checking for approvals. Rather than propagate the
UUID field through the PullRequest model, I use the pull request API
response directly while checking approvers.
2019-06-03 14:57:52 +01:00
Luke Kysow
98274cd9bb Log repo name if does not match whitelist
Should help with folks debugging, especially for BB Server.
2019-05-24 09:14:40 -04:00
Luke Kysow
7595265a6b Finishing touches to disable-apply-all
- fix missing part of a test
- log when ignoring
2019-05-23 12:09:51 -04:00
Will Soula
b77a09dc97 Add --disable-apply-all flag
Add a flag to disable the use of the command `atlantis apply` so you
can enforce that each plan must be applied separately.
2019-05-23 12:09:51 -04:00
Luke Kysow
4dbdde8543 Upgrade to Terraform 0.12
To be clear, Atlantis was compatible with 0.12 before this commit, but
this change makes 0.12 the default version *if* users haven't set the
--default-tf-version flag.
2019-05-23 11:42:58 -04:00
Luke Kysow
3160a824d8 Merge pull request #619 from runatlantis/double-error
Don't include errored cmd output twice.
2019-05-07 09:26:03 -04:00
Luke Kysow
e45bc33330 Don't include errored cmd output twice.
Since we're including the command output inside the error, we don't need
to also return the output. This was resulting in the error output being
printed twice.
2019-05-07 09:22:25 -04:00
Luke Kysow
d0308a52e7 Redact clone url during clone errors.
If there was an error during cloning, we would sometimes print the clone
credentials to the pull request and in the Atlantis logs. This change
ensures we print the redacted clone url.

We also change the redacted clone url to contain "username:<redacted>"
so that if users see the redacted url in logs, they'll know we were
using a credentialed form and so if they try to replicate with curl
they'll know to substitute the correct credentials.
2019-05-07 09:14:59 -04:00
Luke Kysow
568c7f9fd9 Add newline so bitbucket formats markdown 2019-04-24 09:50:28 -03:00
Luke Kysow
8e7eab78bd Add missing closing backticks for help output 2019-04-23 13:29:39 -03:00
Luke Kysow
559736c897 Merge pull request #585 from runatlantis/ff-merges
Never use fast-forward merges
2019-04-10 15:16:25 -03:00
Luke Kysow
93cd6a5431 Never use fast-forward merges
When using --checkout-strategy merge, we were performing the merge
without the --no-ff flag. This meant that if the branch could be merged
via a fast-forward merge (without a merge commit), then later when we
ran git rev-parse HEAD^2 to determine if the repo was at the right
commit, it would fail.

Now we merge with --no-ff which ensures the commit tree will always look
the same and git rev-parse HEAD^2 will always succeed.
2019-04-10 15:12:32 -03:00
Luke Kysow
ac41fe9b19 Merge pull request #564 from devinturner/master
Comment on why EROR and DBUG are not typos
2019-04-09 09:52:33 -03:00
Luke Kysow
cf490f86f0 Refactor run_step_runner test cases 2019-04-08 11:19:25 -03:00
Niko Virtala
83c81db7de tests with or without project name declaration. 2019-04-07 13:33:58 +03:00
Niko Virtala
6ee1cf6ce4 expose project name environment variable. 2019-04-06 21:18:16 +03:00
Devin Nathan-Turner
9c13979b8b Added comment explaining why EROR and DBUG are not typos 2019-04-02 19:25:59 -04:00
Luke Kysow
374e7a6a30 Merge in default cfg in other location 2019-04-02 18:06:35 -03:00
Luke Kysow
cfbda1e44f Better config logging 2019-04-02 18:06:11 -03:00
Luke Kysow
609bf84b9a Fix apply all with project name bug
Previously, if you were using project names and you had two projects
with the same directory and workspace but different workflows, running
"atlantis apply" would fail. This was because we weren't figuring out
what the project name was for each pending plan.

This change fixes this by extracting the project name from the planfile.
We also handle /'s in the project name by substituting them with '::'.
This allows us to convert them back to /'s when we're figuring out the
project names from the filenames. It's safe to do this because : isn't
an allowed character for project names.

We also remove a final substitution of invalid filename characters
because we rely on the validation of the project names instead which
happens when validating the atlantis.yaml file.
2019-04-02 15:44:01 -03:00
Luke Kysow
8982a67b78 Run latest goimports 2019-03-30 20:22:49 -05:00
Luke Kysow
846feaed6d Add server-side cfg integration tests 2019-03-28 15:55:34 -05:00
Luke Kysow
25fed35728 New version 3 of atlantis.yaml
This version changes how we parse custom run steps.
Previously we used the go-shlex library to parse the steps but this
caused users issues because they'd have to use weird escaping.

Now we simply pass the step directy to sh -c without any parsing. The
parsing was unnecessary.
2019-03-28 13:45:12 -05:00
Luke Kysow
b12d487cb2 Add new --repo-config-json flag
This flag will allow users to specify repo config as json instead of
writing a file to disk. This is useful in deployments where disk access
is more difficult, ex. Docker.
2019-03-27 19:52:58 -05:00
Luke Kysow
e163b47ebd Change Atlantis tagline.
Atlantis has been focused on TF pull request automation for the last
year so I want to rename its tagline to be more focused.
2019-03-27 14:59:37 -05:00
Luke Kysow
d78b106cab Refactor @jjulien's server-side config work. 2019-03-27 14:47:48 -05:00
John Julien
1fcdaba719 Added new --repo-config option and deprecated --allow-repo-config
This enables atlantis.yaml in all repos, but by default restricts
certain sensitive keys from being used.

The keys apply_requirements, workflow, and workflows can only be
specified in an atlantis.yaml file if explicitly allowed by a
server side repo config.

The repo config file provides the ability to specify a default set of
workflows, and default values for apply_requirements and workflow to use
use on a per repo basis.  It also supports applying to a collection of
repos by using regex to match a repo name.

If more than one repo name matches, the values from last repo matched
are used.

This deprecates the --allow-repo-config option
2019-03-27 14:47:48 -05:00
kenske
c9e39093ef Renamed status checks from <action>/atlantis to atlantis/<action> 2019-03-20 20:22:38 -05:00