When running terraform plan, Terraform writes a line for each resource
it updates. For example:
null_resource.b: Refreshing state... (ID: 700288721293508840)
null_resource.a: Refreshing state... (ID: 2853194762920164292)
null_resource.f: Refreshing state... (ID: 6634469389761751950)
This change removes those lines by splitting the output string after a
separator.
This change is being made because the Refreshing output isn't important
and it will make the comments shorter.
We should only allow project names (which are specified in an
atlantis.yaml file) that don't need to be url escaped. The one
exceptional character is '/' which we allow because users like to name
their projects to match the directory they're in. We use the same rule
that Terraform uses for workspace names.
I've also changed the characters that are replaced when writing out the
plan filename to only remove invalid filename characters instead of just
allowing alphanumeric. This is the smallest amount of change required to
ensure the filename is valid.
- some of the tests run git so if you're using gpg signing you need
to disable that.
- refactor test helpers to use tb.Helper() and make the error output red.
This is useful because if another helper uses one of these helpers,
when it calls .Helper() its output will also be up the stack.
Previously we added -var atlantis_repo=runatlantis/atlantis but the '/'
character is not a valid character for the AWS assume role session name.
To fix this, this commit adds -var atlantis_repo_owner=runatlantis and
-var atlantis_repo_name=atlantis (where runatlantis and atlantis would
be the values for the repo the pull request is from ).
Fixes#290. In Bitbucket Server, the repo owner name can have spaces.
This causes errors when running terraform plan -out path with spaces so
we need to quote it: terraform plan -out "path with spaces".
Add new variables to execute TF with:
-var atlantis_repo=owner/repo
-var atlantis_pull_num=10
These can be used within TF to set the session_name of the AWS session
that Terraform creates. This allows all API calls to be traced back to a
specific pull request and user.
* If output is longer than 12 lines, wrap it in markdown folding for
GitLab and GitHub.
* Reformat the Terraform plan output so that the + and - lines show up
highlighted properly when using the diff syntax highlighting
Server startup should be something expected therefore an info rather than a warning.
```
2018/08/28 18:37:50 [WARN] server: Atlantis started - listening on port 4141
```
Signed-off-by: Ben Abrams <me@benabrams.it>
GitLab allows repos to be nested under multiple subgroups,
for example owner/group/subgroup/subsubgroup/repo vs. owner/repo. This
change enables that functionality.
Accept comments like
```
atlantis plan
```
So that when a comment is copy-pasted in GitHub and GitHub adds two
newlines, Atlantis still parses that comment.