From 7dc46a626fbec4ca58568f1066569fe3fe3b635e Mon Sep 17 00:00:00 2001 From: Michael Dürre Date: Mon, 3 Feb 2020 13:47:39 +0100 Subject: add sdnc-web dist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add osgifree dist for web based content Issue-ID: SDNC-1013 Signed-off-by: Michael Dürre Change-Id: I3964f13cf15479525862c2abddfd154fe9dcabee Former-commit-id: b565c3dc19ab4658db2c86fe2bd6d24072b72944 --- .../sdnc-web/src/main/scripts/TagVersion.groovy | 41 ++++++++++++++ .../sdnc-web/src/main/scripts/configure.sh | 66 ++++++++++++++++++++++ installation/sdnc-web/src/main/scripts/run.sh | 27 +++++++++ 3 files changed, 134 insertions(+) create mode 100644 installation/sdnc-web/src/main/scripts/TagVersion.groovy create mode 100644 installation/sdnc-web/src/main/scripts/configure.sh create mode 100644 installation/sdnc-web/src/main/scripts/run.sh (limited to 'installation/sdnc-web/src/main/scripts') diff --git a/installation/sdnc-web/src/main/scripts/TagVersion.groovy b/installation/sdnc-web/src/main/scripts/TagVersion.groovy new file mode 100644 index 00000000..16880561 --- /dev/null +++ b/installation/sdnc-web/src/main/scripts/TagVersion.groovy @@ -0,0 +1,41 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP CCSDK + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * 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. + * ============LICENSE_END============================================ + * =================================================================== + * + */ + +package org.onap.ccsdk.distribution + + +def versionArray; +if ( project.properties['ccsdk.features.version'] != null ) { + versionArray = project.properties['ccsdk.features.version'].split('\\.'); +} + +if ( project.properties['ccsdk.features.version'].endsWith("-SNAPSHOT") ) { + patchArray = versionArray[2].split('-'); + project.properties['project.docker.latestminortag.version']=versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-latest"; + project.properties['project.docker.latestfulltag.version']=versionArray[0] + '.' + versionArray[1] + '.' + patchArray[0] + "-SNAPSHOT-latest"; + project.properties['project.docker.latesttagtimestamp.version']=versionArray[0] + '.' + versionArray[1] + '.' + patchArray[0] + "-SNAPSHOT-"+project.properties['ccsdk.build.timestamp']; +} else { + project.properties['project.docker.latestminortag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest"; + project.properties['project.docker.latestfulltag.version']=versionArray[0] + '.' + versionArray[1] + '.' + versionArray[2] + "-STAGING-latest"; + project.properties['project.docker.latesttagtimestamp.version']=versionArray[0] + '.' + versionArray[1] + '.' + versionArray[2] + "-STAGING-"+project.properties['ccsdk.build.timestamp']; +} diff --git a/installation/sdnc-web/src/main/scripts/configure.sh b/installation/sdnc-web/src/main/scripts/configure.sh new file mode 100644 index 00000000..b8385fd5 --- /dev/null +++ b/installation/sdnc-web/src/main/scripts/configure.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ONAP : ccsdk distribution web +# ================================================================================ +# Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. +# All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= +### + +# Comment listening on 8080 in nginx.conf as we don't want nginx to listen on any port other than SDNR +sed -i 's/listen/\#listen/g' /opt/bitnami/nginx/conf/nginx.conf + +update_index_html() { + + # Backup the index.html file + cp /opt/bitnami/nginx/html/odlux/index.html /opt/bitnami/nginx/html/odlux/index.html.backup + sed -z 's/