mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-31 03:48:38 +00:00
* set version in one place * rename ExecutionContext to CommandContext * delete unneeded PullRequestContext since it just duplicated what is in CommandContext * split fields inside CommandContext into Repo, PullRequest, and User models * clean up unused fields * remove base_executor stuff which was trying to do inheritance in go and didn't get us anywhere * clean up unused code and assets * created a locking.Client that creates the Keys that are used on the front-end. This allows the backends to store the locks any way they like as long as they support the interface
38 lines
963 B
Go
38 lines
963 B
Go
package server
|
|
|
|
import "github.com/spf13/viper"
|
|
|
|
type HelpExecutor struct{}
|
|
|
|
var helpComment = "```cmake\n" +
|
|
`atlantis - Terraform collaboration tool that enables you to collaborate on infrastructure
|
|
safely and securely. (v` + viper.GetString("version") + `)
|
|
|
|
Usage: atlantis <command> [environment] [--verbose]
|
|
|
|
Commands:
|
|
plan Runs 'terraform plan' on the files changed in the pull request
|
|
apply Runs 'terraform apply' using the plans generated by 'atlantis plan'
|
|
help Get help
|
|
|
|
Examples:
|
|
|
|
# Generates a plan for staging environment
|
|
atlantis plan staging
|
|
|
|
# Generates a plan for a standalone terraform project
|
|
atlantis plan
|
|
|
|
# Applies a plan for staging environment
|
|
atlantis apply staging
|
|
|
|
# Applies a plan for a standalone terraform project
|
|
atlantis apply
|
|
`
|
|
|
|
func (h *HelpExecutor) execute(ctx *CommandContext, github *GithubClient) {
|
|
ctx.Log.Info("generating help comment....")
|
|
github.CreateComment(ctx, helpComment)
|
|
return
|
|
}
|