Commit Graph

403 Commits

Author SHA1 Message Date
David McPike
03bfefe9f4 continue azure devops support 2019-04-03 23:52:48 -05:00
David McPike
1946dc0477 merge from head 2019-04-03 23:48:04 -05:00
David McPike
cfcf59d8e0 continue adding skeleton for azure devops support 2019-04-03 21:30:14 -05:00
David McPike
ce380ec27b initial azuredevops client - copy from bitbucketcloud 2019-04-02 22:00:13 -05: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
David McPike
fe258966f7 initial changes for azure devops support 2019-04-01 20:49:09 -05: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
Luke Kysow
ca58ebd7e0 Autodownload tf versions. Add --default-tf-version.
This changeset has two features:
1. We now automatically download the version of terraform specified in
atlantis.yaml configs if we don't already have that version available
locally.

2. Add a new --default-tf-version flag that allows users to set a
default version of Terraform that we will also download if it's not on
disk.

These mean that users don't need to build custom Docker images to just
add terraform versions. It also means that upgrading the version of
terraform that is packaged with the Atlantis Docker image won't cause
issues for existing users because as long as they're running with
--default-tf-version, Atlantis will always use that version.
2019-03-14 13:51:27 -05:00
Luke Kysow
08e272854c Upgrade pegomock 2019-03-13 17:52:27 -05:00
Luke Kysow
80f6b99397 Unskip working test 2019-03-13 17:52:27 -05:00
Luke Kysow
2fb49130c5 Respond to bitbucket cloud/server username.
Looks like we forgot to add the ability for bitbucket cloud/server users
to invoke Atlantis using the name of the user they're running it as.
2019-03-13 16:13:52 -05:00
Luke Kysow
2bcf17b474 Fixes #533, a regression where Atlantis will respond with errors to
comments that aren't intended to invoke Atlantis.
2019-03-13 16:13:52 -05:00
Luke Kysow
d0e0b0dfca Log rev-parse error at warn level.
We recover gracefully from this so it's not an error.
2019-03-07 09:57:29 -05:00
Luke Kysow
36925b4dc8 Ignore .terragrunt-cache dirs.
Fixes #487
2019-03-06 11:20:44 -05:00
Luke Kysow
4c887f18cf Merge pull request #514 from runatlantis/split-status-checks
Split status checks
2019-03-06 10:15:56 -05:00
Luke Kysow
30577a4c4d Support dirs with spaces.
Allow running atlantis plan -d "dir with spaces" to target a directory
that contains spaces.

Fixes #423
2019-03-05 16:16:16 -05:00
Luke Kysow
936a5f4a16 Remove mention of TERRAFORM_WORKSPACE env var 2019-03-05 15:57:43 -05:00
Luke Kysow
4fc22aedeb Split status checks into plan and apply.
Split single top-level status check into one plan and one apply check.
These checks will also now track the whole pull request status rather
than just the last action.
2019-03-05 14:29:43 -05:00
Luke Kysow
65c8f1317a Give warning for common error missing 'run' key 2019-03-05 13:32:08 -05:00
Luke Kysow
f98fe8ef80 Add new status to ProjectPlanStatus 2019-03-05 12:08:11 -05:00
Luke Kysow
393af51e4f Add Command field to ProjectResult 2019-03-05 12:01:06 -05:00
Luke Kysow
a13bce59ad updateDB should not return a pointer 2019-03-05 11:54:04 -05:00
Luke Kysow
c97c922f91 Merge pull request #510 from runatlantis/bb-server-delete-event
Support bitbucket server pr:deleted event
2019-03-01 11:49:13 -05:00
Luke Kysow
2fb8f4d4ff Support bitbucket server pr:deleted event
If a pull request is deleted, Atlantis should delete the locks.
Fixes #498
2019-03-01 11:36:22 -05:00
Luke Kysow
308a87316e Merge pull request #502 from runatlantis/bb-cloud-api-deprecation
Use new 'nickname' field for bitbucket cloud
2019-03-01 10:21:02 -05:00
Luke Kysow
e9bee6e95b Merge pull request #509 from runatlantis/bb-server-basepath
Support basepath for bitbucket server
2019-03-01 09:17:13 -05:00
Luke Kysow
0a8e3e86c9 Support basepath for bitbucket server
Previously we were stripping the basepath from the passed in URL. i.e.
if I passed in --bitbucket-base-url=https://me.com/basepath then we
would just strip off /basepath.

This change fixes that bug (#508).
2019-03-01 09:14:52 -05:00
Luke Kysow
899c77f19c Fix async tests. 2019-02-28 16:52:26 -05:00
Luke Kysow
ca5ca0b218 Skip all async tests (for now). 2019-02-28 15:32:31 -05:00
Luke Kysow
6721eea4f1 Skip broken tests for now. 2019-02-28 15:23:08 -05:00
Luke Kysow
9e497f495e Merge pull request #503 from runatlantis/tfe-apply-check
Add better support for remote plan/apply
2019-02-28 13:05:28 -05:00
Luke Kysow
8cef308709 Add test for large outputs. 2019-02-28 12:26:46 -05:00
Luke Kysow
7f5a0fcd10 Fix test race conditions. 2019-02-28 11:49:48 -05:00
Luke Kysow
b10cf1faa7 Test remote plan/apply. 2019-02-28 11:00:56 -05:00
Luke Kysow
09b92cd207 Use new 'nickname' field for bitbucket cloud
Bitbucket is deprecating the username field.
See: https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr
2019-02-28 10:06:31 -05:00
Luke Kysow
db1203bf0f Add better support for remote plan/apply.
Features:
- remote plans and applies will set a commit status with a link to the
Terraform Enterpise UI where the streaming output can be viewed.
- because remote plans don't support the -out flag, we diff the plan
output between plan and apply phases to ensure users are applying the
plan they expected

How:
We add a new capability to execute a terraform command while
concurrently reading its real-time output and performing actions
accordingly.
2019-02-27 17:26:00 -05:00
Luke Kysow
5f4a94b0af Move CommandName to models package 2019-02-26 12:03:25 -05:00
Andrew Urwin
20060e1de1 update test to include -upgrade 2019-02-26 16:03:59 +00:00
Andrew Urwin
aec79b95e1 adding -upgrade to init cmd 2019-02-26 15:53:54 +00:00
Luke Kysow
b749a32c5f Allow setting 'source' for commit statuses
This is needed so we can set different commit statuses for plan and
apply phases.

Also, append os env variables to git commands during cloning. This fixed
a bug when running tests where I got an error because git couldn't expand
'~' from its git config to my home directory because the HOME env var
wasn't set.
2019-02-25 17:10:20 -05:00
Luke Kysow
1997e112d3 Remove duplicate vcs proxy interface
This is the same interface as vcs.Client so no need to have both.
2019-02-25 16:51:26 -05:00