Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The second batch task publishes the nightly files by calling a shell script. The contents of the script are listed below -

Panelcode
titlenightly-2.x.sh

#!/bin/bash


TODAY=`date +%Y%m%d%H%M`


TARGET_BASE=wesw@people.apache.org


TARGET_DIR=/www/people.apache.org/builds/struts/nightlies/2.x


TARGET_URL=$TARGET_BASE:$TARGET_DIR


for zip in $(ls struts2/assembly/target/assembly/out/*.zip);


do


  BASE_NAME=`basename $zip .zip`


  scp $zip  $TARGET_URL/$BASE_NAME-$TODAY.zip


done


ssh $TARGET_BASE "chmod g+w $TARGET_DIR/*.zip"

The logic in the shell script is copied quite a bit from James Mitchell's previous nightly script (thank James!). Currently, there is no logic for removing old files. I will add this as soon as more than 5 copies of the assembly zips have been published. This script is group writeable, so other developers can make changes to it. If Wes Wannemacher is unavailable, then this script can be copied to another location on the hudson zone and manipulated as necessary. Then, the struts2 job configuration can be updated as necessary.

...