Jimmy Berry 4bc92ac0c1 dist/ci: rework spec.sh as obs-build-target using osc build.
Instead of performing a slim rpm build and check directly inside the
container a proper build is performed using `osc build`. The target
package is checked out the _service file pointed at the local copy
and then `osc service disabledrun` before building.
2017-10-19 21:58:49 -05:00

30 lines
837 B
Docker

# https://docs.docker.com/engine/reference/builder/
# Used for TEST_SUITE=distribution and deployment to OBS.
FROM opensuse:tumbleweed
MAINTAINER Jimmy Berry <jberry@suse.com>
# https://github.com/openSUSE/obs-service-set_version/issues/44 python-packaging
# git for extracting remote, but a more generalized approach would be nice
RUN zypper -n ref && zypper -n dup && zypper -n install \
build \
git \
obs-service-* \
osc \
python-packaging \
sudo
# `osc build` directories that are effective to cache:
# - /var/tmp/build-root
# - /var/tmp/osbuild-packagecache
VOLUME /var/tmp
WORKDIR /usr/src
RUN mkdir -p /usr/src/target
COPY . /usr/src/target
# Already included in target, but simulate separate container image.
ADD dist/ci/obs-build-target /usr/bin/
ADD dist/ci/obs-deploy /usr/bin/
ADD dist/ci/osc-init /usr/bin/