common - fixed some bugs that were letting error messages from check functions leak out on the console
SO & UI -- created directories for these MDGs
Signed-off-by: Jeremy Mordkoff <jeremy.mordkoff@riftio.com>
--- /dev/null
+# Copyright 2016 RIFT.IO Inc
+#
+# 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.
+#
+# sample SETTINGS file
+#
+# 24 June 2016 -- Jeremy Mordkoff -- Genesis
+#
+# this variable holds the name of the container image needed to build or run this product
+export OSM_BASE_IMAGE=ubuntu:16.04
+#
+# this variable holds the name of the container to be used to build a package
+# if this container already exists, the build process can skip the container build
+export OSM_BUILD_CONTAINER=SO-build
+#
+# this variable must be set to allow creating the build container in privileged mode
+# this variable should be removed in the future when no privileged mode is required
+#export OSM_BUILD_CONTAINER_PRIVILEGED=yes
+#
+# this variable holds the name of the container to be used to run a package
+# if this container already exists, the run processes can skip the container build
+export OSM_RUNTIME_CONTAINER=SO-runtime
+#
+# this variable must be set to allow creating the runtime container in privileged mode
+# this variable should be removed in the future when no privileged mode is required
+#export OSM_RUNTIME_CONTAINER_PRIVILEGED=yes
+
--- /dev/null
+#!/bin/bash
+# Copyright 2016 RIFT.IO Inc
+#
+# 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.
+#
+# TEMPLATE script to start a build. This is run inside a container
+#
+# 6 July 2016 -- Jeremy.Mordkoff@riftio.com -- adapted from the riftware version
+#
+
+HERE=$(realpath $(dirname $0))
+OSM_JENKINS=$(dirname $HERE)
+. $OSM_JENKINS/common/all_funcs
+
+# SET YOU MDG repository name here
+export OSM_MDG=SO
+OSM_load_config
+
+
+# Here is an example for how to handle an incremental build
+if [ -d $OSM_MDG ]; then
+ INFO "reusing existing workspace"
+ cd $OSM_MDG
+ git pull
+else
+ INFO "cloning MDG $OSM_MDG from $OSM_GIT_URL/$OSM_MDG"
+ git clone $OSM_GIT_URL/$OSM_MDG
+ cd $OSM_MDG
+fi
+INFO "starting build"
+
+### for start_build
+### put your commands here to
+### build, test and produce coverage reports
+
+RC=0
+
+INFO "done, RC=$RC"
+exit $RC
+
+
--- /dev/null
+# Copyright 2016 RIFT.IO Inc
+#
+# 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.
+#
+# sample SETTINGS file
+#
+# 24 June 2016 -- Jeremy Mordkoff -- Genesis
+#
+# this variable holds the name of the container image needed to build or run this product
+export OSM_BASE_IMAGE=ubuntu:16.04
+#
+# this variable holds the name of the container to be used to build a package
+# if this container already exists, the build process can skip the container build
+export OSM_BUILD_CONTAINER=UI-build
+#
+# this variable must be set to allow creating the build container in privileged mode
+# this variable should be removed in the future when no privileged mode is required
+#export OSM_BUILD_CONTAINER_PRIVILEGED=yes
+#
+# this variable holds the name of the container to be used to run a package
+# if this container already exists, the run processes can skip the container build
+export OSM_RUNTIME_CONTAINER=UI-runtime
+#
+# this variable must be set to allow creating the runtime container in privileged mode
+# this variable should be removed in the future when no privileged mode is required
+#export OSM_RUNTIME_CONTAINER_PRIVILEGED=yes
+
--- /dev/null
+#!/bin/bash
+# Copyright 2016 RIFT.IO Inc
+#
+# 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.
+#
+# TEMPLATE script to start a build. This is run inside a container
+#
+# 6 July 2016 -- Jeremy.Mordkoff@riftio.com -- adapted from the riftware version
+#
+
+HERE=$(realpath $(dirname $0))
+OSM_JENKINS=$(dirname $HERE)
+. $OSM_JENKINS/common/all_funcs
+
+# SET YOU MDG repository name here
+export OSM_MDG=UI
+OSM_load_config
+
+
+# Here is an example for how to handle an incremental build
+if [ -d $OSM_MDG ]; then
+ INFO "reusing existing workspace"
+ cd $OSM_MDG
+ git pull
+else
+ INFO "cloning MDG $OSM_MDG from $OSM_GIT_URL/$OSM_MDG"
+ git clone $OSM_GIT_URL/$OSM_MDG
+ cd $OSM_MDG
+fi
+INFO "starting build"
+
+### for start_build
+### put your commands here to
+### build, test and produce coverage reports
+
+RC=0
+
+INFO "done, RC=$RC"
+exit $RC
+
+
if [ $# -ne 1 ]; then
FATAL "arg is container name"
fi
- lxc config show $1 2>&1 >/dev/null
+ lxc config show $1 >/dev/null 2>&1
if [ $? -eq 0 ]; then
DEBUG "container $1 exists"
return 0
DEBUG "exec in $container \"$*\""
lxc exec "$container" -- $*
}
+container_exec_stderr() {
+ container="$1"
+ shift
+ DEBUG "exec in $container \"$*\""
+ lxc exec "$container" -- $* 2>&1
+}
wait_container_up() {
[ $# -eq 1 ] || FATAL "arg is container name got $# args - $*"
RE="1 received"
while [ $ct -lt 60 ]; do
let ct=ct+1
- output=$(container_exec "$1" ping -c 1 google.com)
+ output=$(container_exec_stderr "$1" ping -c 1 google.com)
if [[ $output =~ $RE ]]; then
DEBUG "$1 is up"
return
cd riftware
git pull
else
+ INFO "install pre-requisites"
+ yum install -y yum-utils curl
+ curl -o /etc/yum.repos.d/release.repo http://buildtracker.riftio.com/repo_file/fc20/OSM/
+ yum install -y --nogpgcheck rw.tools-container-tools rw.tools-scripts
+ /usr/rift/container_tools/mkcontainer --modes build --internet --latest --repofile /usr/rift/container_tools/riftware.repo
+
+
INFO "cloning MDG riftware from $OSM_GIT_URL/riftware"
+ # these were missing once, so just to be safe, install them again here
+ yum -y install cmake wget lcov
git clone $OSM_GIT_URL/riftware
cd riftware
- INFO "install pre-requisites"
- bash ./scripts/vm_image/mkcontainer --modes build
fi
-INFO "no build script yet"
-RC=1
+./rift-shell -r -- make rw.ext
+RC=$?
+
+if [ $RC == 0 ]; then
+ ./rift-shell -r -- make -j16
+ RC=$?
+fi
INFO "done RC = $RC"
exit $RC