X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=test-docker%2Ftest-gen-local.sh;fp=test-docker%2Ftest-gen-local.sh;h=0b9c73e9a9a1e35d22fafe00c6bdd3fcd83749cd;hb=57dadcfd0fcf3c8e933602e2fb57f32658d9c845;hp=0000000000000000000000000000000000000000;hpb=a85c54de5c5d1f951b27082a21e5654e15712529;p=osm%2FRO.git diff --git a/test-docker/test-gen-local.sh b/test-docker/test-gen-local.sh new file mode 100755 index 00000000..0b9c73e9 --- /dev/null +++ b/test-docker/test-gen-local.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +## +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# For those usages not covered by the Apache License, Version 2.0 please +# contact with: nfvlabs@tid.es +## + +# Generates a docker image base on Dockerfile-local and update a running docker stack with the generated image + +HERE=$(dirname $(readlink -f ${BASH_SOURCE[0]})) +export RO_BASE=$(dirname $HERE) + +echo -e "\n\n[STAGE 1] Building docker image opensourcemano/ro:py3_local based on debian packages" +docker build $RO_BASE -f $RO_BASE/Dockerfile-local -t opensourcemano/ro:py3_local || + ! echo "error generating local dockerfile" >&2 || exit 1 +sleep 2 +docker service update osm_ro --force --image opensourcemano/ro:py3_local +sleep 2 +docker container prune -f +docker service logs osm_ro