Commit Graph

478 Commits

Author SHA1 Message Date
David McPike
bb88c95dff Improves Azure Devops webhook error handling 2019-09-22 16:09:04 -05:00
David McPike
e04005a682 Fix duplicate go-gitlab references 2019-08-30 13:09:50 -05:00
David McPike
c346cce484 Merge remote-tracking branch 'upstream/master' into azure-devops 2019-08-30 12:48:47 -05:00
David McPike
a31afcb7a4 Merge tag 'v0.9.0' into azure-devops 2019-08-29 17:52:36 -05: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
David McPike
b13bb2feac Resolve Azure Devops PR comments
- Remove AzureDevopsWorkItemID from CommandContext struct
- Add new dependencies to dep vendoring
- Change final CreateComment return to nil error value
- Clean up unused code/comments
2019-07-29 18:51:53 -05:00
David McPike
83d0b04532 Remove Project member from models Repo struct 2019-07-28 10:45:48 -05: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
40cd535881 Add Azure Devops pull request example for tests 2019-07-27 22:09:40 -05:00
David McPike
ff611af29f Minor style updates 2019-07-26 14:56:03 -05:00
David McPike
e8cfe5af28 Fix Azure Devops Pull Events
- Event type assertion should be pointer
- Remove merge attempted webhook event type
- Move closed pull request to updated event type
2019-07-26 14:22:14 -05:00
David McPike
c9c8f01c67 Fix panic from nil error 2019-07-26 10:29:20 -05:00
David McPike
424a6b005c Commit Azure Devops mocks 2019-07-16 22:07:40 -05:00
David McPike
29b74d25f1 Update Azure Devops Event Parser
- Always set explicit return values
- Add baseURL func parameter to facilitate testing
2019-07-16 21:57:41 -05:00
David McPike
f8d9e30a8e Update Azure Devops tests and get them to pass 2019-07-16 21:55:56 -05: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
David McPike
eeaab9f6d7 Merge tag 'v0.8.3' into azure-devops 2019-07-12 23:27:43 -05: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
David McPike
475381b928 Merge tag 'v0.8.2' into azure-devops 2019-07-11 15:57:04 -05: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
David McPike
cb9bdb017d Resolve merge conflict on DisableApplyAll flag 2019-05-24 21:26:59 -05: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
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
David McPike
dd9041f131 Merge remote-tracking branch 'upstream/master' into azure-devops 2019-05-17 09:31:44 -05:00
David McPike
7f1fd23f0f Azure Devops fork updates
- Remove project from NewRepo() calls
- Add new function SplitAzureDevopsRepoFullName
2019-05-17 09:31:01 -05: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
David McPike
bf1ccc47db Azure Devops support
- Fixes logic error in PullIsMergeable()
- Replace GetRemoteURL() with GetWebURL() - returns what we want
2019-04-29 20:19:02 -05:00
David McPike
36a849d2b5 Fixes steps that use cloneURL for Azure Devops 2019-04-29 09:55:37 -05:00
David McPike
cbb28ec1f1 Azure Devops support
- Add bluemonday to strip HTML tags from comments
- Rename all WorkItemEvent refs to WorkItemCommentedEvent
- Rename pullEvent to event to match types
- Minor comment clean-ups
- Support multiple pull request links in a work item
2019-04-29 00:06:48 -05:00