X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fcommon%2Finstall_common;fp=jenkins%2Fcommon%2Finstall_common;h=ef8322bbccd63511a124eb1276febafa86809168;hb=425f8cef392f81356280f6508384ac397aa2eb85;hp=0000000000000000000000000000000000000000;hpb=15f4f2295c6807d857f9b61ce291119a0a46d11f;p=osm%2Fdevops.git diff --git a/jenkins/common/install_common b/jenkins/common/install_common new file mode 100644 index 00000000..ef8322bb --- /dev/null +++ b/jenkins/common/install_common @@ -0,0 +1,50 @@ +# this file is meant to be sourced +# +# Copyright 2017 Sandvine +# +# 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. +# +# + +RELEASE="ReleaseTWO" +REPOSITORY_KEY="OSM%20ETSI%20Release%20Key.gpg" +REPOSITORY="stable" +REPOSITORY_BASE="http://osm-download.etsi.org/repository/osm/debian" + +while getopts ":r:k:u:R:" o; do + case "${o}" in + r) + REPOSITORY=${OPTARG} + ;; + R) + RELEASE=${OPTARG} + ;; + k) + REPOSITORY_KEY=${OPTARG} + ;; + u) + REPOSITORY_BASE=${OPTARG} + ;; + *) + exit 1 + ;; + esac +done + +key_location=$REPOSITORY_BASE/$RELEASE/$REPOSITORY_KEY + +# key pulled from https +[[ "$key_location" =~ https ]] || key_location=${key_location/http/https} +curl $key_location | apt-key add - + +add-apt-repository -y "deb $REPOSITORY_BASE/$RELEASE $REPOSITORY SO UI RO osmclient openvim"