Skip to content

chore/update build deps #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: examples/
- id: check-json
- id: check-toml
- id: check-added-large-files
- id: check-symlinks
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
rev: v1.5.0
hooks:
- id: detect-secrets
exclude: test/
- repo: https://github.com/hhatto/autopep8
rev: v2.0.4
hooks:
- id: autopep8
entry: autopep8
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.0.275
rev: v0.5.1
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.4.0'
rev: 'v1.10.1'
hooks:
- id: mypy
args: ['--install-types', '--non-interactive']
Expand Down
45 changes: 41 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
# image-tools v0.0.11

Commandline tools to manage Stackable container images available at https://github.com/stackabletech/docker-images
Command line tools to manage Stackable container images available at [docker-images](https://github.com/stackabletech/docker-images)

This repository (and the installable package) contain two tools:

* `bake` : build and publish product images.
* `check-container` : run RedHat preflight checks on container images.

The `bake` command provides the following features:

* Build all Stackable product images
* Build individual product images
* Build individual product version images
* Use one or more distributed docker cache servers
* Publish images

## Usage examples

Run either `bake` or `check-container` with `--help` to get an overview of the accepted flags and their functionality.
Expand All @@ -19,6 +27,9 @@ bake -p hello-world -i 0.0.0-dev
# Build only one version [0.37.2] of OPA
bake -p opa=0.37.2 -i 0.0.0-dev

# Enable distributed docker cache (requires credentials to access the cache registry)
bake -p opa --cache

# Build half of all versions defined for OPA
bake -p opa -i 0.0.0-dev --shard-count 2 --shard-index 0

Expand Down Expand Up @@ -66,15 +77,41 @@ in
}
```

## Development

Create a virtual environment where you install the package in "editable" mode:

Using `venv` and `pip`:

```shell
python -m venv ~/venv-image-tools-devel
source ~/venv-image-tools-devel/bin/activate
pip install --editable .
```

Using [pipx](https://pypa.github.io/pipx/):

```shell
pipx install --editable .
```

With the activated virtual environment, you can now run the tools from the `docker-images` repository and any local changes are immediately in effect.

## Release a new version

Update the version in:
1. Create a release PR where you:
1.1. Update the version in:

* `src/image_tools/version.py`
* `README.md` : version and pip install command.

Update the CHANGELOG.
Commit and tag.
1.2. Update the CHANGELOG.
2. Tag the release commit after it is merged to `main`.
3. Automated GH actions will publish the new version to PyPI.


To publish manually (requires PyPI credentials):

Build and publish:

```shell
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ classifiers = [
]
dependencies = ["Jinja2>=3.1.2", "PyYAML>=6.0"]
[project.optional-dependencies]
lint = ['ruff>=0.4', 'mypy>=1.10']
lint = ['ruff>=0.5', 'mypy>=1.10']
publish = ['twine>=5.0', 'build>=1.2']

[project.scripts]
Expand Down