Create a gist now

Instantly share code, notes, and snippets.

@heph / Secret
Last active Aug 29, 2015

What would you like to do?
Rebuild Nginx deb with nginx-statsd plugin
#!/bin/bash -ex
if [ ! -e "/etc/apt/sources.list.d/nginx.list" ]; then
echo "ERROR! This build slave isn't configured with the nginx apt mirror! (see:"
exit 1
apt-get source nginx
cd $WORKSPACE/nginx-*/debian/
# Increment the package version by updating the changelog
cat > changelog <<CHANGELOG;
nginx (1.6.2-${BUILD_NUMBER}.local) trusty; urgency=medium
* Package built by jenkins
-- jenkins <${USER}@${NODE_NAME}> $(date -R)
mkdir modules
cd $WORKSPACE/nginx-*/debian/modules
tar xvf master.tar.gz
rm master.tar.gz
# Enable the nginx-statsd module
sed -i 's|CFLAGS="" ./configure \\|CFLAGS="" ./configure --add-module=debian/modules/nginx-statsd-master \\|' $WORKSPACE/nginx-*/debian/rules
cd $WORKSPACE/nginx-*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment