entro-ci

An automated CI tool to help with building packages and ignoring them when there wasn't a change.

Usage no npm install needed!

<script type="module">
  import entroCi from 'https://cdn.skypack.dev/entro-ci';
</script>

README

entro-ci

An automated CI tool to help with building packages and ignoring them when there wasn't a change.

oclif Version Downloads/week License

Usage

$ npm install -g entro-ci
$ entro-ci COMMAND
running command...
$ entro-ci (-v|--version|version)
entro-ci/3.1.1 linux-x64 node-v14.17.3
$ entro-ci --help [COMMAND]
USAGE
  $ entro-ci COMMAND
...

Commands

entro-ci docker:build

Checks if the Docker image has been built before and if it has not then it will build it and push it with the hash to the Docker registry

USAGE
  $ entro-ci docker:build

OPTIONS
  -P, --docker-password=docker-password        The password for logging into the docker repository (mainly for if you
                                               are running this build process inside a container)

  -R, --dry-run                                Whether to run this live or do a dry run

  -b, --docker-build-flags=docker-build-flags  Any additional build flags that you would like to plug directly into the
                                               Docker build command

  -d, --directory=directory                    (required) The path to the directory that you want to build

  -f, --docker-file-name=docker-file-name      [default: Dockerfile] The name of the Docker file in the directory

  -i, --image-name=image-name                  (required) The name of the Docker image name without the version on it,
                                               eg: entrostat/entro-ci is correct and entrostat/entro-ci:latest is not
                                               valid

  -p, --package=package                        [default: ./package.json] The path to the package.json that holds the
                                               version of the build

  -r, --registry=registry                      The registry that should be used (by default Docker Hub is used)

  -t, --tag=tag                                The tag version that should be pushed to the registry so that it can be
                                               used in automated deployments

  -u, --docker-username=docker-username        The username for logging into the docker repository (mainly for if you
                                               are running this build process inside a container)

  -w, --watch-directory=watch-directory        Directories that should be watched to trigger the build. Note, if you set
                                               this then it IGNORES the build directory so you'd have to add that here
                                               as well.

EXAMPLES
  entro-ci docker:build --directory=./backend --image-name=my-repo/my-image --tag=stable
  entro-ci docker:build --directory=./backend --image-name=my-repo/my-image --tag=stable --watch-directory=./backend/src
  entro-ci docker:build --directory=./backend --image-name=my-repo/my-image --tag=stable --watch-directory=./backend/src 
  --watch-directory=./backend/migrations
  entro-ci docker:build --directory=./backend --image-name=my-repo/my-image --tag=stable 
  --watch-directory=./project/shared --watch-directory=./backend
  entro-ci docker:build --directory=./backend --image-name=my-repo/my-image --tag=stable 
  --watch-directory=./project/shared --watch-directory=./backend --docker-build-flags="--build-arg API_VERSION=v2 
  --build-arg ENV=prod"
  entro-ci docker:build --directory=./backend --image-name=my-repo/my-image --tag=stable 
  --watch-directory=./project/shared --watch-directory=./backend --docker-build-flags="--build-arg API_VERSION=v2" 
  --docker-build-flags="--build-arg ENV=prod"

See code: src/commands/docker/build.ts

entro-ci docker:build-from-file

Checks to see if a specific Dockerfile has changed (not the contents of a directory) and builds if this is the case

USAGE
  $ entro-ci docker:build-from-file

OPTIONS
  -P, --docker-password=docker-password        The password for logging into the docker repository (mainly for if you
                                               are running this build process inside a container)

  -R, --dry-run                                Whether to run this live or do a dry run

  -b, --docker-build-flags=docker-build-flags  Any additional build flags that you would like to plug directly into the
                                               Docker build command

  -f, --docker-file-path=docker-file-path      (required) The path to the Docker file

  -i, --image-name=image-name                  (required) The name of the Docker image name without the version on it,
                                               eg: entrostat/entro-ci is correct and entrostat/entro-ci:latest is not
                                               valid

  -p, --package=package                        [default: ./package.json] The path to the package.json that holds the
                                               version of the build

  -r, --registry=registry                      The registry that should be used (by default Docker Hub is used)

  -t, --tag=tag                                The tag version that should be pushed to the registry so that it can be
                                               used in automated deployments

  -u, --docker-username=docker-username        The username for logging into the docker repository (mainly for if you
                                               are running this build process inside a container)

  -w, --watch-file=watch-file                  One or more files that should be "watched" for change that fall into this
                                               Dockerfile. So it is not a whole folder but a file or two.

EXAMPLES
  entro-ci docker:build-from-file --image-name=my-repo/my-image --docker-file-path=./backend/Dockerfile 
  --watch-file=./backend/package.json --watch-file=./backend/manifest.json --tag=stable
  entro-ci docker:build-from-file --image-name=my-repo/my-image --docker-file-path=./backend/Dockerfile 
  --watch-file=./backend/package.json --watch-file=./backend/manifest.json --tag=stable 
  --docker-build-flags="--build-arg API_VERSION=v2"

See code: src/commands/docker/build-from-file.ts

entro-ci hash:directory DIRECTORY

Generates the hash of a directory and outputs it to screen.

USAGE
  $ entro-ci hash:directory DIRECTORY

ARGUMENTS
  DIRECTORY  The directory that we're hashing

See code: src/commands/hash/directory.ts

entro-ci help [COMMAND]

display help for entro-ci

USAGE
  $ entro-ci help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

entro-ci kube:deployment:update DEPLOYMENT [NAMESPACE]

Trigger an update on a deployment

USAGE
  $ entro-ci kube:deployment:update DEPLOYMENT [NAMESPACE]

ARGUMENTS
  DEPLOYMENT  The name of the deployment that you would like to update
  NAMESPACE   [default: default] The namespace that the deployment is in

OPTIONS
  -b, --bin=bin  [default: kubectl] The path to the kubectl executable

ALIASES
  $ entro-ci kdu

See code: src/commands/kube/deployment/update.ts

entro-ci templates:update

Updates files specified in the entro-ci.yaml file in the repository

USAGE
  $ entro-ci templates:update

OPTIONS
  -V, --outputVersion=outputVersion  The version that you want to set (if you don't want to use the version in the
                                     package.json)

  -f, --file=file                    [default: ./entro-ci.yaml] The path to the yaml file with the config

  -p, --package=package              [default: ./package.json] The path of the package.json file that holds the current
                                     version

EXAMPLES
  entro-ci templates:update
  entro-ci templates:update -f .templates.yaml

See code: src/commands/templates/update.ts

entro-ci trigger:post-build

Trigger a script if the build with a certain image name triggered during this run

USAGE
  $ entro-ci trigger:post-build

OPTIONS
  -S, --shell=shell            [default: /bin/bash] The shell that should be used to trigger this script.
  -a, --all-true               Require all of the image names to have been built to trigger this.

  -i, --image-name=image-name  (required) The image name or image names that should build in order for this to trigger.
                               By default, the trigger works if any one of these names built.

  -s, --script=script          (required) The path to the script you want to run.

EXAMPLES
  entro-ci trigger:post-build --script=./scripts/deploy_prod.sh --image-name=myproject/backend
  entro-ci trigger:post-build --script=./deploy_prod.sh --image-name=myproject/frontend --shell=/bin/zsh
  entro-ci trigger:post-build --script=./deploy_prod.sh --image-name=myproject/backend-os --image-name=myproject/backend
  entro-ci trigger:post-build --script=./deploy_prod.sh --image-name=myproject/backend-os --image-name=myproject/backend 
  --all-true

See code: src/commands/trigger/post-build.ts