Accepting request 904004 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/904004 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/containerized-data-importer?expand=0&rev=8
This commit is contained in:
commit
37c2f251c6
@ -1,23 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
distro=$(rpm --eval '%{?sle_version}:%{?is_opensuse}%{!?is_opensuse:0}')
|
TAGPREFIX=_TAGPREFIX_
|
||||||
case "${distro}" in
|
LABELPREFIX=_LABELPREFIX_
|
||||||
150200:0)
|
REGISTRY=_REGISTRY_
|
||||||
TAGPREFIX=suse/sles/15.2
|
PKG_VERSION=_PKG_VERSION_
|
||||||
LABELPREFIX=com.suse.kubevirt
|
PKG_RELEASE=_PKG_RELEASE_
|
||||||
REGISTRY=registry.suse.com
|
|
||||||
;;
|
|
||||||
150300:0)
|
|
||||||
TAGPREFIX=suse/sles/15.3
|
|
||||||
LABELPREFIX=com.suse.kubevirt
|
|
||||||
REGISTRY=registry.suse.com
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
TAGPREFIX=kubevirt
|
|
||||||
LABELPREFIX=org.opensuse.kubevirt
|
|
||||||
REGISTRY=registry.opensuse.org
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -n "${pkg}" ]; then
|
if [ -n "${pkg}" ]; then
|
||||||
if rpm -q ${pkg}; then
|
if rpm -q ${pkg}; then
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 30 05:36:37 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
||||||
|
|
||||||
|
- Generate meta info for containers during rpm build
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jun 14 06:05:08 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
Mon Jun 14 06:05:08 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
||||||
|
|
||||||
|
@ -133,20 +133,39 @@ tar --strip-components=1 -xf %{S:0}
|
|||||||
# If 'kubevirt_registry_path' is not specified, the standard publish location for
|
# If 'kubevirt_registry_path' is not specified, the standard publish location for
|
||||||
# SLE and openSUSE-based containers is used.
|
# SLE and openSUSE-based containers is used.
|
||||||
#
|
#
|
||||||
%if "%{?kubevirt_registry_path}" == ""
|
distro='%{?sle_version}:%{?is_opensuse}%{!?is_opensuse:0}'
|
||||||
distro='%{?sle_version}:%{is_opensuse}'
|
|
||||||
case "${distro}" in
|
case "${distro}" in
|
||||||
150200:0)
|
150200:0)
|
||||||
reg_path='registry.suse.com/suse/sles/15.2' ;;
|
tagprefix=suse/sles/15.2
|
||||||
|
labelprefix=com.suse.kubevirt
|
||||||
|
registry=registry.suse.com
|
||||||
|
;;
|
||||||
150300:0)
|
150300:0)
|
||||||
reg_path='registry.suse.com/suse/sles/15.3' ;;
|
tagprefix=suse/sles/15.3
|
||||||
|
labelprefix=com.suse.kubevirt
|
||||||
|
registry=registry.suse.com
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
reg_path='registry.opensuse.org/kubevirt' ;;
|
tagprefix=kubevirt
|
||||||
|
labelprefix=org.opensuse.kubevirt
|
||||||
|
registry=registry.opensuse.org
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
%if "%{?kubevirt_registry_path}" == ""
|
||||||
|
reg_path="${registry}/${tagprefix}"
|
||||||
%else
|
%else
|
||||||
reg_path='%{kubevirt_registry_path}'
|
reg_path='%{kubevirt_registry_path}'
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
sed -i"" \
|
||||||
|
-e "s#_TAGPREFIX_#${tagprefix}#g" \
|
||||||
|
-e "s#_LABELPREFIX_#${labelprefix}#g" \
|
||||||
|
-e "s#_REGISTRY_#${registry}#g" \
|
||||||
|
-e "s#_PKG_VERSION_#%{version}#g" \
|
||||||
|
-e "s#_PKG_RELEASE_#%{release}#g" \
|
||||||
|
%{S:1}
|
||||||
|
|
||||||
export GOPATH=%{_builddir}/go
|
export GOPATH=%{_builddir}/go
|
||||||
export GOFLAGS="-buildmode=pie -mod=vendor"
|
export GOFLAGS="-buildmode=pie -mod=vendor"
|
||||||
env \
|
env \
|
||||||
|
Loading…
Reference in New Issue
Block a user