You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you get an error like `command not found: atlantis`, ensure that `$GOPATH/bin` is in your `$PATH`.
@@ -36,62 +51,66 @@ open your browser to http://localhost:8080.
36
51
Docker compose is set up to start an atlantis container and ngrok container in the same network in order to expose the atlantis instance to the internet. In order to do this, create a file in the repository called `atlantis.env` and add the required env vars for the atlantis server configuration.
37
52
38
53
e.g.
39
-
```
54
+
55
+
```sh
56
+
NGROK_AUTH=1234567890
57
+
40
58
ATLANTIS_GH_APP_ID=123
41
59
ATLANTIS_GH_APP_KEY_FILE="/.ssh/somekey.pem"
42
60
ATLANTIS_GH_WEBHOOK_SECRET=12345
43
61
```
44
62
45
-
Note: `~/.ssh` is mounted to allow for referencing any local ssh keys
63
+
Note: `~/.ssh` is mounted to allow for referencing any local ssh keys.
46
64
47
65
Following this just run:
48
66
49
-
```
67
+
```sh
50
68
make build-service
51
-
docker-compose up
69
+
docker-compose up --detach
70
+
docker-compose logs --follow
52
71
```
53
72
54
73
### Rebuilding
55
-
56
74
If the ngrok container is restarted, the url will change which is a hassle. Fortunately, when we make a code change, we can rebuild and restart the atlantis container easily without disrupting ngrok.
57
75
58
76
e.g.
59
77
60
-
```
78
+
```sh
61
79
make build-service
62
80
docker-compose up --detach --build
63
81
```
64
82
65
-
## Running Tests Locally:
66
-
83
+
## Running Tests Locally
67
84
`make test`. If you want to run the integration tests that actually run real `terraform` commands, run `make test-all`.
68
85
69
-
## Running Tests In Docker:
70
-
```
86
+
## Running Tests In Docker
87
+
```sh
71
88
docker run --rm -v $(pwd):/go/src/github.com/runatlantis/atlantis -w /go/src/github.com/runatlantis/atlantis ghcr.io/runatlantis/testing-env:latest make test
72
89
```
73
90
74
91
Or to run the integration tests
75
-
```
92
+
93
+
```sh
76
94
docker run --rm -v $(pwd):/go/src/github.com/runatlantis/atlantis -w /go/src/github.com/runatlantis/atlantis ghcr.io/runatlantis/testing-env:latest make test-all
77
95
```
78
96
79
97
## Calling Your Local Atlantis From GitHub
80
98
- Create a test terraform repository in your GitHub.
81
99
- Create a personal access token for Atlantis. See [Create a GitHub token](https://github.com/runatlantis/atlantis/tree/main/runatlantis.io/docs/access-credentials.md#generating-an-access-token).
- Download ngrok from https://ngrok.com/download. This will enable you to expose Atlantis running on your laptop to the internet so GitHub can call it.
87
105
- When you've downloaded and extracted ngrok, run it on port `4141`:
88
-
```
106
+
```sh
89
107
ngrok http 4141
90
108
```
91
109
- Create a Webhook in your repo and use the `https` url that `ngrok` printed out after running `ngrok http 4141`. Be sure to append `/events` so your webhook url looks something like `https://efce3bcd.ngrok.io/events`. See [Add GitHub Webhook](https://github.com/runatlantis/atlantis/blob/main/runatlantis.io/docs/configuring-webhooks.md#configuring-webhooks).
92
110
- Create a pull request and type `atlantis help`. You should see the request in the `ngrok` and Atlantis logs and you should also see Atlantis comment back.
93
111
94
112
## Code Style
113
+
95
114
### Logging
96
115
- `ctx.Log` should be available in most methods. If not, pass it down.
97
116
- levels:
@@ -161,12 +180,11 @@ go get github.com/petergtz/pegomock/...
161
180
```
162
181
163
182
# Backporting Fixes
164
-
165
183
Atlantis now uses a [cherry-pick-bot](https://github.com/googleapis/repo-automation-bots/tree/main/packages/cherry-pick-bot) from Google. The bot assists in maintaining changes across releases branches by easily cherry-picking changes via pull requests.
166
184
167
185
Maintainers and Core Contributors can add a comment to a pull request:
168
186
169
-
```
187
+
```sh
170
188
/cherry-pick target-branch-name
171
189
```
172
190
@@ -175,7 +193,6 @@ target-branch-name is the branch to cherry-pick to. cherry-pick-bot will cherry-
175
193
The bot will immediately try to cherry-pick a merged PR. On unmerged pull request, it will not do anything immediately, but wait until merge. You can comment multiple times on a PR for multiple release branches.
176
194
177
195
## Manual Backporting Fixes
178
-
179
196
The bot will fail to cherry-pick if the feature branches' git history is not linear (merge commits instead of rebase). In that case, you will need to manually cherry-pick the squashed merged commit from main to the release branch
180
197
181
198
1. Switch to the release branch intended for the fix.
0 commit comments