For testing purposes I changed the name of the repo to look for on robin to grab the newer rpms -baseurl=http://www.unidata.ucar.edu/repos/yum/el7-dev/ +baseurl=http://www.unidata.ucar.edu/repos/yum/18.2.1-ade build/build_rpms.sh Michael had taken out both awips2-hazards.git and awips2-nws.git, but we still needed awips2-nws.git I added in a local install of awips2-hdf5 and awips2-netcdf since it seemed like those were required rpms (after the ade was built)-this was only initially to set up the ade Added the making of the directory path that the rpms get copied to from the docker to local disk build/setup.sh Tiff changed the imgvers to 18.2.1 (so it will look at the new docker image that I created Commented out the docker stop/rm command (this can eventually be added back in) Commented out the syncing of rpms to robin/tomcat dist/comps.xml Tiff added awips2-hdf5 to each of the group installs
61 lines
1.6 KiB
Bash
Executable file
61 lines
1.6 KiB
Bash
Executable file
#!/bin/sh -xe
|
|
#
|
|
# Unidata AWIPS Build Setup Script
|
|
# Author: mjames@ucar.edu
|
|
#
|
|
|
|
#
|
|
# Require el6 or el7 be specified
|
|
#
|
|
if [ -z "$1" ]; then
|
|
echo "supply type (el6, el7)"
|
|
exit
|
|
fi
|
|
os_version=$1
|
|
rpmname=$2
|
|
dirs=" -v `pwd`:/awips2/repo/awips2-builds:rw "
|
|
. /awips2/repo/awips2-builds/build/buildEnvironment.sh
|
|
|
|
# If local source directories, exist, mount them to the container
|
|
if [ $rpmname = "buildCAVE" ]; then
|
|
for dn in `cat build/repos| grep -v static| grep -v nativelib |grep -v awips2-rpm`
|
|
do
|
|
echo $dn
|
|
if [ -d /awips2/repo/$dn ]; then
|
|
dirs+=" -v /awips2/repo/${dn}:/awips2/repo/${dn} "
|
|
fi
|
|
done
|
|
else
|
|
for dn in `cat build/repos`
|
|
do
|
|
echo $dn
|
|
if [ -d /awips2/repo/$dn ]; then
|
|
dirs+=" -v /awips2/repo/${dn}:/awips2/repo/${dn} "
|
|
fi
|
|
done
|
|
fi
|
|
|
|
#
|
|
# Run Docker AWIPS ADE Image
|
|
#
|
|
imgname=unidata/awips-ade
|
|
imgvers=18.2.1
|
|
sudo docker run --entrypoint=/bin/bash --privileged -d -ti -e "container=docker" $dirs $imgname:$imgvers-$os_version
|
|
dockerID=$(sudo docker ps | grep awips-ade | awk '{print $1}' | head -1 )
|
|
sudo docker logs $dockerID
|
|
sudo docker exec -ti $dockerID /bin/bash -xec "/awips2/repo/awips2-builds/build/build_rpms.sh $os_version $rpmname";
|
|
#sudo docker stop $dockerID
|
|
#sudo docker rm -v $dockerID
|
|
|
|
#
|
|
# Update/Recreate YUM Repository
|
|
#
|
|
if [[ $(whoami) == "mjames" ]]; then # local build
|
|
sudo chown -R mjames:ustaff dist/${os_version}-dev
|
|
repomanage -k1 --old dist/${os_version}-dev | xargs rm -f
|
|
createrepo -g ../comps.xml dist/${os_version}-dev
|
|
#
|
|
# Push to web server
|
|
#
|
|
#rsync --archive --delete dist/${os_version}-dev tomcat@www:/web/content/repos/yum/
|
|
fi
|