Commit Graph

24 Commits

Author SHA1 Message Date
Chris Alexander
aa1bfc0a27 Add "plan" to continued statement 2020-07-01 10:11:33 -05:00
Luke Kysow
d3a6d18710 Merge remote-tracking branch 'origin/master' into deleted-status 2020-06-23 22:22:10 -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
parmouraly
036e1f699e Fix typo on boltDB reference 2020-06-04 16:21:16 +01:00
Paris Morali
ade9b31593 Add BoltDB interface and some relevant tests
With BoltDB interface we are able to mock/stub and
improve test coverage.
Some other refactoring was required to make code aware
and compatible with the new interface
2020-05-11 15:13:36 +01:00
Paris Morali
ce1d577f1d Integrate PR feedback and tests adapted 2020-05-09 11:42:48 +01:00
Paris Morali
c5eda2742b Refactoring model to allow NotPlanned status
As part of the fix the model is slightly extended
to allow for an extra PlanStatus indicating the absence
of a plan for a project. This allows us to unlock a project
and delete the plan, without having to completely remove the
project status.
That means that atlantis knows there is a project that should
normally have a plan and be accounted for, but the plan has been
deleted/unlocked.
The reason this is important is so that we can't "trick" atlantis
into thinking that the PR can be merged just because we've lost
track of a projectstatus as a result of a manual unlock.
2020-04-26 13:55:42 +01:00
Luke Kysow
07ffe179e7 Small refactoring to azure devops support 2019-10-25 18:07:18 -07:00
David McPike
acef89adc4 Azure Devops PR minor cleanup, fix tests, checks
- Re-write tests for azuredevops_client
- CircleCI checks should pass
- NewAzureDevopsClient() now takes a hostname like NewGithubClient()
- Docs include comment about default merge strategy requirements
2019-07-28 10:37:45 -05:00
David McPike
12f95c5b79 Azure Devops support
- Add blackfriday for markdown-to-html comment translation
Azure Devops doesn't support markdown in work item comments

- Restore NewRepo() to original form - removing project parameter
- Add models.SplitAzureDevopsRepoFullName() to handle project name
All Azure Devops URIs need owner, project, and repo.  This function
allows us to avoid adding project to NewRepo()

- Update calls to azuredevops.NewClient() to match library requirements
- Add context to azuredevops client to match library requirements
- Basic working CreateComment() and MergePull() support (not widely
tested)
2019-05-19 20:54:04 -05:00
Luke Kysow
d78b106cab Refactor @jjulien's server-side config work. 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
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
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
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
5fb3ac115e Support GitLab subgroups.
GitLab allows repos to be nested under multiple subgroups,
for example owner/group/subgroup/subsubgroup/repo vs. owner/repo. This
change enables that functionality.
2018-08-23 10:24:54 -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
da236e953b Test Bitbucket Server 2018-07-24 20:34:01 +02: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
3339dcd92b Dir/Path -> RepoRelDir, path (in templates) -> dir 2018-06-29 18:05:47 +02:00
Luke Kysow
143fb82bd2 Use new mux.SetURLVars function for testing. 2018-05-30 18:48:12 +02:00
Luke Kysow
a57d4c6618 Comment on pull request when lock discarded.
When the lock is discarded from the Atlantis UI, comment back on pull
request so users know the lock was discarded.

- Adds the BaseRepo field to the PullRequest model.
- This change is backwards compatible with previous installations where
the DB will have a Project model with a PullRequest without the BaseRepo
field.
2018-05-30 16:38:40 +02:00
mo-hit
9df3609e6e WIP Implement commenting on pull when lock deleted. 2018-05-30 16:28:58 +02:00