Commit 065d5bf5 authored by Pavel Vainerman's avatar Pavel Vainerman

(CI): added test build

parent 277625c0
Pipeline #2698 failed with stage
in 7 minutes 41 seconds
version: 0.3
project:
name: "uniset2"
apt:
packages:
- libev-devel
- libomniORB-devel
- libpoco-devel
- libsigc++2-devel
- libxml2-devel
- xsltproc
- libcomedi-devel
- libmariadb-devel
- libsqlite3-devel
- libpqxx-devel
- libmosquitto-devel
- librrd-devel
- python-devel
- python-module-distribute
- libomniORB-names
- catch
groups:
builders:
nodes:
sisyphus:
skip_compose: yes
image: x64.sisyphus-builder
apt:
sources:
- "rpm http://ftp.etersoft.ru/pub ALTLinux/Sisyphus/x86_64 classic"
- "rpm http://ftp.etersoft.ru/pub ALTLinux/Sisyphus/noarch classic"
p8:
skip_compose: yes
image: x64.p8-builder
apt:
sources:
- "rpm http://ftp.etersoft.ru/pub ALTLinux/p8/branch/x86_64 classic"
- "rpm http://ftp.etersoft.ru/pub ALTLinux/p8/branch/noarch classic"
\ No newline at end of file
#!/bin/sh
ping -c 3 localhost || exit 1
ccache -c || :
./autogen.sh && ./configure --disable-docs && jmake || exit 1
cd testsuite
make check
MAINTAINER Pavel Vainerman <pv@etersoft.ru>
RUN apt-get update && apt-get -y install etersoft-build-utils ccache gcc-c++ git-core su sudo \
&& rm -rf /usr/share/doc/* \
&& rm -rf /usr/share/man/* \
&& apt-get clean \
&& rm -rf /etc/apt/sources.list.d/* \
&& apt-get update
{% include "base/Dockerfile.basic.tpl" %}
# prepare build user
ARG USER=builder
ARG HOME=/home/$USER
ARG TMPDIR=$HOME/tmp
ARG USER_UID=''
RUN test -n "$USER_UID" && useradd -u $USER_UID builder || useradd builder
RUN control su public
#RUN control sudo public
#RUN echo "wheel: builder" >> /etc/role
# for "basic tests"(used ping)
RUN chmod u+s /bin/ping
# COPY .rpmmacros $HOME/
# COPY .gitconfig $HOME/
RUN mkdir -p $TMPDIR
# RUN chown $USER:$USER $HOME/.rpmmacros $HOME/.gitconfig
RUN chown $USER:$USER $TMPDIR
ENV USER="$USER" TMP="$TMPDIR" TMPDIR="$TMPDIR" GCC_USE_CCACHE=1 CCACHE_DIR="$HOME/ccache" CC=gcc CXX=g++
USER "$USER"
COPY uniset-check.sh /usr/bin/
CMD ["/usr/bin/uniset-check.sh"]
# Version: 0.0.1
FROM alt:p8
{% include "Dockerfile.x64.builder-common.tpl" %}
# Version: 0.0.1
FROM alt:sisyphus
{% include "Dockerfile.x64.builder-common.tpl" %}
variables:
DAAS_IMAGE_POSTFIX: "-${CI_COMMIT_REF_NAME}"
ARTIFACTS_PATH: "artifacts"
stages:
- build
build and test:
stage: build
script:
- daas rpmbuild sisyphus --use-ccache --ccache ${CI_PROJECT_DIR}/ccache uniset-check.sh
- git clean -dxf
- daas rpmbuild --use-ccache --ccache ${CI_PROJECT_DIR}/ccache p8 uniset-check.sh
after_script:
- mkdir -p ${CI_PROJECT_DIR}/${ARTIFACTS_PATH}
- cp -ar ${CI_PROJECT_DIR}/testsuite ${CI_PROJECT_DIR}/${ARTIFACTS_PATH}/
artifacts:
paths:
- ${CI_PROJECT_DIR}/${ARTIFACTS_PATH}/*
when: always
expire_in: 5d
cache:
key: "${CI_PROJECT_NAME}"
paths:
- ${CI_PROJECT_DIR}/ccache
tags:
- uniset-builder
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment