Accepting request 879460 from home:vulyanov:branches:Virtualization

- Use virt-containers-meta script to populate the env

- Fix is_opensuse macro expansion

- Remove debug print from _service script

- Use KUBEVIRTFROM to set the base image
- Rename %%PREFIX%% placeholder to %%TAGPREFIX%%

- Add placeholder vars to be replaced during build

OBS-URL: https://build.opensuse.org/request/show/879460
OBS-URL: https://build.opensuse.org/package/show/Virtualization/cdi-uploadproxy-container?expand=0&rev=3
This commit is contained in:
James Fehlig 2021-03-16 20:14:21 +00:00 committed by Git OBS Bridge
parent e95fed56a2
commit 76453be6d2
3 changed files with 43 additions and 7 deletions

View File

@ -1,23 +1,26 @@
# Defines the tag for OBS and build script builds: # Defines the tag for OBS and build script builds:
#!BuildTag: opensuse/tumbleweed/cdi-uploadproxy:%%PKG_VERSION%% #!BuildTag: %%TAGPREFIX%%/cdi-uploadproxy:%%PKG_VERSION%%
#!BuildTag: opensuse/tumbleweed/cdi-uploadproxy:%%PKG_VERSION%%.%RELEASE% #!BuildTag: %%TAGPREFIX%%/cdi-uploadproxy:%%PKG_VERSION%%.%RELEASE%
# cdi-uploadproxy container image # cdi-uploadproxy container image
FROM opensuse/tumbleweed # KUBEVIRTFROM defined in prjconf, e.g.
# BuildFlags: dockerarg:KUBEVIRTFROM=opensuse/tumbleweed
ARG KUBEVIRTFROM
FROM $KUBEVIRTFROM
# labelprefix=org.opensuse.kubevirt # labelprefix=%%LABELPREFIX%%
PREFIXEDLABEL org.opencontainers.image.title="CDI uploadproxy container" PREFIXEDLABEL org.opencontainers.image.title="CDI uploadproxy container"
PREFIXEDLABEL org.opencontainers.image.description="Upload proxy for the data fetching service for VM container images" PREFIXEDLABEL org.opencontainers.image.description="Upload proxy for the data fetching service for VM container images"
PREFIXEDLABEL org.opencontainers.image.created="%BUILDTIME%" PREFIXEDLABEL org.opencontainers.image.created="%BUILDTIME%"
PREFIXEDLABEL org.opencontainers.image.version="%%PKG_VERSION%%.%RELEASE%" PREFIXEDLABEL org.opencontainers.image.version="%%PKG_VERSION%%.%RELEASE%"
PREFIXEDLABEL org.openbuildservice.disturl="%DISTURL%" PREFIXEDLABEL org.openbuildservice.disturl="%DISTURL%"
PREFIXEDLABEL org.opensuse.reference="opensuse/tumbleweed/cdi-uploadproxy:%%PKG_VERSION%%.%RELEASE%" PREFIXEDLABEL org.opensuse.reference="%%TAGPREFIX%%/cdi-uploadproxy:%%PKG_VERSION%%.%RELEASE%"
RUN zypper update -y && \ RUN zypper update -y && \
zypper install -y \ zypper install -y \
containerized-data-importer-uploadproxy \ containerized-data-importer-uploadproxy \
shadow && \ shadow && \
useradd -u 1001 --create-home -s /bin/bash cdi-uploadproxy useradd -u 1001 --create-home -s /bin/bash cdi-uploadproxy
WORKDIR /home/cdi-uploadproxy WORKDIR /home/cdi-uploadproxy
USER 1001 USER 1001
ENTRYPOINT [ "/usr/bin/virt-cdi-uploadproxy", "-alsologtostderr" ] ENTRYPOINT [ "/usr/bin/virt-cdi-uploadproxy", "-alsologtostderr" ]

View File

@ -6,5 +6,12 @@
<param name="parse-version">patch</param> <param name="parse-version">patch</param>
<param name="package">containerized-data-importer-uploadproxy</param> <param name="package">containerized-data-importer-uploadproxy</param>
</service> </service>
<service mode="buildtime" name="replace_using_env">
<param name="file">Dockerfile</param>
<param name="var">TAGPREFIX</param>
<param name="var">LABELPREFIX</param>
<param name="eval">source /usr/lib/obs/service/meta/virt-containers-meta</param>
<param name="verbose">1</param>
</service>
<service mode="buildtime" name="docker_label_helper"/> <service mode="buildtime" name="docker_label_helper"/>
</services> </services>

View File

@ -1,3 +1,29 @@
-------------------------------------------------------------------
Tue Mar 16 08:40:50 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>
- Use virt-containers-meta script to populate the env
-------------------------------------------------------------------
Tue Mar 16 08:00:10 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>
- Fix is_opensuse macro expansion
-------------------------------------------------------------------
Tue Mar 16 07:07:23 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>
- Remove debug print from _service script
-------------------------------------------------------------------
Mon Mar 15 06:20:49 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>
- Use KUBEVIRTFROM to set the base image
- Rename %%PREFIX%% placeholder to %%TAGPREFIX%%
-------------------------------------------------------------------
Mon Mar 15 06:10:58 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>
- Add placeholder vars to be replaced during build
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Mar 12 09:53:36 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com> Fri Mar 12 09:53:36 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>