X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=blueprints%2Fiotgateway%2Fplaybooks%2Froles%2Fel_opc-au%2Ffiles%2Fdeploy%2Fopc-au_client%2Fbuild.sh;fp=blueprints%2Fiotgateway%2Fplaybooks%2Froles%2Fel_opc-au%2Ffiles%2Fdeploy%2Fopc-au_client%2Fbuild.sh;h=188856567da91243ab7d066bf4b826de059dc78b;hb=68b365b097590f156f08b840fac9953e1e93f379;hp=0000000000000000000000000000000000000000;hpb=1516141fcce8e2b27c741fa17f7f0d62919084bc;p=eliot.git diff --git a/blueprints/iotgateway/playbooks/roles/el_opc-au/files/deploy/opc-au_client/build.sh b/blueprints/iotgateway/playbooks/roles/el_opc-au/files/deploy/opc-au_client/build.sh new file mode 100644 index 0000000..1888565 --- /dev/null +++ b/blueprints/iotgateway/playbooks/roles/el_opc-au/files/deploy/opc-au_client/build.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +############################################################################## +# Copyright (c) 2019 Huawei Tech and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +set -o errexit + +# set the docker name and docker tag when you build +DOCKER_NAME= +DOCKER_TAG= + +export ELIOT_DIR=$(cd $(dirname $0); pwd) +export WORK_DIR=$ELIOT_DIR/work +export CMAKE_URL=https://github.com/Kitware/CMake/releases/download/v3.15.2/cmake-3.15.2.tar.gz +export SCONS_PPA_URL=http://repo.okay.com.mx/centos/7/x86_64/release//scons-2.3.0-1.el7.centos.noarch.rpm +export GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py +export OPCUA_REPO=https://github.com/edgexfoundry-holding/protocol-opcua-c.git +export DOCKER_NAME=${DOCKER_NAME:-"eliot/opc-ua-client"} +export DOCKER_TAG=${DOCKER_TAG:-"latest"} + + +rm -rf $WORK_DIR +mkdir -p $WORK_DIR + +cd $WORK_DIR +wget $CMAKE_URL +wget $SCONS_PPA_URL +wget $GET_PIP_URL +git clone $OPCUA_REPO + +cd $ELIOT_DIR +docker build ./ -t $DOCKER_NAME:$DOCKER_TAG