Skip to content
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

Feature/push to quay.io #30

Merged
merged 2 commits into from
Jun 11, 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
13 changes: 11 additions & 2 deletions .github/workflows/kuksa-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
# list of Docker images to use as base name for tags
images: |
ghcr.io/eclipse-kuksa/kuksa-python-sdk/kuksa-client
quay.io/eclipse-kuksa/kuksa-client
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
Expand All @@ -67,7 +68,7 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
- name: Log in to ghcr.io container registry
if: needs.check_ghcr_push.outputs.push == 'true'
uses: docker/login-action@v3
with:
Expand All @@ -77,7 +78,15 @@ jobs:
#username: kuksa-bot #keep it for now, maybe the standard token can not push to same package
#password: ${{ secrets.PUSH_CONTAINER_TOKEN }}

- name: Build kuksa command line client docker and push to ghcr.io
- name: Log in to quay.io container registry
if: needs.check_ghcr_push.outputs.push == 'true'
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_IO_USERNAME }}
password: ${{ secrets.QUAY_IO_TOKEN }}

- name: Build kuksa command line client docker and push to ghcr.io, quay.io and ttl.sh
if: needs.check_ghcr_push.outputs.push == 'true'
uses: docker/build-push-action@v5
with:
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# KUKSA Python SDK

![kuksa.val Logo](https://raw.githubusercontent.com/eclipse-kuksa/kuksa-python-sdk/main/docs/pictures/logo.png)

KUKSA Python Client and SDK is a part of the open source project [Eclipse KUKSA](https://www.eclipse.org/kuksa/).
Expand All @@ -10,7 +11,6 @@ KUKSA Python SDK provides both a command-line interface (CLI) and a standalone l
[KUKSA Server](https://github.com/eclipse/kuksa.val/tree/master/kuksa-val-server) or
[KUKSA Databroker](https://github.com/eclipse/kuksa.val/tree/master/kuksa_databroker).


## Building and Installing the KUKSA Python SDK

The fastest way to start using KUKSA Python SDK is to install a pre-built version from pypi.org:
Expand Down Expand Up @@ -39,8 +39,7 @@ More details on how to use the CLI is available in the KUKSA Python SDK [CLI doc

## Using Docker for the CLI

The KUKSA Python SDK CLI is available as a [prebuilt docker container](https://github.com/eclipse-kuksa/kuksa-python-sdk/pkgs/container/kuksa-python-sdk%2Fkuksa-client).
For more details see the KUKSA Python SDK [Docker documentation](https://github.com/eclipse-kuksa/kuksa-python-sdk/blob/main/docs/docker.md).
The KUKSA Python SDK CLI is available as a [prebuilt docker container](https://github.com/eclipse-kuksa/kuksa-python-sdk/blob/main/docs/docker.md).

## Using KUKSA Python SDK as library

Expand Down
8 changes: 7 additions & 1 deletion docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@ The latest released docker version container can be run like this, arguments can
docker run --rm -it --net=host ghcr.io/eclipse-kuksa/kuksa-python-sdk/kuksa-client:latest
```

If the ghcr registry is not easily accessible to you, e.g. if you are a China mainland user, we also made the container images available at quay.io:

```console
docker run --rm -it --net=host quay.io/eclipse-kuksa/kuksa-client:latest
```

You can build a local docker image of the testclient using the [`Dockerfile`](../kuksa-client/Dockerfile).
The Dockerfile needs to be built from the repo root directory.


```console
cd /some/dir/kuksa-python-sdk/
docker build -f kuksa-client/Dockerfile -t kuksa-client:latest .
Expand All @@ -26,5 +31,6 @@ docker run --rm -it --net=host kuksa-client:latest --help
```

Notes:

- `--rm` ensures we do not keep the docker container lying around after closing kuksa-client and `--net=host` makes sure you can reach locally running kuksa.val-server or kuksa-val docker with port forwarding on the host using the default `127.0.0.1` address.
- CLI arguments that follow image name (e.g. `kuksa-client:latest`) will be passed through to kuksa-client entry point (e.g. `--help`).