mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-04 02:38:27 +00:00
Merge pull request #257 from runatlantis/vcs
Update VCS docs, upgrade to golang 1.11
This commit is contained in:
@@ -15,7 +15,7 @@ jobs:
|
||||
e2e:
|
||||
working_directory: /go/src/github.com/runatlantis/atlantis
|
||||
docker:
|
||||
- image: circleci/golang:1.10
|
||||
- image: circleci/golang:1.11
|
||||
environment:
|
||||
TERRAFORM_VERSION: 0.11.8
|
||||
steps:
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
docker_master:
|
||||
working_directory: /go/src/github.com/runatlantis/atlantis
|
||||
docker:
|
||||
- image: circleci/golang:1.10
|
||||
- image: circleci/golang:1.11
|
||||
steps:
|
||||
- checkout
|
||||
- run: make build-service
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
docker_tag:
|
||||
working_directory: /go/src/github.com/runatlantis/atlantis
|
||||
docker:
|
||||
- image: circleci/golang:1.10
|
||||
- image: circleci/golang:1.11
|
||||
steps:
|
||||
- checkout
|
||||
- run: make build-service
|
||||
|
||||
@@ -44,6 +44,7 @@ If installing on a single repository, navigate to the repository home page and c
|
||||
- double-check you added `/events` to the end of your URL.
|
||||
- set **Content type** to `application/json`
|
||||
- set **Secret** to a random key (https://www.random.org/strings/). You'll need to pass this value to the `--gh-webhook-secret` flag when you start Atlantis
|
||||
- **NOTE** If you're adding a webhook to multiple repositories, each repository will need to use the **same** secret.
|
||||
- select **Let me select individual events**
|
||||
- check the boxes
|
||||
- **Pull request reviews**
|
||||
@@ -59,6 +60,7 @@ If you're using GitLab, navigate to your project's home page in GitLab
|
||||
- set **URL** to `http://$URL/events` (or `https://$URL/events` if you're using SSL) where `$URL` is where Atlantis is hosted. **Be sure to add `/events`**
|
||||
- double-check you added `/events` to the end of your URL.
|
||||
- set **Secret Token** to a random key (https://www.random.org/strings/). You'll need to pass this value to the `--gitlab-webhook-secret` flag when you start Atlantis
|
||||
- **NOTE** If you're adding a webhook to multiple repositories, each repository will need to use the **same** secret.
|
||||
- check the boxes
|
||||
- **Push events**
|
||||
- **Comments**
|
||||
@@ -66,8 +68,6 @@ If you're using GitLab, navigate to your project's home page in GitLab
|
||||
- leave **Enable SSL verification** checked
|
||||
- click **Add webhook**
|
||||
|
||||
**NOTE:** If you are using Atlantis with multiple GitLab repositories, you must either use the same Integration secret token across all GitLab repositories, or use a separate Atlantis instance for each repository. The former approach is recommended.**
|
||||
|
||||
### Bitbucket Cloud (bitbucket.org) Webhook
|
||||
- Go to your repo's home page
|
||||
- Click **Settings** in the sidebar
|
||||
@@ -94,6 +94,7 @@ If you're using GitLab, navigate to your project's home page in GitLab
|
||||
- set **URL** to `http://$URL/events` (or `https://$URL/events` if you're using SSL) where `$URL` is where Atlantis is hosted. **Be sure to add `/events`**
|
||||
- Double-check you added `/events` to the end of your URL.
|
||||
- Set **Secret** to a random key (https://www.random.org/strings/). You'll need to pass this value to the `--bitbucket-webhook-secret` flag when you start Atlantis
|
||||
- **NOTE** If you're adding a webhook to multiple repositories, each repository will need to use the **same** secret.
|
||||
- Under **Repository** select **Push**
|
||||
- Under **Pull Request**, select: Opened, Modified, Merged, Declined, Deleted and Comment added
|
||||
- Click **Save**<img src="../guide/images/bitbucket-server-webhook.png" alt="Bitbucket Webhook" style="max-height: 500px;">
|
||||
|
||||
@@ -59,11 +59,11 @@ func setup(t *testing.T) *vcsmocks.MockClientProxy {
|
||||
MarkdownRenderer: &events.MarkdownRenderer{},
|
||||
GithubPullGetter: githubGetter,
|
||||
GitlabMergeRequestGetter: gitlabGetter,
|
||||
Logger: logger,
|
||||
AllowForkPRs: false,
|
||||
AllowForkPRsFlag: "allow-fork-prs-flag",
|
||||
ProjectCommandBuilder: projectCommandBuilder,
|
||||
ProjectCommandRunner: projectCommandRunner,
|
||||
Logger: logger,
|
||||
AllowForkPRs: false,
|
||||
AllowForkPRsFlag: "allow-fork-prs-flag",
|
||||
ProjectCommandBuilder: projectCommandBuilder,
|
||||
ProjectCommandRunner: projectCommandRunner,
|
||||
}
|
||||
return vcsClient
|
||||
}
|
||||
|
||||
@@ -32,15 +32,15 @@ func (r *RunStepRunner) Run(ctx models.ProjectCommandContext, command []string,
|
||||
customEnvVars := map[string]string{
|
||||
"WORKSPACE": ctx.Workspace,
|
||||
"ATLANTIS_TERRAFORM_VERSION": tfVersion,
|
||||
"DIR": path,
|
||||
"PLANFILE": filepath.Join(path, GetPlanFilename(ctx.Workspace, ctx.ProjectConfig)),
|
||||
"BASE_REPO_NAME": ctx.BaseRepo.Name,
|
||||
"BASE_REPO_OWNER": ctx.BaseRepo.Owner,
|
||||
"HEAD_REPO_NAME": ctx.HeadRepo.Name,
|
||||
"HEAD_REPO_OWNER": ctx.HeadRepo.Owner,
|
||||
"HEAD_BRANCH_NAME": ctx.Pull.Branch,
|
||||
"PULL_NUM": fmt.Sprintf("%d", ctx.Pull.Num),
|
||||
"PULL_AUTHOR": ctx.Pull.Author,
|
||||
"DIR": path,
|
||||
"PLANFILE": filepath.Join(path, GetPlanFilename(ctx.Workspace, ctx.ProjectConfig)),
|
||||
"BASE_REPO_NAME": ctx.BaseRepo.Name,
|
||||
"BASE_REPO_OWNER": ctx.BaseRepo.Owner,
|
||||
"HEAD_REPO_NAME": ctx.HeadRepo.Name,
|
||||
"HEAD_REPO_OWNER": ctx.HeadRepo.Owner,
|
||||
"HEAD_BRANCH_NAME": ctx.Pull.Branch,
|
||||
"PULL_NUM": fmt.Sprintf("%d", ctx.Pull.Num),
|
||||
"PULL_AUTHOR": ctx.Pull.Author,
|
||||
}
|
||||
|
||||
finalEnvVars := baseEnvVars
|
||||
|
||||
@@ -178,10 +178,10 @@ func TestPost_GitlabCommentNotWhitelisted(t *testing.T) {
|
||||
Logger: logging.NewNoopLogger(),
|
||||
CommentParser: &events.CommentParser{},
|
||||
GitlabRequestParserValidator: &server.DefaultGitlabRequestParserValidator{},
|
||||
Parser: &events.EventParser{},
|
||||
SupportedVCSHosts: []models.VCSHostType{models.Gitlab},
|
||||
RepoWhitelistChecker: &events.RepoWhitelistChecker{},
|
||||
VCSClient: vcsClient,
|
||||
Parser: &events.EventParser{},
|
||||
SupportedVCSHosts: []models.VCSHostType{models.Gitlab},
|
||||
RepoWhitelistChecker: &events.RepoWhitelistChecker{},
|
||||
VCSClient: vcsClient,
|
||||
}
|
||||
requestJSON, err := ioutil.ReadFile(filepath.Join("testfixtures", "gitlabMergeCommentEvent_notWhitelisted.json"))
|
||||
Ok(t, err)
|
||||
|
||||
@@ -52,7 +52,7 @@ func downloadFile(url string, path string) error {
|
||||
}
|
||||
defer output.Close() // nolint: errcheck
|
||||
|
||||
response, err := http.Get(url)
|
||||
response, err := http.Get(url) // nolint: gosec
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -99,7 +99,7 @@ func unzip(archive, target string) error {
|
||||
|
||||
func getTunnelAddr() (string, error) {
|
||||
tunAPI := fmt.Sprintf("http://%s/api/tunnels", ngrokAPIURL)
|
||||
response, err := http.Get(tunAPI)
|
||||
response, err := http.Get(tunAPI) // nolint: gosec
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# This Dockerfile builds the docker image used for running circle ci tests.
|
||||
# We need terraform installed for our full test suite so it installs that.
|
||||
# It's updated by running make build-testing-image
|
||||
FROM circleci/golang:1.10
|
||||
FROM circleci/golang:1.11
|
||||
|
||||
# Install Terraform
|
||||
ENV TERRAFORM_VERSION=0.11.8
|
||||
|
||||
Reference in New Issue
Block a user