Commit 3941b356 authored by ale's avatar ale
Browse files

Initial commit

parents
Pipeline #5271 passed with stages
in 2 minutes and 51 seconds
image: docker:latest
stages:
- build
- release
services:
- docker:dind
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
RELEASE_TAG: $CI_REGISTRY_IMAGE:latest
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.git.autistici.org
build:
stage: build
script:
- docker build --pull -t $IMAGE_TAG .
- docker push $IMAGE_TAG
release:
stage: release
script:
- docker pull $IMAGE_TAG
- docker tag $IMAGE_TAG $RELEASE_TAG
- docker push $RELEASE_TAG
only:
- master
FROM debian:buster
COPY build.sh /tmp/build.sh
RUN /tmp/build.sh && rm /tmp/build.sh
ENTRYPOINT ["/bin/sh"]
#!/bin/sh
#
# Install script for apache2-users inside a Docker container.
#
# Packages that are only used to build the container. These will be
# removed once we're done.
BUILD_PACKAGES="
golang
"
# Packages required to serve the website and run the services.
# We have to keep the python3 packages around in order to run
# chaperone (installed via pip).
PACKAGES="
bind9utils
curl
git
openssh-client
ansible
vagrant
vagrant-libvirt
libvirt-clients
python-jinja2
python-six
python-yaml
"
MITOGEN_VERSION="0.2.9"
MITOGEN_URL="https://networkgenomics.com/try/mitogen-${MITOGEN_VERSION}.tar.gz"
GO_PKGS="
git.autistici.org/ale/x509ca
git.autistici.org/ale/ed25519gen
"
# The default bitnami/minideb image defines an 'install_packages'
# command which is just a convenient helper. Define our own in
# case we are using some other Debian image.
if [ "x$(which install_packages)" = "x" ]; then
install_packages() {
env DEBIAN_FRONTEND=noninteractive apt-get install -qy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --no-install-recommends "$@"
}
fi
set -x
set -e
umask 022
apt-get -q update
install_packages ${BUILD_PACKAGES} ${PACKAGES}
# Download and install Mitogen.
(cd /usr/src ; \
curl -sL ${MITOGEN_URL} | tar xzf - ; \
chown -R root.root mitogen-${MITOGEN_VERSION})
echo "export MITOGEN=/usr/src/mitogen-${MITOGEN_VERSION}" \
> /etc/profile.d/mitogen.sh
# Install Go packages.
for pkg in $GO_PKGS; do
go get ${pkg}
done
mv $HOME/go/bin/* /usr/bin/
# Remove packages used for installation.
apt-get remove -y --purge ${BUILD_PACKAGES}
apt-get autoremove -y
apt-get clean
rm -fr /var/lib/apt/lists/*
rm -fr /tmp/conf
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment