Archive for the ‘ Administration ’ Category

SVN pre-commit hook

Stop

How to avoid system files in your repository

Today Operating systems are often creating system files to accelerate directory operations:

MacOSX: ‘.DS_Store’
Windows: ‘Thumbs.db’
KDE: ‘.directory’
….

To avoid that these files mess up your repository, create inside the 'hook' directory a file named: 'pre-commit' (beside a the example file ‘pre-commit.tmpl’).
It is very important to make sure that the script has execution rights ( chmod a+x pre-commit )

#!/bin/bash
 
REPOS="$1"
TXN="$2"
 
SVNLOOK=/usr/bin/svnlook
 
# Make sure that the log message contains some text.
$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null
if [ $? -ne 0 ]; then
        echo "Log message not specified!" 1>&2
        exit 1
fi
 
# Do not commit crap like ...
CRAP_FILES=( '.DS_Store' 'Thumbs.db' '.directory' )
for FILE in $($SVNLOOK changed -t "$TXN" "$REPOS" | cut -b 5- | xargs basename); do
        for CRAP in "${CRAP_FILES[@]}"; do
                if [ "$FILE" = "$CRAP" ]; then
                        echo "Temporary files cannot be commited (ex: '.DS_Store', 'Thumbs.db')!" 1>&2
                        exit 1
                fi
        done
done
 
# All test passed
exit 0

Enjoy!

Building a Devops team

I found this really fantastic article about hiring for a DevOps team on: http://agilesysadmin.net

 

Building a Devops team

This is a guest post by Brian Henerey, from Sony Computer Entertainment Europe.

Background

I’ve had 3 roles at Sony since joining in August 2008. Nearly a year ago I took over the management of the original engineering team I joined. This was a failing team by any definition, but I was excited about the opportunity to reshape it. I knew the remaining team was deeply unhappy and likely to quit at any moment, so I had a few immediate goals:

Hire!

Keep people from quitting.

Hire!

via Building a Devops team –.

What DevOps Is Not

I really love this definition….

DevOps mean giving developers the root password

Many people seem to think we are promoting a world where developers and system administrators all just run wild on the production systems and that it will somehow work out for the best. This is not what we are promoting at all. First, we are promoting closer cooperation between teams. Most companies will still have a development team and an operations team. DevOps are those individuals and processes that build the bridges between these teams.

via What DevOps Is Not — Agile Web Development & Operations.