devops

command
v1.0.53 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

README

devops

devops is a command line tool that makes a copy of the build/cicd tool for configuration and deployment of your project. The goal is to help developers get a local copy of cicd without a bunch of copy/paste.

Overview

The command line tool creates a copy of the build/cicd tool in your desired project. This will allow you to define all your configuration locally in your project repo.

For additional details regarding this tool, refer to gitlab.com/geeks-accelerator/oss/devops

Installation

Make sure you have a working Go environment. Go version 1.2+ is supported. See the install instructions for Go.

To install devops, simply run:

$ go get gitlab.com/geeks-accelerator/oss/devops/cmd/devops

Make sure your PATH includes the $GOPATH/bin directory so your commands can be easily used:

export PATH=$PATH:$GOPATH/bin
Compiling locally

In order to build devops, you will need packr2 to include the Golang files and readme from the example build/cicd. When code is changed in this project that needs to be included with build/cicd, parkr2 needs to be ran.

Packr is a simple solution for bundling static assets inside of Go binaries. Most importantly it does it in a way 
that is friendly to developers while they are developing.

To install packr2

$ go get -u github.com/gobuffalo/packr/v2/packr2

This repo has a post-commit hook at githooks/post-commit to detect changes to build/cicd tool and executes parkr2. Changed files are included with git commit --amend

To install the post-commit hook

cp githook/post-commit .git/hooks

Usage

$ cicd [global options] command [command options] [arguments...]
Global Options
  • Show help

    --help, -h

  • Print the version

    --version, -v

Commands
  • inject-build cicd - Copies the build tool to a target project. This copy the files for build/cicd to your specific project path.

    The target project must have a go.mod. The value for module is used to replace all import path for the sub packages copied. You can use go mod init github.com/my/repo to create the go.mod file.

    $ devops [global options] inject-build cicd -project NNNNN [command options]
    

    Options:

    --project value  the root directory of the project, required
    --force          force the files to be copied
    
  • help - Shows a list of commands

    $ devops help
    

    Or for one command:

    $ devops inject-build help
    
Examples

Make a copy of the cicd tool for saas-starter-kit

$ devops inject-build cicd -project $GOPATH/src/gitlab.com/geeks-accelerator/oss/saas-starter-kit

Join us on Gopher Slack

If you are having problems installing, troubles getting the project running or would like to contribute, join the channel #saas-starter-kit on Gopher Slack

Documentation

Overview

You can use the "packr clean" command to clean up this, and any other packr generated files.

Directories

Path Synopsis
You can use the "packr2 clean" command to clean up this, and any other packr generated files.
You can use the "packr2 clean" command to clean up this, and any other packr generated files.

Jump to

Keyboard shortcuts

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