Commit 4226ccd4 authored by Michele Carignani's avatar Michele Carignani
Browse files

bugfix

parent 8f16a870
......@@ -12,4 +12,6 @@ run_dir="$(pwd)"
bash ./scripts/build-container.sh
bash ./scripts/run-container.sh "${run_dir}"
exit $?
ret=$?
echo "Final validation result: $ret"
exit $ret
......@@ -10,25 +10,25 @@ if [ -f ${DOCKER_FILE} ]
then
#check and build stf583-rf-validation image
DOCKER_ID=`docker ps -a | grep -e stf583-rf-validation | awk '{ print $1 }'`
if [ ! -z "${DOCKER_ID}" ]
then
docker rm --force stf583-rf-validation
fi
docker build --tag stf583-rf-validation --force-rm -f ${DOCKER_FILE} .
# if [ ! -z "${DOCKER_ID}" ]
# then
# docker rm --force stf583-rf-validation
# fi
docker build --tag stf583-rf-validation -f ${DOCKER_FILE} .
if [ "$?" != "0" ]
then
echo "Docker build failed: $?"
exit -1
fi
docker image ls -a
docker inspect stf583-rf-validation:latest
if [ "$?" != "0" ]
then
echo "Docker inspect failed: $?"
exit -2
fi
else
exit -3
# docker image ls -a
# docker inspect stf583-rf-validation:latest
# if [ "$?" != "0" ]
# then
# echo "Docker inspect failed: $?"
# exit -2
# fi
#else
# exit -3
fi
# That's all Floks
......
......@@ -7,11 +7,8 @@ LABEL description="SFT583 Robot Framework Docker Image"
ENV TERM=xterm
ENV HOSTNAME docker-robot-STF583
ARG ssh_prv_key
RUN DEBIAN_FRONTEND=noninteractive apt update \
&& apt install python3 git -y \
&& apt install python3-pip -y \
......@@ -34,16 +31,18 @@ RUN DEBIAN_FRONTEND=noninteractive \
&& mkdir -p /home/etsi/dev/robot \
&& cd /home/etsi/dev/robot
RUN pip3 install robotframework
RUN DEBIAN_FRONTEND=noninteractive \
&& cd /home/etsi/dev/robot \
&& git clone https://github.com/etsi-cti-admin/robotframework-mockserver
ADD . /home/etsi/dev/robot
RUN pip3 install robotframework
RUN DEBIAN_FRONTEND=noninteractive \
&& cd /home/etsi/dev/robot \
&& pip3 install -r requirements.txt \
&& chmod +x /home/etsi/dev/robot/scripts/* \
&& git clone https://github.com/etsi-cti-admin/robotframework-mockserver \
&& cd robotframework-mockserver \
&& patch -p1 < ../extensions/mockserverlibrary.patch \
&& python3 -m pip install -e .
......
......@@ -5,10 +5,10 @@
#set -e
#set -vx
docker run stf583-rf-validation:latest "/bin/bash" \
-c "cd /home/etsi/dev/robot \
&& bash scripts/validate.sh "
docker run stf583-rf-validation:latest "bash" \
-c "/home/etsi/dev/robot/scripts/validate.sh"
# That's all Floks
exit $?
ret=$?
exit $ret
......@@ -2,12 +2,19 @@
#
# Validate syntax and keywords existance in each Robot file
cd /home/etsi/dev/robot/
res=0
for i in */*/*.robot ; do
[[ "$i" != *"Keywords.robot"* && "$i" != *"Keyword.robot"* ]] && \
(echo "++++ Dryrun $i" && \
robot --dryrun --output NONE --report NONE --log NONE $i || \
(echo "++++ Issues in file $i" && res=1));
if [[ "$i" != *"Keywords.robot"* && "$i" != *"Keyword.robot"* ]] ; then
echo "++++ Dryrun file $i"
msg=$(robot --dryrun --output NONE --report NONE --log NONE $i 2>&1)
if [ $? != 0 ] ; then
echo "++++ Issues found in file $i"
echo "$msg"
res=1
fi
fi
done
exit $res
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