-
-
Save heph/9a8c5346250d39634503 to your computer and use it in GitHub Desktop.
Rebuild Nginx deb with nginx-statsd plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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: http://wiki.nginx.org/Install)" | |
exit 1 | |
fi | |
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) | |
CHANGELOG | |
mkdir modules | |
cd $WORKSPACE/nginx-*/debian/modules | |
wget https://github.com/zebrafishlabs/nginx-statsd/archive/master.tar.gz | |
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-*/ | |
dpkg-buildpackage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment