107 lines
2.6 KiB
YAML
107 lines
2.6 KiB
YAML
image: docker:latest
|
|
|
|
variables:
|
|
GIT_STRATEGY: fetch
|
|
PACKER_VERSION: 1.2.0
|
|
ANNOUNCE: http://10.105.255.0:6969/announce
|
|
WEBSEED: http://10.105.255.0/labsync/$CI_COMMIT_REF_NAME/$CI_PIPELINE_ID/images
|
|
DOCKER_IMAGE: ${CI_REGISTRY_IMAGE}/labsync-builder
|
|
|
|
stages:
|
|
- prepare
|
|
- build
|
|
|
|
services:
|
|
- docker:dind
|
|
|
|
dockerimage:
|
|
stage: prepare
|
|
before_script:
|
|
- docker info
|
|
- apk add --no-cache make openssh-client
|
|
script:
|
|
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
|
|
- docker pull $DOCKER_IMAGE || true
|
|
- make dockerimg
|
|
- docker push $DOCKER_IMAGE
|
|
tags:
|
|
- fablab
|
|
|
|
aria2c:
|
|
stage: prepare
|
|
image: debian:stretch-slim
|
|
script:
|
|
- apt-get update
|
|
- apt-get -y install clang automake autoconf git make autopoint libtool pkg-config ccache wget jq
|
|
- aria2_tag="$(wget -q -O- https://api.github.com/repos/aria2/aria2/releases/latest|jq -r '.tag_name')"
|
|
- git clone -q -b "$aria2_tag" --depth 1 https://github.com/aria2/aria2 aria2
|
|
- export CCACHE_DIR=${PWD}/ccache
|
|
- cd aria2
|
|
- mkdir -p ccache
|
|
- export CCACHE_BASEDIR=${PWD}
|
|
- autoreconf -i
|
|
- automake
|
|
- autoconf
|
|
- export CXX="clang++ -Qunused-arguments -Wl,-s" CC="clang -Qunused-arguments -Wl,-s"
|
|
- >
|
|
./configure
|
|
--disable-ssl
|
|
--disable-metalink
|
|
--disable-websocket
|
|
--disable-epoll
|
|
--disable-largefile
|
|
--disable-nls
|
|
--disable-rpath
|
|
--without-libnettle
|
|
--without-libgmp
|
|
--without-libgcrypt
|
|
--without-openssl
|
|
--without-sqlite3
|
|
--without-libxml3
|
|
--without-libexpat
|
|
--without-libcares
|
|
--without-libz
|
|
--without-libssh2
|
|
ARIA2_STATIC=yes
|
|
- make CC="ccache $CC" CXX="ccache $CXX"
|
|
- mv src/aria2c ..
|
|
cache:
|
|
paths:
|
|
- ccache
|
|
artifacts:
|
|
paths:
|
|
- aria2c
|
|
expire_in: 2 weeks
|
|
tags:
|
|
- fablab
|
|
|
|
.squashfs_template: &squashfs_template
|
|
before_script:
|
|
- docker info
|
|
- apk add --no-cache make openssh-client
|
|
stage: build
|
|
script:
|
|
- make images/debian-stretch.squashfs
|
|
- echo "$rsa_labsync_raven" > /dev/shm/id_rsa && chmod 600 /dev/shm/id_rsa
|
|
- mkdir -p $HOME/.ssh && echo "$hostkeys_raven" >> $HOME/.ssh/known_hosts
|
|
- ssh -i /dev/shm/id_rsa labsync@raven.lab.fablab-nea.de "cd /opt/docker/tftpgen && make labsync.cfg" || true
|
|
artifacts:
|
|
paths:
|
|
- images
|
|
expire_in: 2 weeks
|
|
tags:
|
|
- fablab
|
|
|
|
squashfs_featurebranch:
|
|
<<: *squashfs_template
|
|
variables:
|
|
COMPRESSION_LEVEL: 5
|
|
except:
|
|
- master
|
|
|
|
squashfs_master:
|
|
<<: *squashfs_template
|
|
variables:
|
|
COMPRESSION_LEVEL: 7
|
|
only:
|
|
- master
|