Documentation
¶
Overview ¶
Generate initial local SalsaFlow configuration.
salsaflow repo bootstrap -issue_tracker=ISSUE_TRACKER -code_review_tool=CODE_REVIEW_TOOL [-skeleton=SKELETON]
Description ¶
This command can be used to generate initial local SalsaFlow configuration so that the repository can be set up quickly.
The -issue_tracker and -code_review_tool flags must be supplied to tell SalsaFlow what modules you are going to use for the project. It affects the local configuration file template that is generated.
The -skeleton flag can be used to quickly set up the remaining configuration for SalsaFlow, most importantly the custom scripts. When supplied with OWNER/REPO, SalsaFlow will get the GitHub repository specified by that value and it will copy the content into the local metadata directory. This can be easily used to share custom scripts by making a skeleton for every distinct project type.
Steps ¶
This command goes through the following steps:
- Take the flags and write a configuration file template into .salsaflow/config.yml. This template needs to be filled in, but the keys to be filled are clearly visible.
- We are done in case -skeleton is not specified.
- Clone the given skeleton repository into the local cache, which is located in the current user's home directory. The repository is just pulled in case it already exists. Once the content is available, it is copied into the local metadata directory, .salsaflow.
Index ¶
Constants ¶
const LocalConfigTemplate = `` /* 810-byte string literal not displayed */
const SkeletonCacheDirname = ".salsaflow_skeletons"
Variables ¶
var Command = &gocli.Command{
UsageLine: `
bootstrap -issue_tracker=ISSUE_TRACKER
-code_review_tool=CODE_REVIEW_TOOL
[-release_notes=RELEASE_NOTES]
[-skeleton=SKELETON]`,
Short: "generate local config for SalsaFlow",
Long: `
This command can be used to set up the repository to work with SalsaFlow.
SalsaFlow needs certain information to be kept in the repository
to be able to function properly. To make the initial repository setup
easier, repo bootstrap can be used to generate all necessary files,
which can be then modified manually if necessary.
The files are just dumped into the working tree, into .salsaflow directory.
The directory must be committed after making sure everything is correct.
Considering the flags, 'issue_tracker', 'code_review_tool' and
'release_notes' can be used to tell SalsaFlow what implementation to use
for particular service modules. The first two flags are required, the last one
is optional. See the AVAILABLE MODULES section for the allowed values.
The 'skeleton' flag is a bit different. It can be used to specify
a GitHub repository that is used as the skeleton for project custom scripts.
The repository is simply cloned and the contents are poured into .salsaflow.
The format is '<org>/<repo>', e.g. 'salsaflow/skeleton-golang'.
`,
Action: run,
}
Functions ¶
func WriteLocalConfigTemplate ¶
func WriteLocalConfigTemplate(dst io.Writer, ctx *LocalContext) error