Commit 1a39afe6 authored by Guillaume Pasero's avatar Guillaume Pasero

CI: prototype on rh7

parent 9fa6575f
Pipeline #6099 failed with stage
in 1 minute and 47 seconds
variables:
BUILD_ENV_REGISTRY: $CI_REGISTRY/gpasero/wasp
stages:
- container
- build
# ---------------------------- fast pipeline ----------------------------------
build-env-centos7:
stage: container
image:
name: gcr.io/kaniko-project/executor:debug-v0.16.0
entrypoint: [""]
tags:
- docker
before_script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}"
> /kaniko/.docker/config.json
script:
- /kaniko/executor --cleanup
--cache=true
--cache-repo=$CI_REGISTRY_IMAGE/wasp-env-centos7-cache
--verbosity warn
--dockerfile $CI_PROJECT_DIR/CI/RH7/Dockerfile
--context $CI_PROJECT_DIR/CI/RH7
--destination $CI_REGISTRY_IMAGE/wasp-env-centos7:latest
only:
refs:
- ci
changes:
- CI/RH7/*
build-centos7:
stage: build
image: $CI_REGISTRY_IMAGE/wasp-env-centos7:latest
tags:
- docker
script:
- echo $CI_COMMIT_SHA > sha1.txt
- mkdir build
- cd build
- cmake -GNinja -DCMAKE_PREFIX_PATH=/opt/otb -DCMAKE_CXX_FLAGS=-Wl,--as-needed ../
- ninja
FROM centos:7
LABEL VERSION="1.0" ARCHITECTURE="amd64"
LABEL MAINTAINER "WASP development team"
ADD yum.conf /etc/yum.conf
RUN yum -y update; yum clean all
RUN yum -y install epel-release centos-release-scl
RUN yum -y install \
bzip2 \
devtoolset-7 \
doxygen \
file \
libffi-devel \
libXcursor libXcursor-devel \
libXi libXi-devel \
libXinerama libXinerama-devel \
libXrandr libXrandr-devel \
mesa-libGL mesa-libGL-devel \
mesa-libGLU mesa-libGLU-devel \
ninja-build \
patch \
patchelf \
rclone \
rh-git218 \
rh-python36 \
wget \
&& yum clean all
# Install cmake 3.14
RUN cd /tmp \
&& wget -nv https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz \
&& tar -xzf cmake-3.14.0-Linux-x86_64.tar.gz \
&& cp -R cmake-3.14.0-Linux-x86_64/* /usr/local/ \
&& rm -rf cmake-3.14.0-Linux-x86_64*
# ADD rclone.conf /root/.config/rclone/
ENV IMAGE_NAME=rh7
SHELL ["/usr/bin/scl", "enable", "devtoolset-7", "rh-git218", "rh-python36"]
# Install python deps
RUN python3 -m pip install \
nose \
numpy \
pylint
# Install OTB
RUN cd /opt \
&& wget -nv https://www.orfeo-toolbox.org/packages/archives/OTB/OTB-7.1.0-Linux64.run \
&& chmod +x OTB-7.1.0-Linux64.run \
&& ./OTB-7.1.0-Linux64.run --target /opt/otb \
&& source /opt/otb/otbenv.profile \
&& ctest -S /opt/otb/share/otb/swig/build_wrapping.cmake -VV \
&& rm OTB-7.1.0-Linux64.run
ENV LD_LIBRARY_PATH=/opt/otb/lib:$LD_LIBRARY_PATH \
OTB_APPLICATION_PATH=/opt/otb/lib/otb/applications:$OTB_APPLICATION_PATH \
PATH=/opt/otb/bin/:$PATH \
PYTHONPATH=/opt/otb/lib/python:$PYTHONPATH \
GDAL_DATA=/opt/otb/share/gdal \
GEOTIFF_CSV=/opt/otb/share/epsg_csv
ENTRYPOINT ["scl", "enable", "devtoolset-7", "rh-git218", "rh-python36", "--"]
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=0
obsoletes=0
gpgcheck=0
plugins=0
installonly_limit=5
exclude=*.i?86 *.i686
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