TT#29456 Add netscript-jessie Dockerfile

The docker will be used for netscript-unit-test-docker test

Change-Id: I3c41f7aa80fe3d098c89b42d3b6b199ebad7b6b7
changes/34/18534/2
Sergii Kipot 7 years ago
parent 16e31e8eb8
commit 84ddabd00a

@ -0,0 +1,33 @@
# DOCKER_NAME=netscript-jessie
FROM docker.mgm.sipwise.com/sipwise-jessie:latest
# Important! Update this no-op ENV variable when this Dockerfile
# is updated with the current date. It will force refresh of all
# of the base images and things like `apt-get update` won't be using
# old cached versions when the Dockerfile is built.
ENV REFRESHED_AT 2018-01-22
RUN apt-get update && apt-get install --assume-yes git make
RUN echo './t/testrunner' >>/root/.bash_history
WORKDIR /code/
################################################################################
# Instructions for usage
# ----------------------
# When you want to build the base image from scratch
# jump to the next section if you don't want to build yourself!:
#
# % docker build --tag="lua-ngcp-kamailio-jessie" -f t/Dockerfile .
# % docker run --rm -i -t -v $(pwd):/code:rw lua-ngcp-kamailio-jessie:latest bash
#
# Use the existing docker image:
# % docker pull docker.mgm.sipwise.com/lua-ngcp-kamailio-jessie
# NOTE: run the following command from root folder of git repository:
# % docker run --rm -i -t -v $(pwd):/code:rw docker.mgm.sipwise.com/lua-ngcp-kamailio-jessie:latest bash
#
# Inside docker (the command is in history, just press UP button):
# ./t/testrunner
#
################################################################################

@ -0,0 +1,21 @@
#!/bin/bash
# This script is used for running the tests with proper arguments
# from within Jenkins
set -e
set -u
if [ -d /results ] ; then
# Running from Jenkins (RW)
RESULTS="/results"
cd "/code"
else
# Running locally in Docker
RESULTS="./results"
mkdir -p "${RESULTS}"
fi
make
make syntaxcheck
make script_version
Loading…
Cancel
Save