Commit 7b8c3aa3 authored by Garcia's avatar Garcia
Browse files

Add Docker/Jenkins support

parent 0b45ce48
Loading
Loading
Loading
Loading

.jenkins.sh

0 → 100644
+14 −0
Original line number Diff line number Diff line
#!/bin/bash

set -vx

set -e

cd "$(dirname "$0")"

run_dir="$(pwd)"

cd docker

./build-container.sh
./run-container.sh "${run_dir}"
+4 −4
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>NG112</name>
	<name>STF549_ng112</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
			<name>org.eclipse.titan.designer.core.TITANBuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.sirius.nature.modelingproject</nature>
		<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
		<nature>org.eclipse.titan.designer.core.TITANNature</nature>
		<nature>org.eclipse.titan.log.viewer.TitanLogProject</nature>
	</natures>
</projectDescription>

docker/Dockerfile

0 → 100644
+98 −0
Original line number Diff line number Diff line
#FROM gcc:latest
FROM ubuntu:16.04

MAINTAINER STF549

LABEL description="STF549 Docker Image"

ENV TERM=linux
ENV HOSTNAME docker-titan-STF549

ARG USERNAME
ARG PASSWORD

RUN echo "docker-titan" > /etc/hostname \
    && DEBIAN_FRONTEND=noninteractive apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y \
    && DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:webupd8team/java \
    && DEBIAN_FRONTEND=noninteractive apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt full-upgrade \
    && DEBIAN_FRONTEND=noninteractive apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y \
      autoconf \
      bison \
      build-essential \
      cmake \
      curl \
      doxygen \
      emacs \
      expect \
      flex \
      graphviz \
      gcc-7 \
      g++-7 \
      gdb \ 
      git-core \
      gnutls-bin \
      libglib2.0-dev \
      libpcap-dev \
      libgcrypt-dev \
      libncurses5-dev \
      libssl-dev \
      libtool-bin \
      libtool \
      libwireshark-dev \
      libxml2-dev \
      lsof \
      ntp \
      pkg-config \
      qt5-default \
      qtmultimedia5-dev \
      libqt5svg5-dev \
      subversion \
      sudo \
      sshpass \
      tcpdump \
      texlive-font-utils \
      tshark \
      valgrind \
      vsftpd \
      xutils-dev \ 
      tree \
      unzip \
      wget \
    && apt-get autoremove \
    && apt-get autoclean \
    && useradd --create-home --shell /bin/bash stf549 \
    && echo "stf549:stf549" | chpasswd \
    && adduser stf549 sudo \
    && su - stf549 \
    && cd /home/stf549 \
    && mkdir -p bin lib include tmp frameworks docs \
    && git clone http://forge.etsi.org/gitlab/emergency-communications/NG112.git STF549_Ng112 \
    && cp /home/stf549/STF549_Ng112/scripts/devenv.bash.ubuntu /home/stf549/devenv.bash \
    && export HOME=/home/stf549 \
    && . /home/stf549/devenv.bash \
    && cd /home/stf549/frameworks \
    && git clone https://github.com/vlm/asn1c.git asn1c \
    && cd ./asn1c \
        && test -f configure || autoreconf -iv \
        && ./configure \
        && make && make install \
    && cd /home/stf549/tmp \
    && echo "" >> /etc/profile \
    && echo "export HOME=/home/stf549" >> /etc/profile \
    && echo "export LD_LIBRARY_PATH=/home/stf549/TriesAndDelete/etsi_its/lib:$LD_LIBRARY_PATH" >> /etc/profile \
    && echo "export PATH=/home/stf549/bin:$PATH" >> /etc/profile \
    && echo "cd /home/stf549" >> /etc/profile \
    && echo ". ./devenv.bash" >> /etc/profile \
    && cd /home/stf549/STF549_Ng112/scripts \
    && ./build_titan.bash \
    && cd /home/stf549 \
    && . /home/stf549/devenv.bash \
    && cd /home/stf549/STF549_Ng112/scripts \
    && ./update_emcom_project.bash 

CMD ["/bin/bash"]

# That's all Floks
+15 −0
Original line number Diff line number Diff line
#!/bin/bash
#set -e
set -vx

DOCKER_FILE=./Dockerfile
if [ -f ${DOCKER_FILE} ]
then
    docker build --tag stf549_ng112 --force-rm --build-arg USERNAME=${USERNAME} --build-arg PASSWORD=${PASSWORD} .
    docker image ls -a
    docker inspect stf549_ng112:latest
else
    exit -2
fi

exit 0
+0 −0

Empty file added.

Loading