From 2e609df33915910a974a0e69df15f70904b58a4e Mon Sep 17 00:00:00 2001
From: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Date: Mon, 23 Jul 2018 16:09:00 +0200
Subject: [PATCH] CI: adding license banners to master eNB CI script files

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
---
 ci-scripts/Jenkinsfile-gitlab            |  21 +++-
 ci-scripts/buildLocally.sh               | 153 -----------------------
 ci-scripts/buildOnVM.sh                  |  20 +++
 ci-scripts/checkCodingFormattingRules.sh |  20 +++
 ci-scripts/createVM.sh                   |  20 +++
 ci-scripts/destroyAllRunningVM.sh        |  20 +++
 ci-scripts/fail.sh                       |  20 +++
 ci-scripts/reportBuildLocally.sh         |  20 +++
 ci-scripts/runTestOnVM.sh                |  20 +++
 9 files changed, 160 insertions(+), 154 deletions(-)
 delete mode 100755 ci-scripts/buildLocally.sh

diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab
index d3e55c9655..3c72e64d77 100644
--- a/ci-scripts/Jenkinsfile-gitlab
+++ b/ci-scripts/Jenkinsfile-gitlab
@@ -1,4 +1,23 @@
-// Comments
+/*
+ * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The OpenAirInterface Software Alliance licenses this file to You under
+ * the OAI Public License, Version 1.1  (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.openairinterface.org/?page_id=698
+ *
+ * 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 more information about the OpenAirInterface (OAI) Software Alliance:
+ *      contact@openairinterface.org
+ */
 
 pipeline {
     agent {
diff --git a/ci-scripts/buildLocally.sh b/ci-scripts/buildLocally.sh
deleted file mode 100755
index 6701950832..0000000000
--- a/ci-scripts/buildLocally.sh
+++ /dev/null
@@ -1,153 +0,0 @@
-#!/bin/bash
-
-function usage {
-    echo "OAI Local Build Check script"
-    echo "   Original Author: Raphael Defosseux"
-    echo ""
-    echo "Usage:"
-    echo "------"
-    echo "    buildLocally.sh [OPTIONS]"
-    echo ""
-    echo "Options:"
-    echo "--------"
-    echo "    --workspace #### OR -ws ####"
-    echo "    Specify the workspace"
-    echo ""
-    echo "    --help OR -h"
-    echo "    Print this help message."
-    echo ""
-}
-
-if [ $# -ne 2 ] && [ $# -ne 1 ]
-then
-    echo "Syntax Error: not the correct number of arguments"
-    echo ""
-    usage
-    exit 1
-fi
-
-while [[ $# -gt 0 ]]
-do
-key="$1"
-
-case $key in
-    -h|--help)
-    shift
-    usage
-    exit 0
-    ;;
-    -ws|--workspace)
-    JENKINS_WKSP="$2"
-    shift
-    shift
-    ;;
-    *)
-    echo "Syntax Error: unknown option: $key"
-    echo ""
-    usage
-    exit 1
-esac
-done
-
-cd $JENKINS_WKSP
-STATUS=0
-
-############################################################
-# Creating a tmp folder to store results and artifacts
-############################################################
-if [ ! -d $JENKINS_WKSP/archives ]
-then
-    mkdir $JENKINS_WKSP/archives
-fi
-
-source oaienv
-cd $JENKINS_WKSP/cmake_targets
-
-############################################################
-# Building eNb with USRP option
-############################################################
-ARCHIVES_LOC=$JENKINS_WKSP/archives/enb_usrp
-if [ ! -d $ARCHIVES_LOC ]
-then
-    mkdir $ARCHIVES_LOC
-fi
-./build_oai --eNB -w USRP -c
-
-# Generated log files:
-if [ -f $JENKINS_WKSP/cmake_targets/log/lte-softmodem.Rel14.txt ]
-then
-    LOCAL_STAT=`egrep -c "Built target lte-softmodem" $JENKINS_WKSP/cmake_targets/log/lte-softmodem.Rel14.txt`
-    if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
-    cp $JENKINS_WKSP/cmake_targets/log/lte-softmodem.Rel14.txt $ARCHIVES_LOC
-else
-    STATUS=-1
-fi
-if [ -f $JENKINS_WKSP/cmake_targets/log/params_libconfig.Rel14.txt ]
-then
-    LOCAL_STAT=`egrep -c "Built target params_libconfig" $JENKINS_WKSP/cmake_targets/log/params_libconfig.Rel14.txt`
-    if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
-    cp $JENKINS_WKSP/cmake_targets/log/params_libconfig.Rel14.txt $ARCHIVES_LOC
-else
-    STATUS=-1
-fi
-if [ -f $JENKINS_WKSP/cmake_targets/log/coding.Rel14.txt ]
-then
-    LOCAL_STAT=`egrep -c "Built target coding" $JENKINS_WKSP/cmake_targets/log/coding.Rel14.txt`
-    if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
-    cp $JENKINS_WKSP/cmake_targets/log/coding.Rel14.txt $ARCHIVES_LOC
-else
-    STATUS=-1
-fi
-if [ -f $JENKINS_WKSP/cmake_targets/log/oai_usrpdevif.Rel14.txt ]
-then
-    LOCAL_STAT=`egrep -c "Built target oai_usrpdevif" $JENKINS_WKSP/cmake_targets/log/oai_usrpdevif.Rel14.txt`
-    if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
-    cp $JENKINS_WKSP/cmake_targets/log/oai_usrpdevif.Rel14.txt $ARCHIVES_LOC
-else
-    STATUS=-1
-fi
-
-############################################################
-# Building basic simulator
-############################################################
-ARCHIVES_LOC=$JENKINS_WKSP/archives/basic_sim
-if [ ! -d $ARCHIVES_LOC ]
-then
-    mkdir $ARCHIVES_LOC
-fi
-cd $JENKINS_WKSP/cmake_targets
-./build_oai --basic-simulator -c
-
-# Generated log files:
-if [ -f $JENKINS_WKSP/cmake_targets/log/basic_simulator_enb.txt ]
-then
-    LOCAL_STAT=`egrep -c "Built target lte-softmodem" $JENKINS_WKSP/cmake_targets/log/basic_simulator_enb.txt`
-    if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
-    cp $JENKINS_WKSP/cmake_targets/log/basic_simulator_enb.txt $ARCHIVES_LOC
-else
-    STATUS=-1
-fi
-if [ -f $JENKINS_WKSP/cmake_targets/log/basic_simulator_ue.txt ]
-then
-    LOCAL_STAT=`egrep -c "Built target lte-uesoftmodem" $JENKINS_WKSP/cmake_targets/log/basic_simulator_ue.txt`
-    if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
-    cp $JENKINS_WKSP/cmake_targets/log/basic_simulator_ue.txt $ARCHIVES_LOC
-else
-    STATUS=-1
-fi
-if [ -f $JENKINS_WKSP/cmake_targets/log/conf2uedata.Rel14.txt ]
-then
-    LOCAL_STAT=`egrep -c "Built target conf2uedata" $JENKINS_WKSP/cmake_targets/log/conf2uedata.Rel14.txt`
-    if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
-    cp $JENKINS_WKSP/cmake_targets/log/conf2uedata.Rel14.txt $ARCHIVES_LOC
-else
-    STATUS=-1
-fi
-
-############################################################
-# Creating a zip for Jenkins archiving
-############################################################
-cd $JENKINS_WKSP/archives/
-zip -r local_build_logs.zip basic_sim enb_usrp
-
-exit $STATUS
diff --git a/ci-scripts/buildOnVM.sh b/ci-scripts/buildOnVM.sh
index b07d34c9d0..76a11c6d38 100755
--- a/ci-scripts/buildOnVM.sh
+++ b/ci-scripts/buildOnVM.sh
@@ -1,4 +1,24 @@
 #!/bin/bash
+#/*
+# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
+# * contributor license agreements.  See the NOTICE file distributed with
+# * this work for additional information regarding copyright ownership.
+# * The OpenAirInterface Software Alliance licenses this file to You under
+# * the OAI Public License, Version 1.1  (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.openairinterface.org/?page_id=698
+# *
+# * 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 more information about the OpenAirInterface (OAI) Software Alliance:
+# *      contact@openairinterface.org
+# */
 
 function usage {
     echo "OAI VM Build Check script"
diff --git a/ci-scripts/checkCodingFormattingRules.sh b/ci-scripts/checkCodingFormattingRules.sh
index 20657b7fd0..a18fc67c75 100755
--- a/ci-scripts/checkCodingFormattingRules.sh
+++ b/ci-scripts/checkCodingFormattingRules.sh
@@ -1,4 +1,24 @@
 #!/bin/bash
+#/*
+# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
+# * contributor license agreements.  See the NOTICE file distributed with
+# * this work for additional information regarding copyright ownership.
+# * The OpenAirInterface Software Alliance licenses this file to You under
+# * the OAI Public License, Version 1.1  (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.openairinterface.org/?page_id=698
+# *
+# * 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 more information about the OpenAirInterface (OAI) Software Alliance:
+# *      contact@openairinterface.org
+# */
 
 function usage {
     echo "OAI Coding / Formatting Guideline Check script"
diff --git a/ci-scripts/createVM.sh b/ci-scripts/createVM.sh
index 51f597909f..1c3099e843 100755
--- a/ci-scripts/createVM.sh
+++ b/ci-scripts/createVM.sh
@@ -1,4 +1,24 @@
 #!/bin/bash
+#/*
+# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
+# * contributor license agreements.  See the NOTICE file distributed with
+# * this work for additional information regarding copyright ownership.
+# * The OpenAirInterface Software Alliance licenses this file to You under
+# * the OAI Public License, Version 1.1  (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.openairinterface.org/?page_id=698
+# *
+# * 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 more information about the OpenAirInterface (OAI) Software Alliance:
+# *      contact@openairinterface.org
+# */
 
 function usage {
     echo "OAI VM Creation script"
diff --git a/ci-scripts/destroyAllRunningVM.sh b/ci-scripts/destroyAllRunningVM.sh
index c9eb43b4ef..5e152bc590 100755
--- a/ci-scripts/destroyAllRunningVM.sh
+++ b/ci-scripts/destroyAllRunningVM.sh
@@ -1,4 +1,24 @@
 #!/bin/bash
+#/*
+# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
+# * contributor license agreements.  See the NOTICE file distributed with
+# * this work for additional information regarding copyright ownership.
+# * The OpenAirInterface Software Alliance licenses this file to You under
+# * the OAI Public License, Version 1.1  (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.openairinterface.org/?page_id=698
+# *
+# * 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 more information about the OpenAirInterface (OAI) Software Alliance:
+# *      contact@openairinterface.org
+# */
 
 function usage {
     echo "OAI VM Destroy script"
diff --git a/ci-scripts/fail.sh b/ci-scripts/fail.sh
index 978b63c7c7..edc7247e3f 100755
--- a/ci-scripts/fail.sh
+++ b/ci-scripts/fail.sh
@@ -1,3 +1,23 @@
 #!/bin/bash
+#/*
+# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
+# * contributor license agreements.  See the NOTICE file distributed with
+# * this work for additional information regarding copyright ownership.
+# * The OpenAirInterface Software Alliance licenses this file to You under
+# * the OAI Public License, Version 1.1  (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.openairinterface.org/?page_id=698
+# *
+# * 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 more information about the OpenAirInterface (OAI) Software Alliance:
+# *      contact@openairinterface.org
+# */
 
 exit -1
diff --git a/ci-scripts/reportBuildLocally.sh b/ci-scripts/reportBuildLocally.sh
index 694e92e478..f8a48d9c17 100755
--- a/ci-scripts/reportBuildLocally.sh
+++ b/ci-scripts/reportBuildLocally.sh
@@ -1,4 +1,24 @@
 #!/bin/bash
+#/*
+# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
+# * contributor license agreements.  See the NOTICE file distributed with
+# * this work for additional information regarding copyright ownership.
+# * The OpenAirInterface Software Alliance licenses this file to You under
+# * the OAI Public License, Version 1.1  (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.openairinterface.org/?page_id=698
+# *
+# * 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 more information about the OpenAirInterface (OAI) Software Alliance:
+# *      contact@openairinterface.org
+# */
 
 function usage {
     echo "OAI Local Build Report script"
diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh
index 4a3a9d6d38..68438758f5 100755
--- a/ci-scripts/runTestOnVM.sh
+++ b/ci-scripts/runTestOnVM.sh
@@ -1,4 +1,24 @@
 #!/bin/bash
+#/*
+# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
+# * contributor license agreements.  See the NOTICE file distributed with
+# * this work for additional information regarding copyright ownership.
+# * The OpenAirInterface Software Alliance licenses this file to You under
+# * the OAI Public License, Version 1.1  (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.openairinterface.org/?page_id=698
+# *
+# * 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 more information about the OpenAirInterface (OAI) Software Alliance:
+# *      contact@openairinterface.org
+# */
 
 function usage {
     echo "OAI VM Test Run script"
-- 
GitLab