Using tar_scm service for kyverno creates funny archive name and wrong version
Hi all, I tried to package the kyverno CLI and kubectl plugin from https://github.com/kyverno/kyverno I used the same _service file structure that I used for lots of go-based packages recently: --- citation start --- <services> <service name="tar_scm" mode="disabled"> <param name="url">https://github.com/kyverno/kyverno</param> <param name="scm">git</param> <param name="exclude">.git</param> <param name="revision">v1.6.0</param> <param name="versionformat">@PARENT_TAG@</param> <param name="changesgenerate">enable</param> <param name="versionrewrite-pattern">v(.*)</param> </service> <service name="set_version" mode="disabled"> <param name="basename">kyverno</param> </service> <service name="recompress" mode="disabled"> <param name="file">*.tar</param> <param name="compression">gz</param> </service> <service name="go_modules" mode="disabled"> <param name="archive">kyverno-1.6.0.tar.gz</param> </service> </services> --- citation end--- For some reason, I end up having an archive called kyverno-helm-chart-2.2.0.tar.gz, which is neither the name I expected nor the version that I specified. Adding a filename parameter to the tar_scm service did not help. Nor does switching to obs_scm (which is not supported by the go modules service). I guess that this is caused by upstream having multiple things (code for docker images, CLI, helm chart, ...) in one repo and only one tag for each release. Nevertheless it would be nice if I could get this solved. Any way to tell tar_scm to use the right name and version? Thanks in advance! Kind Regards, Johannes P.S.: I commited both _service and spec to https://build.opensuse.org/package/show/home:ojkastl_buildservice:Branch_dev... -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Hello, Add: <param name="match-tag">v*</param> The helm-chart-2.2.0 is a tag that is tagging the same revision as v1.6.0. With the match-tag, you filter only the v* tags Cheers Fridrich On 18/02/2022 09:36, Johannes Kastl wrote:
Hi all,
I tried to package the kyverno CLI and kubectl plugin from https://github.com/kyverno/kyverno
I used the same _service file structure that I used for lots of go-based packages recently:
--- citation start --- <services> <service name="tar_scm" mode="disabled"> <param name="url">https://github.com/kyverno/kyverno</param> <param name="scm">git</param> <param name="exclude">.git</param> <param name="revision">v1.6.0</param> <param name="versionformat">@PARENT_TAG@</param> <param name="changesgenerate">enable</param> <param name="versionrewrite-pattern">v(.*)</param> </service> <service name="set_version" mode="disabled"> <param name="basename">kyverno</param> </service> <service name="recompress" mode="disabled"> <param name="file">*.tar</param> <param name="compression">gz</param> </service> <service name="go_modules" mode="disabled"> <param name="archive">kyverno-1.6.0.tar.gz</param> </service> </services> --- citation end---
For some reason, I end up having an archive called kyverno-helm-chart-2.2.0.tar.gz, which is neither the name I expected nor the version that I specified.
Adding a filename parameter to the tar_scm service did not help. Nor does switching to obs_scm (which is not supported by the go modules service).
I guess that this is caused by upstream having multiple things (code for docker images, CLI, helm chart, ...) in one repo and only one tag for each release. Nevertheless it would be nice if I could get this solved.
Any way to tell tar_scm to use the right name and version?
Thanks in advance!
Kind Regards, Johannes
P.S.: I commited both _service and spec to https://build.opensuse.org/package/show/home:ojkastl_buildservice:Branch_dev...
On 18.02.22 at 11:02 Fridrich Strba wrote:
Hello,
Add:
<param name="match-tag">v*</param>
The helm-chart-2.2.0 is a tag that is tagging the same revision as v1.6.0. With the match-tag, you filter only the v* tags
Thanks, that did the trick...
$ osc service disabledrun Cloning into '/home/Buildservice/Branches/Branch_devel_kubic/kyverno/kyverno'... cf6289f49add478d40211e644b396b2b6e7e02ae merge: origin/v1.6.0 - not something we can merge Already up to date. cf6289f49add478d40211e644b396b2b6e7e02ae Compressed kyverno-1.6.0.tar to kyverno-1.6.0.tar.gz INFO:obs-service-go_modules:Using archive kyverno-1.6.0.tar.gz INFO:obs-service-go_modules:Running OBS Source Service: obs-service-go_modules INFO:obs-service-go_modules:Extracting kyverno-1.6.0.tar.gz to /home/Buildservice/Branches/Branch_devel_kubic/kyverno/tmpx9khh2hk.go_modules.service INFO:obs-service-go_modules:Using go.mod found at /home/Buildservice/Branches/Branch_devel_kubic/kyverno/tmpx9khh2hk.go_modules.service/kyverno-1.6.0/go.mod INFO:obs-service-go_modules:go mod download INFO:obs-service-go_modules:go mod verify INFO:obs-service-go_modules:all modules verified INFO:obs-service-go_modules:go mod vendor INFO:obs-service-go_modules:Vendor go.mod dependencies to vendor.tar.gz
Thanks, Fridrich! Kind Regards, Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
participants (2)
-
Fridrich Strba
-
Johannes Kastl