Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 8422c1f

Browse files
committed
Change kuksa-client version handling
Does the following: - For Docker copy whole repo so we get the expected version from tag (previously always 0.1.6) - Using 0.1.6 as default version does not make sense, 0.0.0 works better to show that version lookup failed - Tag pattern seems to be difficult to get correct, it always complain and seems to have no effect - Aligning grpcio-tools version with what is defined in setup.cfg The reason is that all docker build on master previously got v0.1.6 except possible if that specific version was tagged, which gives odd behavior if downloading kuksa-client:master
1 parent 58dd5d1 commit 8422c1f

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

.github/workflows/kuksa-client.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434

3535
steps:
3636
- uses: actions/checkout@v3
37+
with:
38+
# Fetch everything to get tags working as expected
39+
fetch-depth: 0
3740
- name: Docker meta
3841
id: meta
3942
uses: docker/metadata-action@v4
@@ -48,15 +51,15 @@ jobs:
4851
type=semver,pattern={{version}}
4952
type=semver,pattern={{major}}.{{minor}}
5053
type=semver,pattern={{major}}
51-
52-
# only needed for runners without buildx setup, will be slow
54+
55+
# only needed for runners without buildx setup, will be slow
5356
#- name: Set up QEMU
5457
# uses: docker/setup-qemu-action@v2
55-
58+
5659
#- name: Set up Docker Buildx
5760
# id: buildx
5861
# uses: docker/setup-buildx-action@v2
59-
62+
6063
- name: Log in to the Container registry
6164
if: needs.checkrights.outputs.have_secrets == 'true'
6265
uses: docker/#-action@v2
@@ -94,7 +97,7 @@ jobs:
9497
push: false
9598
tags: "ttl.sh/kuksa.val/kuksa-client-${{github.sha}}"
9699
labels: ${{ steps.meta.outputs.labels }}
97-
100+
98101

99102
kuksa-client-test:
100103
runs-on: ubuntu-latest
@@ -118,4 +121,3 @@ jobs:
118121
cd kuksa-client
119122
pip install --upgrade build
120123
python -m build
121-

kuksa-client/Dockerfile

+3-4
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@
1010

1111
FROM python:3.10-alpine as build
1212
RUN apk update && apk add git alpine-sdk linux-headers
13-
COPY kuksa-client /kuksa.val/kuksa-client/
14-
COPY kuksa_certificates /kuksa.val/kuksa_certificates/
15-
COPY proto/kuksa/val/v1/*.proto /kuksa.val/kuksa-client/kuksa/val/v1/
16-
WORKDIR /kuksa.val/kuksa-client
1713
RUN pip install --upgrade pip build
14+
# We must copy the whole repository otherwise version lookup by tag would not work
15+
COPY . /kuksa.val/
16+
WORKDIR /kuksa.val/kuksa-client
1817
RUN rm -rf dist
1918
RUN python3 -m build
2019
RUN mkdir /kuksa-client

kuksa-client/pyproject.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[build-system]
22
requires = [
3-
"grpcio-tools>=1.46.0",
3+
"grpcio-tools>=1.54.2",
44
"setuptools>=42",
55
"setuptools-git-versioning",
66
"wheel",
77
]
88
build-backend = "setuptools.build_meta"
99

1010
[tool.setuptools-git-versioning]
11-
starting_version = "0.1.6"
12-
tag_filter = "[0-9]+.[0-9]+.[0-9]+"
11+
# Starting version is just a dummy value that never shall be used in CI
12+
starting_version = "0.0.0"
1313

1414
[tool.pylint.design]
1515
max-args = 8

0 commit comments

Comments
 (0)