Skip to content

Commit f6c4217

Browse files
committed
Add ability to push image after building
1 parent fa4ac88 commit f6c4217

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
[![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)
22
# koku-test-container #
33

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

6-
## Building the container ##
6+
### Building the container ###
77

8-
This container is built automatically when changes pushed or tags are created.
8+
This container is built automatically when changes are pushed or tags are created.
99

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

12-
## Updating requirements ##
12+
### Updating requirements ###
1313

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

1616
`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.
1717

1818
Run `./freeze.py` to generate updated an requirements file.
19+
20+
21+
[koku]: https://github.com/project-koku/koku
22+
[integration tests]: https://github.com/project-koku/koku-ci

build.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def main() -> None:
1111
parser.add_argument("--version", default="latest")
1212
parser.add_argument("--no-cache", action="store_true")
1313
parser.add_argument("--file", "-f", default="Containerfile")
14+
parser.add_argument("--push", "-p", action="store_true")
1415

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

2425
subprocess.run(command, check=True)
2526

27+
if args.push:
28+
subprocess.run(["docker", "push", tag])
29+
2630

2731
if __name__ == "__main__":
2832
main()

0 commit comments

Comments
 (0)