Skip to content

Commit

Permalink
cronjobs_osgeo_lxd: initial cleanup of GRASS GIS 7 + 8 cronjobs (snap…
Browse files Browse the repository at this point in the history
…shots, manuals, addons, progman) (#651)

Cleanup of cronjobs on grass.osgeo.org:

- removal of unused G74 and G76 scripts
- renaming of build scripts to more standardized names (see #613 (comment))
- update of `cron_job_list_grass` accordingly (which calls the GRASS GIS 7 + 8 cronjobs  for snapshots, manuals, addons, progman creation)
- removal of unused G74 and G76 scripts
- renaming of build scripts to more standardized names (see #613 (comment))
- compile_addons_git.sh: use variables
- cron_grass8_relbranch_build_binaries.sh: enabled G8 addon compilation
- make addon script independent from major GRASS GIS version
- grass-addons-index.sh: use for both G7 and G8 addons
  • Loading branch information
neteler committed Dec 25, 2021
1 parent 35e3a12 commit 0023a0d
Show file tree
Hide file tree
Showing 12 changed files with 130 additions and 864 deletions.
27 changes: 17 additions & 10 deletions utils/cronjobs_osgeo_lxd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,26 @@ This directory contains the relevant files to generate and deploy the GRASS GIS
- generate and deploy the GRASS GIS Web pages at https://grass.osgeo.org/:
- `hugo_clean_and_update_job.sh`
- GRASS GIS source code weekly snapshots:
- release_branch_7_8: `cron_grass78_src_relbr78_snapshot.sh`
- main: `cron_grass8_HEAD_src_snapshot.sh`
- grass7: `cron_grass7_main_src_snapshot.sh`
- grass8: `cron_grass8_main_src_snapshot.sh`
- GRASS GIS Linux binary weekly snapshots:
- `cron_grass78_releasebranch_78_build_bins.sh`
- grass7: `cron_grass7_relbranch_build_binaries.sh`
- grass8: `cron_grass8_relbranch_build_binaries.sh`
- GRASS GIS addons manual pages:
- within `cron_grass78_releasebranch_78_build_bins.sh`
- grass7: within `cron_grass7_relbranch_build_binaries.sh`
- grass8: within `cron_grass8_relbranch_build_binaries.sh`
- GRASS GIS addons overview page at https://grass.osgeo.org/grass7/manuals/addons/:
- `compile_addons_git.sh` - called from `cron_grass78_releasebranch_78_build_bins.sh`
- `grass-addons-fetch-xml.sh` - called from `cron_grass78_releasebranch_78_build_bins.sh`
- `grass-addons-index.sh` - called from `cron_grass78_releasebranch_78_build_bins.sh`
- `compile_addons_git.sh` - called from `cron_grass7_relbranch_build_binaries.sh`
- `grass-addons-fetch-xml.sh` - called from `cron_grass7_relbranch_build_binaries.sh`
- `grass-addons-index.sh` - called from `cron_grass7_relbranch_build_binaries.sh`
- `get_page_description.py` - called from `grass-addons-index.sh`
- GRASS GIS addons overview page at https://grass.osgeo.org/grass8/manuals/addons/:
- `compile_addons_git.sh` - called from `cron_grass8_relbranch_build_binaries.sh`
- `grass-addons-fetch-xml.sh` - called from `cron_grass8_relbranch_build_binaries.sh`
- `grass-addons-index.sh` - called from `cron_grass8_relbranch_build_binaries.sh`
- `get_page_description.py` - called from `grass-addons-index.sh`
- GRASS GIS programmer's manual:
- within `cron_grass8_HEAD_build_bins.sh`
- within `cron_grass8_relbranch_build_binaries.sh`

## Web site organisation

Expand All @@ -34,7 +41,7 @@ Important: there are two web related directories on the server:

The server is hosted as LXD container on `osgeo7`, see: https://wiki.osgeo.org/wiki/SAC_Service_Status#GRASS_GIS_server

The container is only accessible via the related OSGeo ssh jumphost.
The container is only accessible via the related OSGeo ssh jumphost and registered ssh pubkey.

## Cronjob execution

Expand All @@ -46,4 +53,4 @@ grasslxd:/home/neteler/cronjobs/

## History

The cronjobs here have been initially written in 2002 and subsequently updated.
The cronjobs here have been initially written in 2002 and subsequently been updated.
38 changes: 21 additions & 17 deletions utils/cronjobs_osgeo_lxd/compile_addons_git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,34 @@
# Martin Landa, 2013
# updated for GRASS GIS 7 (only) Addons by Markus Neteler, 2020
# fixes for addon creation by Tomas Zigo, 2020
# changes to variables by Markus Neteler, 2021

# This script compiles GRASS Addons, it's called by cron_grass78_releasebranch_78_build_bins.sh | cron_grass7_HEAD_build_bins.sh
# This script compiles GRASS Addons, it's called by cron_grass${GMAJOR}_main_build_binaries.sh | cron_grass${GMAJOR}_main_src_snapshot.sh

GMAJOR=8
GMINOR=0

#################

if [ `uname -m` = "x86_64" ] ; then
PLATFORM=x86_64
else
PLATFORM=x86
fi

if [ -z "$3" ]; then
echo "Usage: $0 git_path topdir addons_path grass_startup_program [separate]"
echo "eg. $0 ~/src/grass_addons/grass7/ \
~/src/releasebranch_7_8/dist.x86_64-pc-linux-gnu \
~/.grass7/addons \
~/src/releasebranch_7_8/bin.x86_64-pc-linux-gnu/grass78"
echo "eg. $0 ~/src/grass_addons/grass${GMAJOR}/ \
~/src/releasebranch_${GMAJOR}_${GMINOR}/dist.${PLATFORM}-pc-linux-gnu \
~/.grass${GMAJOR}/addons \
~/src/releasebranch_${GMAJOR}_${GMINOR}/bin.${PLATFORM}-pc-linux-gnu/grass${GMAJOR}"
exit 1
fi

GIT_PATH="$1"
TOPDIR="$2"
ADDON_PATH="$3"
GRASS_STARTUP_PROGRAM="$4"
#GRASS_VERSION=`echo -n ${GIT_PATH} | tail -c 1`
GRASS_VERSION=7
INDEX_FILE="index"
INDEX_MANUAL_PAGES_FILE="index_manual_pages"
ADDONS_PATHS_JSON_FILE="addons_paths.json"
Expand All @@ -30,7 +40,7 @@ if [ ! -d "$3" ] ; then
fi

if [ -z "$4" ] ; then
echo "ERROR: Set GRASS GIS startup program with full path (e.g., ~/src/releasebranch_7_8/bin.x86_64-pc-linux-gnu/grass78)"
echo "ERROR: Set GRASS GIS startup program with full path (e.g., ~/src/releasebranch_${GMAJOR}_${GMINOR}/bin.${PLATFORM}-pc-linux-gnu/grass${GMAJOR})"
exit 1
fi

Expand All @@ -40,12 +50,6 @@ else
SEP=0
fi

if [ `uname -m` = "x86_64" ] ; then
PLATFORM=x86_64
else
PLATFORM=x86
fi

rm -rf "$ADDON_PATH"
mkdir "$ADDON_PATH"

Expand Down Expand Up @@ -78,7 +82,7 @@ border: 1px solid black;
</style>
</head>
<body>
<h1>GRASS $GRASS_VERSION Addons ($PLATFORM) / $uname (logs generated $date)</h1>
<h1>GRASS $GMAJOR Addons ($PLATFORM) / $uname (logs generated $date)</h1>
<hr />
<table cellpadding=\"5\">
<tr><th style=\"background-color: grey\">AddOns</th>
Expand All @@ -96,7 +100,7 @@ echo "-----------------------------------------------------"

pwd=`pwd`
# .. "hadoop"
# from ../../grass7/
# from ../../grass${GMAJOR}/
for c in "db" "display" "general" "gui/wxpython" "imagery" "misc" "raster" "raster3d" "temporal" "vector" ; do
if [ ! -d $c ]; then
continue
Expand Down Expand Up @@ -125,7 +129,7 @@ for c in "db" "display" "general" "gui/wxpython" "imagery" "misc" "raster" "rast
MANBASEDIR="$path/docs/man" \
SCRIPTDIR="$path/scripts" \
ETC="$path/etc" \
SOURCE_URL="https://github.com/OSGeo/grass-addons/tree/master/grass${GRASS_VERSION}/" > \
SOURCE_URL="https://github.com/OSGeo/grass-addons/tree/grass${GMAJOR}/src/" > \
"$ADDON_PATH/logs/$m.log" 2>&1 \
HTML_PAGE_FOOTER_PAGES_PATH="../"
if [ `echo $?` -eq 0 ] ; then
Expand Down
255 changes: 0 additions & 255 deletions utils/cronjobs_osgeo_lxd/cron_grass74_releasebranch_74_build_bins.sh

This file was deleted.

0 comments on commit 0023a0d

Please sign in to comment.