Giter Club home page Giter Club logo

cibu's Introduction

cibu

CI BUild helper

Set of tools to simplify CI/CD pipelines.

Modules

prepare-ssh

Put $SSH_PRIVATE_KEY env var contents to ~/.ssh/id_rsa file, fix permissions and add key to ssh agent.

Very usefull for ssh operations in GitLab CI

sentry

Sentry.io related commands

release [version] [url]

Create new release in sentry

Required env vars: `$SENTRY_WEBHOOK` - sentry release webhook url

Defaults: version = current date, url = none

Example: `cibu sentry release '2.0.0-beta1' 'https://github.com/titanium-codes/cibu/issues/2'`

compose

supported env vars:

  • TARGET_HOST - ssh host (with user, if needed), eg: 192.168.0.1, [email protected]
  • TARGET_PORT - ssh port. Default is 22
  • TARGET_PATH - path on target host, where compose file should be placed

docker and docker-compose related commands

login <login> <password> <registry>

Run docker login on remote server

Example `cibu compose login user password registry.gitlab.com`

Will run `ssh $TARGET_HOST docker login -u user -p password registry.gitlab.com`

upload [suffix]

Upload docker-compose file with target suffix (if provided) to remote server.

Example: `cibu compose upload qa`

Will run `scp docker-compose-qa.yml $TARGET_HOST:$TARGET_PATH/docker-compose.yml`

pull [docker-compose pull argumets]

Perform a 'docker-compose pull' with arguments (if provided) on remote server in selected dir

Example: `cibu compose pull --parallel`

Will run `ssh $TARGET_HOST 'cd $TARGET_PATH; docker-compose pull --parallel'`

remove <service>

Stop and remove selected service

Example: `cibu compose remove redis`

Will run `ssh $TARGET_HOST 'cd $TARGET_PATH; docker-compose stop redis; docker-compose rm -f redis'`

up [docker-compose up args...]

Run docker-compose up command on target server

Example: `cibu compose up --force-recreate`

Will run `ssh $TARGET_HOST 'cd $TARGET_PATH; docker-compose up --force-recreate'`

update <service>

Stop, remove and recreate selected service

Example: `cibu compose update redis`

Will run `ssh $TARGET_HOST 'cd $TARGET_PATH; docker-compose stop redis; docker-compose rm -f redis; docker-compose up -d --force-recreate --remove-orphans --no-deps redis'`

cleanup

Run docker system prune and clean volumes marked to remove

Example: `cibu compose cleanup`

Will run `ssh $TARGET_HOST 'docker system prune -a -f; rm -rf /var/lib/docker/aufs/diff/*-removing'`

help

Show overview and list of modules

cibu's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.