Created
February 21, 2016 13:20
-
-
Save nemesifier/8c5d0749cda11113cb09 to your computer and use it in GitHub Desktop.
openwisp-config jenkins script
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
BASE_DIR="/var/www/downloads.openwisp.org/$JOB_NAME" | |
REVISION=$(git describe --tags --always) | |
ARCHS="ar71xx ramips" | |
cd openwrt && git pull || (git clone git://git.openwrt.org/openwrt.git --depth=1 && cd openwrt) | |
cp feeds.conf.default feeds.conf | |
echo "src-link openwisp $WORKSPACE" >> feeds.conf | |
./scripts/feeds update packages luci targets openwisp | |
./scripts/feeds install packages luci targets openwisp | |
for arch in $ARCHS; do | |
echo "CONFIG_TARGET_$arch=y" > .config; | |
echo "CONFIG_PACKAGE_openwisp-config=y" >> .config | |
make defconfig | |
make -j 16 tools/install | |
make -j 16 toolchain/install | |
make -j 16 package/polarssl/compile || make V=s package/polarssl/compile | |
make -j 16 package/polarssl/install | |
make -j 16 package/curl/compile || make V=s package/curl/compile | |
make -j 16 package/curl/install | |
make -j 16 package/ca-certificates/compile || make V=s package/ca-certificates/compile | |
make -j 16 package/ca-certificates/install | |
make -j 16 package/openwisp-config/compile || make V=s package/openwisp-config/compile | |
make -j 16 package/openwisp-config/install | |
BUILD_DIR="$BASE_DIR/$REVISION/$arch" | |
mkdir -p $BUILD_DIR | |
cp -vr bin/$arch/packages/openwisp/* $BUILD_DIR | |
rm -rf /bin/$arch/ | |
done | |
if [ -h "$BASE_DIR/latest" ]; then | |
rm "$BASE_DIR/latest" | |
fi | |
ln -s "$BASE_DIR/$REVISION" "$BASE_DIR/latest" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment