stagectl

command module
v0.0.0-...-abeaa6a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2020 License: MIT Imports: 1 Imported by: 0

README

Stagectl

Maintainability GoDoc Go Report Card

Stagectl is the CLI tool to manage your auto-staging setup.

Configuration of stagectl

Stagectl is configured by the ".stagectl.yaml" configuration file stored in your home directory.

The config file has the following format:

tower_base_url: https://xxxxxxxxxxx.execute-api.eu-central-1.amazonaws.com/v1

Replace tower_base_url with your Tower API URL.

Configuration for Repositories

Stagectl loads the configuration for a new repository or an repository update from the ".auto-staging.json" file in the current directory.

The file has the following format. Replace all values with the values matching your repository.

{
    "repository": "auto-staging-demo-app",
    "infrastructureRepoURL": "https://github.com/janritter/auto-staging-demo-app.git",
    "webhook": true,
    "filters": [
        "feat(.*)"
    ],
    "codeBuildRoleARN": "arn:aws:iam::xxxxxxxxxxxxxx:role/codebuild-exec-role",
    "environmentVariables": [
        {
            "name": "TF_VAR_project",
            "type": "PLAINTEXT",
            "value": "demo-app"
        },
        {
            "name": "TF_VAR_stage",
            "type": "PLAINTEXT",
            "value": "dev"
        },
        {
            "name": "TF_VAR_instance_type",
            "type": "PLAINTEXT",
            "value": "t3.nano"
        },
        {
            "name": "TF_VAR_instance_count",
            "type": "PLAINTEXT",
            "value": "2"
        },
        {
            "name": "TF_VAR_github_owner",
            "type": "PLAINTEXT",
            "value": "janritter"
        },
        {
            "name": "TF_VAR_github_repo",
            "type": "PLAINTEXT",
            "value": "auto-staging-demo-app"
        },
        {
            "name": "GITHUB_TOKEN",
            "type": "PARAMETER_STORE",
            "value": "/CodeBuild/GITHUB_TOKEN"
        }
    ]
}

Installation

  1. Download latest release binary from the release page
  2. Move the downloaded binary to your /usr/local/bin or /usr/bin folder
  3. Rename the binary file to stagectl and make it executable chmod +x stagectl
  4. Start using stagectl

Development

Install dependencies
make prepare
Update dependencies
go get -u
Build binary
make build

compiles to bin folder

Move binary to /usr/bin
sudo mv bin/stagectl /usr/bin/stagectl

License and Author

Author: Jan Ritter

License: MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL