Skip to content

Commit

Permalink
Add ability to push image after building
Browse files Browse the repository at this point in the history
  • Loading branch information
samdoran committed Oct 30, 2024
1 parent fa4ac88 commit f6c4217
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
[![Static Badge](https://img.shields.io/badge/Quay.io-container-%23EE0000?style=for-the-badge&link=https%3A%2F%2Fquay.io%2Frepository%2Fproject-koku%2Fkoku-test-container "Container on Quay.io")](https://quay.io/repository/project-koku/koku-test-container)
# koku-test-container #

This is the container used for running [koku]() integration tests in Konflux. It is used by the `bonfire-tekton` pipeline.
This is the container used for running [koku] [integration tests] in Konflux.

## Building the container ##
### Building the container ###

This container is built automatically when changes pushed or tags are created.
This container is built automatically when changes are pushed or tags are created.

To manually build the container for local testing, run `./build.py`.
To manually build the container for local testing, run `./build.py`. Add `--push` to push the image after building.

## Updating requirements ##
### Updating requirements ###

Files in the `requirements` directory are used for managing Python requirements.

`requirements.in` contains direct dependencies. `constraints.txt` is for restricting versions of indirect dependencies. These two files are used when generating the `requirements.txt` freeze file.

Run `./freeze.py` to generate updated an requirements file.


[koku]: https://github.com/project-koku/koku
[integration tests]: https://github.com/project-koku/koku-ci
4 changes: 4 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def main() -> None:
parser.add_argument("--version", default="latest")
parser.add_argument("--no-cache", action="store_true")
parser.add_argument("--file", "-f", default="Containerfile")
parser.add_argument("--push", "-p", action="store_true")

args = parser.parse_args()
container_runtime = args.container_runtime
Expand All @@ -23,6 +24,9 @@ def main() -> None:

subprocess.run(command, check=True)

if args.push:
subprocess.run(["docker", "push", tag])


if __name__ == "__main__":
main()

0 comments on commit f6c4217

Please sign in to comment.