0.4.3 • Published 2 months ago

go-dude v0.4.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

Go Dude

NPM version

A local cicd tool for docker. Easy way to push image and replace docker-compose service or k8s pod by ssh.

Installation

npm install go-dude -g

Configuration

Define a config file named dude.config.json in root dir of your project.

It looks like:

// dude.config.json

{
  "name": "PROJECT_NAME",
  "ssh": {
    "username": "root",
    "host": "",
    "password": "",
    "port": 22
  },
  "dockerCompose": {
    "file": "/docker-compose.yml"
  },
  "k8s": {
    "namespace": "",
    "deployment": ""
  }
}

Dude will use project name in package.json name field as default, but you can also define another name in config file.

Usage

dude push

This command will connect your ip address by ssh, If use -t or --tag option,this command will only replace image tag.

docker

Replace the target project image url in docker-compose file.

k8s

Set deployment pod container image ( If only have one container in pod ).

Usage: index push [options] <string>

Push image to docker-compose file by ssh.

Arguments:
  string              Image URL / Image tag

Options:
  -V, --version       output the version number
  -t --tag            Only replace image tag.
  -c --config <char>  Declare dude config file.
  -h, --help          display help for command

dude build

This command will run configured build script and make it to a docker image.

If you have a image repo like harbor, provide repos in dude.config.json file, this command will build image and upload image repo under defined prject.

If do not have image repos, dude will create a dir named .image and generate docker image to a tar file. Auto upload this tar file to server by scp and run docker load

After build a docker image, dude will ask you if you need to push this image to a docker or k8s server.

Usage: index build [options]

build project

Options:
  -V, --version       output the version number
  -c --config <char>  Declare dude config file.
  -h, --help          display help for command

dude check

A easy way to check if the service / pod running successfully without use a ssh tool.

This command will output name | image | state | status fields as a table on console.

Config

DudeConfig

interface DudeConfig {
  name?: string
  dockerCompose?: false | {
    file: string
    command?: string
  }
  k8s: {
    deployment: string
    pod?: string
    container?: string
    namespace?: string
  }
  ssh: {
    host: string
    username: string
    password: string
    port: number
  }
  build: {
    script?: string
    output: string
  }
  repos?: ImageRepo[]
}

ImageRepo

interface ImageRepo {
  host: string
  username: string
  password: string
  project: string
}

License

MIT

0.4.3

2 months ago

0.4.1

3 months ago

0.4.2

3 months ago

0.4.0-rc.12

3 months ago

0.4.0-rc.11

4 months ago

0.4.0-rc.10

5 months ago

0.4.0-rc.9

7 months ago

0.4.0-rc.7

7 months ago

0.4.0-rc.3

8 months ago

0.4.0-rc.6

7 months ago

0.4.0-rc.5

7 months ago

0.4.0-rc.4

7 months ago

0.4.0-rc.2

9 months ago

0.4.0-rc.1

9 months ago

0.3.9

10 months ago

0.3.15

10 months ago

0.3.14

10 months ago

0.3.13

10 months ago

0.3.12

10 months ago

0.3.11

10 months ago

0.3.0

10 months ago

0.2.1

11 months ago

0.1.2

11 months ago

0.2.0

11 months ago

0.3.19

10 months ago

0.3.18

10 months ago

0.3.6

10 months ago

0.3.5

10 months ago

0.3.8

10 months ago

0.3.7

10 months ago

0.3.2

10 months ago

0.2.3

10 months ago

0.3.1

10 months ago

0.2.2

11 months ago

0.1.3

11 months ago

0.3.4

10 months ago

0.1.0

1 year ago

0.1.1

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago