cops init scaffolds a cops.project.json file from a built-in template. Use it to quickly get a valid release gate config without writing JSON by hand.
Usage
Flags
Template profile to generate. Controls which project entries and gates are included in the output file.
| Value | What it generates |
|---|---|
all | All three templates as separate project entries |
backend-service | Server-side service with Jira, Confluence, Bitbucket, and Bamboo gates |
mobile-app | Mobile client project with Jira, Bitbucket, and Bamboo gates |
shared-platform | Shared platform component with Confluence freshness and dual Bamboo plans |
Where to write
cops.project.json.| Value | Path |
|---|---|
global | ~/.config/cops/cops.project.json (Linux/macOS) or %APPDATA%\cops\cops.project.json (Windows) |
local | ./cops.project.json in the current working directory |
Override the
defaultProject field in the generated config. Defaults to the first project key produced by the chosen template.Overwrite an existing
cops.project.json at the target path. Without this flag, the command exits with an error if the file already exists.Config file precedence
When cops commands look forcops.project.json, they check in this order and use the first file found:
COPS_PROJECT_CONFIGenvironment variable — explicit path; takes priority over everything else- Global config directory —
~/.config/cops/cops.project.json(Linux/macOS) or%APPDATA%\cops\cops.project.json(Windows) - Current working directory —
./cops.project.json
Set
COPS_PROJECT_CONFIG=/path/to/my-config.json to point cops at a specific file without moving it or changing the global config.Examples
Generated file
After runningcops init --template backend-service, the global config file contains:
fixVersion values with real ones before running release gates.
Related
Configuration
Full project config schema, gate fields, and precedence rules.
Release check
Run the gates defined in cops.project.json.
