Commit Graph

39 Commits

Author SHA1 Message Date
Luke Kysow
7363cce699 Update config-inspect version 2020-08-27 12:26:20 -07:00
Luke Kysow
cbe0b18c0e Refactor --skip-clone-no-changes work. 2020-08-18 15:48:33 -07:00
Quan Hoang
54e3dc2ef0 Skip cloning PR repository in case of no projects configured in repo config file were changed 2020-08-18 15:48:05 -07:00
Paris Morali
aed8d22b52 Implement atlantis unlock
This command is run on a pr and deletes all locks for the pr
2020-06-23 20:42:03 -07:00
Paris Morali
ab7016063a Atlantis lock discard via VCS comment
This successfully deletes the atlantis lock and
allows a competing PR to plan, but doesn not delete
the actual plans, so a user can still apply after
the lock is discarded.
This will be investigated in a follow up commit

Also fixed the basic mark down rendering for the discard command
2020-06-08 15:56:58 +01:00
Marc Barlo
bebfdcaeef Add back the parallel_plan repo cfg option
+ Default parallel plans breaks in a lot of autoplan scenarios i.e. with shared workspaces
+ Added a set of e2e tests to check parallel plans and applies
+ Also added an option to the Terraform client to turn off the plugin cache. This was breaking the e2e test suite (never seen this error in practice)
2020-05-07 22:14:04 -07:00
Marc Barlo
7452d6aa13 Make parallel plans the default. Add flag for parallel apply 2020-05-05 18:15:10 -07:00
Marc Barlo
643fbd409c Use default not repoCfg 2020-02-07 14:36:43 -08:00
Marc Barlo
f2609fd70b Add parallel plans via repo config 2020-02-07 14:21:53 -08:00
Marco Rinalducci
a824ad4d23 Detects if master branch has diverged and warn to pull new commits in comment 2019-11-27 10:52:39 -08:00
Luke Kysow
67fd5ef992 Logging cleanup for version detection 2019-10-28 15:07:25 -07:00
Kenneth Tan Xin You
4db1ed87f1 Added terraform-config-inspect. 2019-10-15 23:17:10 +08: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
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
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
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
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
Luke Kysow
4e429581b0 Refactor changes to get mergeability early 2019-02-11 14:46:18 -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
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
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
Luke Kysow
e9b7001266 Add godocs. Refactor ProjectResult. Golint errors. 2018-08-30 16:47:17 -06:00
Luke Kysow
c72cd95202 Print commands to run in comments. 2018-08-10 09:26:53 -10:00
Luke Kysow
3b02a1fc31 Test plan/apply all. 2018-08-09 14:23:44 -10:00
Luke Kysow
12a9a19fde First pass at naked plan/apply working on all. 2018-08-08 17:08:08 -10:00
Luke Kysow
5ee990cec1 Don't default dir and workspace.
Lay groundwork for atlantis plan/apply to work on everything.
2018-08-08 17:08:08 -10:00
Luke Kysow
b2bd90da61 Various fixes
- delete working dir when lock deleted
- check if dir still exists when looking at modified
- check if atlantis.yaml is allowed before parsing
2018-07-03 13:32:17 +02:00
Luke Kysow
85a775b94b Fix todos. Remove TF_WORKSPACE. 2018-07-02 14:39:39 +02:00
Luke Kysow
f067818aa5 Test project command runner. 2018-07-01 23:48:32 +02:00
Luke Kysow
13a70c772d Add new --allow-repo-config flag. 2018-06-30 23:27:15 +02:00
Luke Kysow
3339dcd92b Dir/Path -> RepoRelDir, path (in templates) -> dir 2018-06-29 18:05:47 +02:00
Luke Kysow
507ce4358a Rename Spec -> Config 2018-06-29 17:33:02 +02:00
Luke Kysow
6f8401d57b Test BuildAutoplanCommands 2018-06-29 17:21:53 +02:00
Luke Kysow
12f071b237 Rename atlantisworkspace to workingdir. 2018-06-27 20:43:43 +02:00
Luke Kysow
542a1093fa Fix locking 2018-06-26 14:31:06 +02:00
Luke Kysow
a564c7e075 Docs 2018-06-25 08:18:59 +01:00
Luke Kysow
d3ec832eff WIP 2018-06-21 18:18:54 +01:00