On Tue, 2015-02-03 at 02:33 +0000, Hepple, Robert wrote:
> On Mon, 2015-02-02 at 11:43 -0800, Vinod Kone wrote:
> > The "config-history" thing is interesting. Do you happen to know when
> > it gets generated? Are the config.xml files different in each of those
> > directories?
> 
> I did a bit more digging and reduced the number of config.xml change
> files to about 4500 by removing all those with no actual change with:
> 
> cd /mnt/storage/jenkins/config-history/config
> ls -r1| ( PREV=; while read DIR; do [[ "$PREV" ]] || { PREV=$DIR; continue; 
> }; diff -q $PREV/config.xml $DIR/config.xml && rm -rf $PREV; PREV=$DIR; done )

In case anyone needs it, this gets rid of jenkins config.xml changes
files that only differ in their mesos slaves:

cd /mnt/storage/jenkins/config-history/config
ls -r1| ( PREV=; while read DIR; do [[ "$PREV" ]] || { PREV=$DIR; continue; }; 
if diff -q <( xmlstarlet ed --delete 
//slaves/org.jenkinsci.plugins.mesos.MesosSlave $PREV/config.xml) <( xmlstarlet 
ed --delete //slaves/org.jenkinsci.plugins.mesos.MesosSlave $DIR/config.xml ) 
>/dev/null; then echo deleting $DIR; rm -rf $PREV; else echo "keeping $DIR"; 
fi; PREV=$DIR; done )

Hope it helps someone!


Cheers


Bob

-- 
Senior Software Engineer
T. 07 3224 9778
M. 04 1177 6888
Level 20, 300 Adelaide Street, Brisbane QLD 4000, Australia.

On 18th December 2014, MasterCard acquired the Gateway Services business
(TNSPay Retail and TNSPay eCommerce) of Transaction Network Services, to
join MasterCard’s global gateway business, DataCash.







Reply via email to