Ronit, files added to ci 32/3432/1
authorIrina <ib565x@intl.att.com>
Thu, 23 Apr 2020 14:25:25 +0000 (17:25 +0300)
committerIrina <ib565x@intl.att.com>
Thu, 23 Apr 2020 14:25:33 +0000 (17:25 +0300)
Change-Id: I1f537e363bf039bb558fb6b8ec26b37d723faaf1
Signed-off-by: Irina <ib565x@intl.att.com>
ci/Dockerfile [moved from Dockerfile with 93% similarity, mode: 0755]
ci/build.sh
ci/publish.sh

old mode 100644 (file)
new mode 100755 (executable)
similarity index 93%
rename from Dockerfile
rename to ci/Dockerfile
index 2ce805e..d7cfbab
@@ -13,8 +13,8 @@
 # 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.
-
-FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu16-c-go:3-u16.04-nng as ubuntu
+     
+FROM nexus3.o-ran-sc.org:10004/o-ran-sc/bldr-ubuntu18-c-go:8-u18.04 as ubuntu
 RUN apt-get update && apt-get -q -y install cmake ksh alien
 ADD . /tmp
 WORKDIR /tmp
@@ -26,7 +26,8 @@ RUN sh ci/build.sh
 # script to execute.  This will take the simple package list generated
 # by the ci_build script and copy the list of packages to the target
 # directory.  The target directory is /export by default, but can be
-# overridden from the docker run command line. In either case, the
+# overridden from the docker run command line. In either case, the 
 # assumption is that the target directory is mounted as a volume.
 #
 ENTRYPOINT [ "ci/publish.sh" ]
+
index 3e47336..0f322e7 100755 (executable)
@@ -15,12 +15,12 @@ target_dir="packages"
 project_name="rnib"
 if [ ! -d $target_dir ]
 then
-    echo "$target_dir will be created"
+       echo "$target_dir will be created"
     if ! mkdir -p $target_dir
-    then
-        echo "[FAIL] cannot find or create target directory: $target_dir"
-        exit 1
-    fi
+       then
+               echo "[FAIL] cannot find or create target directory: $target_dir"
+               exit 1
+       fi
 fi
     rm -f ./$target_dir/*.*
     mkdir -p $target_dir/DEBIAN
@@ -28,18 +28,17 @@ fi
     echo "cp -f -r ./creader/$output_dir/* $target_dir/usr/local/include/$project_name"
     cp -f -r ./creader/$output_dir/* $target_dir/usr/local/include/$project_name
     cp ./ci/control $target_dir/DEBIAN
-
+    
      ver=$(cat ./ci/package-tag.yaml | grep tag: |awk '{split($0,ver,":"); print ver[2]}'| tr -d " \t\n\r")
-     echo $project_name
+     echo $project_name 
      new_name=${project_name}_$ver
      echo $new_names
      dpkg-deb --build $target_dir
-
-     mkdir -p exported
-
-     ls -la
-     echo "mv *.deb ./exported/$new_name.deb"
-     mv *.deb ./exported/$new_name.deb
+     mkdir -p export
+    
+     echo "mv *.deb $new_name.deb"
+     mv *.deb  $new_name.deb
      echo "deb package is: $project_name_$ver.deb"
-    cd ./exported
+    
     ls -al *.deb
+    
\ No newline at end of file
index bb4f804..fbc44c5 100755 (executable)
@@ -1,65 +1,16 @@
-#!/usr/bin/env bash
+#!/bin/bash
+echo "$0: start copying packages"
 
-# -----------------------------------------------------------------------------
-#
-# Copyright (C) 2019 AT&T Intellectual Property and Nokia
-#
-# 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.
-#
-# -----------------------------------------------------------------------------
-
-#      Mnemonic:       publish
-#      Abstract:       Simple script which copies files that the build script left
-#                              for export (packages, but could be anything). This expects
-#                              that all files in /tmp/exportd are to be copied to the 
-#                              export directory /export The export directory is assumed to be
-#                              mounted from the outside world as /export, though we will use $1
-#                              as an override so this can be changed if needed.
-#
-#      Date:           30 July 2019
-#
-# -----------------------------------------------------------------------------
-
-echo "$0 starting" >&2
-argv0=${0##*/}
-
-target=${1:-/export}
-exportd=/tmp/exported          # build script dumps here
-
-if ! cd $target
-then
-       echo "$argv0: abort: cannot find or switch to: $target" >&2
-       exit 1
-fi
-
-if [[ ! -w ./ ]]
-then
-       echo "$argv0: abort: cannot write to target directory: $target"
-       exit 1
-fi
-
-if [[ ! -d $exportd ]]
+TARGET=/export
+if [ $# -eq 1 ]
 then
-       echo "$argv0: abort: unable to find the exported directory: $exportd" >&2
-       exit 1
+    TARGET=$1
 fi
 
-errors=0
-echo "$argv0: copy: $exportd/* --> $target" >&2
-if ! cp -v $exportd/* $target/
+if [ ! -d "$TARGET" ]
 then
-       errors=1
+    echo "$0: Error: target dir $TARGET does not exist"
+    exit 1
 fi
 
-echo "$argv0: finshed, $errors errors"
-exit $errors
+cp -v  /tmp/*.deb "$TARGET"
\ No newline at end of file