Skip to main content

Shared workflows across CI/CD pipelines

Project description

CircleCI

Noos Invoke

Software development kit for sharing workflows across CI/CD pipelines.

Such a project aims to enforce parity and reproducability between local development and CI/CD workflows in remote containers (e.g. executable versions, command line calls, environment variables...) - developped with inv[oke](https://github.com/pyinvoke/invoke).

Installation

Install the package from the PyPi repository:

$ pip install noos-inv

To enable shell completion, execute the following command (e.g. zsh),

$ noosinv --print-completion-script=zsh

And copy/paste its stdout into your shell config.

# NOOSINV completion script

_complete_noosinv() {
    collection_arg=''
    if [[ "${words}" =~ "(-c|--collection) [^ ]+" ]]; then
        collection_arg=$MATCH
    fi
    reply=( $(noosinv ${=collection_arg} --complete -- ${words}) )
}

compctl -K _complete_noosinv + -f noosinv

Finally, still in your shell config, enable automatic sub shell loading:

# ENV variable sub shell loading with command "source .env"

set -a

Usage as a command line tool

The noos-inv package installs a CLI binary, for managing common CI/CD tasks.

From the terminal,

$ noosinv

Usage: noosinv [--core-opts] <subcommand> [--subcommand-opts] ...

Subcommands:

  docker.build       Build Docker image locally.
  docker.buildx      Build and push x-platform Docker image to a remote registry.
  docker.configure   Create and configure buildx builder for multi-platform.
  docker.login       Login to Docker remote registry (AWS ECR or Dockerhub).
  docker.push        Push Docker image to a remote registry.
  git.config         Setup git credentials with a Github token.
  helm.install       Provision local Helm client (Chart Museum Plugin).
  helm.lint          Check compliance of Helm charts / values.
  helm.login         Login to Helm remote registry (AWS ECR or Chart Museum).
  helm.push          Push Helm chart to a remote registry (AWS ECR or Chart Museum).
  helm.test          Test local deployment in Minikube.
  local.dotenv       Create local dotenv file.
  python.clean       Clean project from temp files / dirs.
  python.coverage    Run coverage test report.
  python.format      Auto-format source code.
  python.lint        Run python linters.
  python.package     Build project wheel distribution.
  python.release     Publish wheel distribution to PyPi.
  python.test        Run pytest with optional grouped tests.
  terraform.run      Run a plan in Terraform cloud.
  terraform.update   Update variable in Terraform cloud.

Source your environnement variables first for a seamless experience. (use command local.dotenv to create it from the provided template)

$ source .env

Development

On Mac OSX, make sure poetry has been installed and pre-configured,

$ brew install poetry

This project is shipped with a Makefile, which is ready to do basic common tasks.

$ make

help                           Display this auto-generated help message
update                         Lock and install build dependencies
clean                          Clean project from temp files / dirs
format                         Run auto-formatting linters
install                        Install build dependencies from lock file
lint                           Run python linters
test                           Run pytest with all tests
package                        Build project wheel distribution
release                        Publish wheel distribution to PyPi

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

noos_inv-0.0.18.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

noos_inv-0.0.18-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file noos_inv-0.0.18.tar.gz.

File metadata

  • Download URL: noos_inv-0.0.18.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1057-aws

File hashes

Hashes for noos_inv-0.0.18.tar.gz
Algorithm Hash digest
SHA256 ea5e615a2dd3118217045ad115488cfdb9306c4cf8a021d99c6dcfc6660afe7b
MD5 d51c93ca2a0b31a5d6ac2b2f1dc973a0
BLAKE2b-256 808ae3dadfd77aba96388efeb1d2171d52a28dc50231a359110e91f8ed3199d4

See more details on using hashes here.

File details

Details for the file noos_inv-0.0.18-py3-none-any.whl.

File metadata

  • Download URL: noos_inv-0.0.18-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1057-aws

File hashes

Hashes for noos_inv-0.0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 90acf507d32f5ee3f2e70f83bf9c952631a05e4aef4b30ee4618fb465aa370e7
MD5 c6bf4e26ec0b1ad887abb02e56698242
BLAKE2b-256 c6b4f348e5dee8ad09a1fb4d66599c626ddc2a5dc8ea83c17583b659a01e25a9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page