Skip to main content

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].

Installation

Install the package from the PyPi repository:

```bash
$ pip install noos-inv
```

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

```bash
$ noosinv --print-completion-script=zsh
```

And copy/paste its stdout into your shell config.

```bash
# 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:

```bash
# 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,

```bash
$ 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.pull        Pull Docker image from a remote registry.
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.
local.ports        Forward ports for defined Kubernetes pods.
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)

```bash
$ source .env
```

Special note on K8S port-forwards

Add the NOOSINV_LOCAL_CONFIG OS variable to your shell config, as the path to a local configuration file:

```json
{
    "podForwards": {
        "pod_1": {
            "podNamespace": "default",
            "podPrefix": "service-1-",
            "podPort": 80,
            "localPort": 8000
        },
        "pod_2": {
            "podNamespace": "test",
            "podPrefix": "service-2-",
            "podPort": 8080,
            "localPort": 8000,
            "localAddress": "0.0.0.0"
        }
    }
}
```

To start port forwarding a specific K8S cluster pod:

```bash
$ noosinv local.ports -p pod_1
```

To kill all previous port forward processes:

```bash
$ noosinv local.ports -u
```

Or previously opened port forward:

```bash
$ noosinv local.ports -p pod_1 -u
```

Development

Make sure poetry has been installed and pre-configured,

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

```bash
$ 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
```

Release files for noos-inv 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for noos-inv 0.5.2
File Size Uploaded
noos_inv-0.5.2.tar.gz 11.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for noos-inv 0.5.2
File Interpreter ABI Platform
noos_inv-0.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 26.0 kB

Release files / noos_inv-0.5.2.tar.gz

Download URL noos_inv-0.5.2.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a7fc7f93172a8e6377d8e9a92a0619560b199f981bb9d0032ca5cff15c348e06
BLAKE2b-256 checksum
How to use checksums
de8aa3b7eced206b493b819411f692bca9bc498a1b3221bb6bf2bcde54e001dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.4 {"installer":{"name":"uv","version":"0.12.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / noos_inv-0.5.2-py3-none-any.whl

Download URL noos_inv-0.5.2-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
317f695e0fd11a95019ecfd8d5ba4eb6027fb59fec57dc658920d1de8a9a8e3a
BLAKE2b-256 checksum
How to use checksums
9694d6b10bea7687c15f038beff124d5bce8372968bd87833e240c419d468455
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.4 {"installer":{"name":"uv","version":"0.12.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.5.2 This release

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page