awips2/build/cibuild.sh
ucar-tmeyer 1323a1be8c Add in Unidata's awips-ade directory
-Updated Dockerfile filenames to include -20.3.2
	-added/removed a few dependencies
	-added a yum update to the devel
	-updated version
-Had to locally add the RPM's to the ade docker since they aren't publically on a server
-Had to update the el7-dev.repo to point to the local RPMs directory

-Updated version in buildEnvironment.sh
-Added a few new paths to rsync.dirs:
	-awips2-core/ignite/*
	-awips2-nws/common/*
	-awips2-nws/features/*
	-awips2-nws/viz/*
-Removed *pdf from rsync.dirs

-rpms/build/x86_86/build.sh - updated this file to use the groups to install the rpms

-removed umlauts from schrodinger in GridUpdater.java

To Do/Change before initial public push:
-Change the dockerhub organization from tiffanym13 to unidata
-Change the el7-dev.repo file to point to our repo on nexus
-Remove the RPM's directory
-Change imgvers in setup.sh to not have the -1
-Change the Dockerfile names back to the original without the version (and just tag it with the version)
-Need to add back in awips2-unidata repo to rsync.dirs, build_rpms.sh, and build/repos
-Figure out how to merge in the awips-ade directory and Unidata build scripts so we can keep the history
-Uncomment the #TM# comments in setup.sh to copy files to fserv
-Take out propriety data (specific to warnings and binlightning)

------------------------------------------------------------------------------

SUMMARY:
	new file:   build/awips-ade/Dockerfile.awips-ade-20.3.2-1.el7
	new file:   build/awips-ade/Dockerfile.awips-devel-20.3.2-1.el7
	new file:   build/awips-ade/awips-ade.sh
	new file:   build/awips-ade/awips-devel.sh
	new file:   build/awips-ade/el7-dev.repo
	new file:   build/build.sh
	new file:   build/buildEnvironment.sh
	new file:   build/build_rpms.sh
	new file:   build/cibuild.sh
	new file:   build/excludes
	new file:   build/repos
	new file:   build/rsync.cave
	new file:   build/rsync.dirs
	new file:   build/setup.sh
	modified:   cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/inv/GridUpdater.java
	modified:   rpms/build/x86_64/build.sh
2022-05-05 12:57:24 -05:00

75 lines
2.2 KiB
Bash
Executable file

#!/bin/bash -v
set -xe
# Determine where we are
path_to_script=`readlink -f $0`
dir=$(dirname $path_to_script)
source ${dir}/buildEnvironment.sh
export _script_dir=${dir}
echo "Running build.sh from ${_script_dir}"
echo " JENKINS_WORKSPACE = ${JENKINS_WORKSPACE}"
cd ${dir}
START_TIME=`date "+%s"`
timestamp=`date +%Y_%m_%d_%H:%M:%S`
# Cleanup before building CAVE rpms
if [[ ${2} = "buildCAVE" ]]; then
rm -rf ${JENKINS_HOME}/buildspace/workspace/AWIPS2-UPC_build/baseline/
rm -rf ${JENKINS_HOME}/buildspace/workspace/tmp/${USER}/
fi
echo "BUILD_DIR = $BUILD_DIR"
echo "BUILD_WORKSPACE = $BUILD_WORKSPACE"
echo "BASELINE = $BASELINE"
echo "WORKSPACE = $WORKSPACE"
echo "AWIPSII_VERSION = $AWIPSII_VERSION"
echo "AWIPSII_RELEASE = $AWIPSII_RELEASE"
echo "AWIPSII_TOP_DIR = $AWIPSII_TOP_DIR"
echo "UFRAME_ECLIPSE = $UFRAME_ECLIPSE"
echo "AWIPSII_STATIC_FILES = $AWIPSII_STATIC_FILES"
echo "AWIPSII_BUILD_ROOT = $AWIPSII_BUILD_ROOT"
# Prepare the rpm build directory structure
mkdir -p ${AWIPSII_TOP_DIR}/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
pushd . > /dev/null 2>&1
cd ${BASELINE}
mkdir -p ${WORKSPACE}
RSYNC_DIRS=`cat $dir/rsync.dirs`
rsync -ruql --delete --exclude-from=${dir}/excludes ${RSYNC_DIRS} ${WORKSPACE}
popd > /dev/null 2>&1
# execute the build for the appropriate architecture
_rpms_build_directory=${WORKSPACE}/rpms/build
_architecture=`uname -i`
_build_sh_directory=${_rpms_build_directory}/${_architecture}
pushd . > /dev/null 2>&1
cd ${_build_sh_directory}
cp -v ${dir}/buildEnvironment.sh .
/bin/bash ${_build_sh_directory}/build.sh ${1} ${2}
popd > /dev/null 2>&1
export rpm_end_dir="${AWIPSII_VERSION}-${AWIPSII_RELEASE}"
if [ "$(ls -A ${AWIPSII_TOP_DIR}/RPMS/x86_64/)" ]; then
mv ${AWIPSII_TOP_DIR}/RPMS/x86_64/* ${JENKINS_HOME}/build/rpms/awips2_latest/x86_64/
fi
if [ "$(ls -A ${AWIPSII_TOP_DIR}/RPMS/noarch/)" ]; then
mv ${AWIPSII_TOP_DIR}/RPMS/noarch/* ${JENKINS_HOME}/build/rpms/awips2_latest/noarch/
fi
END_TIME=`date "+%s"`
TIME_SPENT=$((END_TIME - START_TIME))
TTI_HOURS=$((TIME_SPENT/3600))
TTI_SECS=$((TIME_SPENT %3600)) #Remaining seconds
TTI_MINS=$((TTI_SECS/60))
TTI_SECS=$((TTI_SECS%60))
echo "Total-time-Spent-In-The-Build-For $0 = $TTI_HOURS hours, $TTI_MINS minutes, $TTI_SECS seconds"
exit