diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-05-06 18:27:27 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-05-06 18:27:27 +0200 |
commit | ef7e354035cc526eb88f43b48eb5c615997d24da (patch) | |
tree | 1b45c74d3cdbfdde60495e94bb7b5b3da8db6e62 /docker | |
parent | b889549e517953a8ce208389d5b485dadd1af387 (diff) | |
parent | 5b1411721f808cf1a779bb3807a3f249b1ac045b (diff) | |
download | vyos-build-ef7e354035cc526eb88f43b48eb5c615997d24da.tar.gz vyos-build-ef7e354035cc526eb88f43b48eb5c615997d24da.zip |
Merge branch 'current' of github.com:vyos/vyos-build into equuleus
* 'current' of github.com:vyos/vyos-build:
Jenkins: adjust artifacts to archive
Jenkins: remove dbg packages before assembling ISO to reduce size
hooks: initramfs: add option to update an existing initramfs
Revert "hooks: initramfs: add option to remove an existing initramfs"
T1366: Update Linux Kernel to v4.19.40
hooks: initramfs: add option to remove an existing initramfs
Jenkins: list build packages
Packages: add vyos-replace package to build procedure
intel: remove debhelper depencendy on linux-image
intel: set debhelper compat level to 9
Packages: add keepalived 2.0.10 to build procedure
Docker: add additional dependencies for Debian keepalived repo
Revert "Makefile: proper handle 'make iso' error codes"
Revert "use bash as the shell for make"
use bash as the shell for make
add reprepro deploy script
Packages: add net-snmp package to build procedure
Packages: remove duplicate '-j' statement when building Kernel
Diffstat (limited to 'docker')
-rw-r--r-- | docker/Dockerfile | 13 | ||||
-rwxr-xr-x | docker/pkg-build.sh | 55 |
2 files changed, 67 insertions, 1 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 792a45de..bfb56e50 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -263,8 +263,18 @@ RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \ libnl-3-200 \ libnl-3-dev \ + libnl-nf-3-200 \ + libnl-nf-3-dev \ + libipset-dev \ libnl-genl-3-200 \ - libnl-genl-3-dev + libnl-genl-3-dev \ + libpopt-dev + +# Packages needed for net-snmp +RUN apt-get update && apt-get install -y \ + python-all \ + python2.7-dev \ + libmysqld-dev # Install packer RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \ @@ -283,5 +293,6 @@ RUN echo "$(opam env --root=/opt/opam --set-root)" >> /etc/skel/.bashrc # Cleanup RUN rm -rf /tmp/* +COPY pkg-build.sh /usr/local/bin/pkg-build.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] diff --git a/docker/pkg-build.sh b/docker/pkg-build.sh new file mode 100755 index 00000000..598917a1 --- /dev/null +++ b/docker/pkg-build.sh @@ -0,0 +1,55 @@ +if [ -z "$1" ]; then + RELEASE=`echo $GIT_BRANCH | sed 's/origin\//* /g' |sed -n 's/^\* \(.*\)$/\1/p'` +else + RELEASE="$1" +fi + +if [ "$RELEASE" == "master" ]; then + RELEASE="current" +fi + +if [ -n "$1" ]; then + RELEASE="$1" +fi + +ARCH=`dpkg --print-architecture` +VYOS_REPO_PATH="/home/sentrium/web/dev.packages.vyos.net/public_html/repositories/$RELEASE/vyos/" + +exit_code () { +rc=$? +if [[ $rc != 0 ]] ; then + exit $rc +fi +} + +echo $RELEASE + +ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no khagen@dev.packages.vyos.net -t "bash --login -c 'mkdir -p ~/VyOS/$RELEASE/$ARCH'" +exit_code + +scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ../*.deb khagen@dev.packages.vyos.net:~/VyOS/$RELEASE/$ARCH/ +exit_code + +for PACKAGE in `ls ../*.deb`; +do + PACKAGE=`echo $PACKAGE| cut -d'/' -f 2` + SUBSTRING=`echo $PACKAGE| cut -d'_' -f 1` + if [[ "$PACKAGE" == *_all* ]]; then + ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no khagen@dev.packages.vyos.net -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} remove ${RELEASE} ${SUBSTRING}'" + exit_code + else + ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no khagen@dev.packages.vyos.net -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} -A $ARCH remove $RELEASE $SUBSTRING'" + exit_code + fi + ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no khagen@dev.packages.vyos.net -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} deleteunreferenced'" + exit_code + if [[ "$PACKAGE" == *_all* ]]; then + ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no khagen@dev.packages.vyos.net -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} includedeb $RELEASE ~/VyOS/$RELEASE/$ARCH/$PACKAGE'" + exit_code + else + ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no khagen@dev.packages.vyos.net -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} -A $ARCH includedeb $RELEASE ~/VyOS/$RELEASE/$ARCH/$PACKAGE'" + exit_code + fi +done + +rm -f ../*.deb |