Loading .gitlab-ci.yml +2 −1 Original line number Diff line number Diff line Loading @@ -15,3 +15,4 @@ Build api-tests docker image: rules: - changes: - api-tests/Dockerfile - api-tests/* No newline at end of file api-tests/Dockerfile +13 −8 Original line number Diff line number Diff line Loading @@ -24,36 +24,41 @@ RUN useradd --create-home --shell /bin/bash --user-group etsi --groups sudo \ && adduser etsi sudo \ && echo "etsi ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers RUN DEBIAN_FRONTEND=noninteractive \ && mkdir -p /home/etsi/dev/scripts \ && cd /home/etsi/dev/scripts RUN DEBIAN_FRONTEND=noninteractive \ && mkdir -p /home/etsi/dev/robot \ && cd /home/etsi/dev/robot RUN git config --global --add safe.directory /home/etsi/dev/robot #RUN pip3 install robotframework ADD requirements.txt /home/etsi/dev/robot/ ADD extensions /home/etsi/dev/robot/extensions ADD requirements.txt /home/etsi/dev/scripts/ ADD extensions /home/etsi/dev/scripts/extensions RUN ls /home/etsi/dev/robot RUN ls /home/etsi/dev/scripts #To avoid to use the cache when new commits are available ADD "https://forge.etsi.org/rep/api/v4/projects/224/repository/branches/master" /tmp/devalidateCache RUN DEBIAN_FRONTED=noninteractive \ cd /home/etsi/dev/ \ mkdir -p build \ && git clone https://forge.etsi.org/rep/forge-tools/robot2doc.git \ && cd robot2doc \ && pip3 install -r requirements.txt \ && python3 -m pip install -e . RUN DEBIAN_FRONTEND=noninteractive \ && cd /home/etsi/dev/robot \ && cd /home/etsi/dev/scripts \ && pip3 install -r requirements.txt ADD scripts /home/etsi/dev/robot/scripts ADD scripts /home/etsi/dev/scripts RUN chmod +x /home/etsi/dev/robot/scripts/* RUN chmod +x /home/etsi/dev/scripts/* CMD tail -f /dev/null Loading api-tests/run-container.sh +1 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ mkdir -p build echo "Using git branch $2" docker run -v "$(pwd):/home/etsi/dev/robot" stf583-rf-validation:miguel "bash" \ -c "/home/etsi/dev/robot/scripts/validate.sh $2" -c "/home/etsi/dev/scripts/validate.sh $2" ret=$? Loading api-tests/scripts/validate.sh +3 −3 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ done echo "Using git branch $1" mkdir -p /home/etsi/dev/build cd /home/etsi/dev/build mkdir -p /home/etsi/dev/robot/build cd /home/etsi/dev/robot/build rm -r -v * if [[ $1 =~ ^(origin\/){0,1}([0-9]{1}(\.[0-9]){2}){1}-dev$ || $1 =~ ^(origin\/){0,1}([0-9]{1})(\.[0-9]){2,10}$ || $1 =~ ^(origin\/){0,1}master$ || $1 =~ ^(origin\/){0,1}Release-([0-9]{1})$ ]]; then Loading @@ -28,7 +28,7 @@ if [[ $1 =~ ^(origin\/){0,1}([0-9]{1}(\.[0-9]){2}){1}-dev$ || $1 =~ ^(origin\/){ echo "++++ Try to generate docs for branch $1" cd /home/etsi/dev/robot2doc/robot2doc python3 create_sols.py ../../robot 'local' ../../build python3 create_sols.py ../../robot 'local' ../../robot/build res2=$? else res2=0 echo "++++ Not generating docs for branch $1" Loading Loading
.gitlab-ci.yml +2 −1 Original line number Diff line number Diff line Loading @@ -15,3 +15,4 @@ Build api-tests docker image: rules: - changes: - api-tests/Dockerfile - api-tests/* No newline at end of file
api-tests/Dockerfile +13 −8 Original line number Diff line number Diff line Loading @@ -24,36 +24,41 @@ RUN useradd --create-home --shell /bin/bash --user-group etsi --groups sudo \ && adduser etsi sudo \ && echo "etsi ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers RUN DEBIAN_FRONTEND=noninteractive \ && mkdir -p /home/etsi/dev/scripts \ && cd /home/etsi/dev/scripts RUN DEBIAN_FRONTEND=noninteractive \ && mkdir -p /home/etsi/dev/robot \ && cd /home/etsi/dev/robot RUN git config --global --add safe.directory /home/etsi/dev/robot #RUN pip3 install robotframework ADD requirements.txt /home/etsi/dev/robot/ ADD extensions /home/etsi/dev/robot/extensions ADD requirements.txt /home/etsi/dev/scripts/ ADD extensions /home/etsi/dev/scripts/extensions RUN ls /home/etsi/dev/robot RUN ls /home/etsi/dev/scripts #To avoid to use the cache when new commits are available ADD "https://forge.etsi.org/rep/api/v4/projects/224/repository/branches/master" /tmp/devalidateCache RUN DEBIAN_FRONTED=noninteractive \ cd /home/etsi/dev/ \ mkdir -p build \ && git clone https://forge.etsi.org/rep/forge-tools/robot2doc.git \ && cd robot2doc \ && pip3 install -r requirements.txt \ && python3 -m pip install -e . RUN DEBIAN_FRONTEND=noninteractive \ && cd /home/etsi/dev/robot \ && cd /home/etsi/dev/scripts \ && pip3 install -r requirements.txt ADD scripts /home/etsi/dev/robot/scripts ADD scripts /home/etsi/dev/scripts RUN chmod +x /home/etsi/dev/robot/scripts/* RUN chmod +x /home/etsi/dev/scripts/* CMD tail -f /dev/null Loading
api-tests/run-container.sh +1 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ mkdir -p build echo "Using git branch $2" docker run -v "$(pwd):/home/etsi/dev/robot" stf583-rf-validation:miguel "bash" \ -c "/home/etsi/dev/robot/scripts/validate.sh $2" -c "/home/etsi/dev/scripts/validate.sh $2" ret=$? Loading
api-tests/scripts/validate.sh +3 −3 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ done echo "Using git branch $1" mkdir -p /home/etsi/dev/build cd /home/etsi/dev/build mkdir -p /home/etsi/dev/robot/build cd /home/etsi/dev/robot/build rm -r -v * if [[ $1 =~ ^(origin\/){0,1}([0-9]{1}(\.[0-9]){2}){1}-dev$ || $1 =~ ^(origin\/){0,1}([0-9]{1})(\.[0-9]){2,10}$ || $1 =~ ^(origin\/){0,1}master$ || $1 =~ ^(origin\/){0,1}Release-([0-9]{1})$ ]]; then Loading @@ -28,7 +28,7 @@ if [[ $1 =~ ^(origin\/){0,1}([0-9]{1}(\.[0-9]){2}){1}-dev$ || $1 =~ ^(origin\/){ echo "++++ Try to generate docs for branch $1" cd /home/etsi/dev/robot2doc/robot2doc python3 create_sols.py ../../robot 'local' ../../build python3 create_sols.py ../../robot 'local' ../../robot/build res2=$? else res2=0 echo "++++ Not generating docs for branch $1" Loading