-
Notifications
You must be signed in to change notification settings - Fork 14
/
.gitlab-ci.yml
61 lines (56 loc) · 2.41 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
image: quay.io/vgteam/dind
before_script:
- whoami
- export DEBIAN_FRONTEND=noninteractive
- apt-get -q -y update
# Make sure we have some curl stuff for pycurl which we need for some Python stuff
- apt-get -q -y install --no-upgrade docker.io python3-pip python3-virtualenv libcurl4-gnutls-dev python-dev libgnutls28-dev libssl-dev uuid-dev libgpgme11-dev libseccomp-dev cryptsetup-bin pkg-config
# Ubuntu 20.04 doesn't seem to ship singularity, so we install from source
# https://stackoverflow.com/questions/50537404/error-called-singularity-config-get-value-on-uninitialized-config-subsystem-wh
- apt-get -q -y install wget libarchive-dev squashfs-tools
- wget -q https://dl.google.com/go/go1.13.3.linux-amd64.tar.gz
- tar xf go1.13.3.linux-amd64.tar.gz
- rm go1.13.3.linux-amd64.tar.gz
- mv go/bin/* /usr/bin/
- mv go /usr/local/
- mkdir -p $(go env GOPATH)/src/github.com/sylabs
- pushd $(go env GOPATH)/src/github.com/sylabs
- git clone https://github.com/sylabs/singularity.git
- cd singularity
- git checkout v3.4.2
- ./mconfig
- cd ./builddir
- make -j8
- make install
- popd
- mkdir -p /usr/local/libexec/toil
- mv /usr/local/bin/singularity /usr/local/libexec/toil/singularity-real
- curl -sSL https://raw.githubusercontent.com/DataBiosphere/toil/e556fa059df029366de237566237584df6a49630/docker/singularity-wrapper.sh >/usr/local/bin/singularity
- chmod 755 /usr/local/bin/singularity
# TODO: Make Singularity use the Docker cache with a wrapper like Toil will.
# Configure Docker to use a mirror for Docker Hub and restart the daemon
# Set the registry as insecure because it is probably cluster-internal over plain HTTP.
- |
if [[ ! -z "${DOCKER_HUB_MIRROR}" ]] ; then
echo "{\"registry-mirrors\": [\"${DOCKER_HUB_MIRROR}\"], \"insecure-registries\": [\"${DOCKER_HUB_MIRROR##*://}\"]}" | sudo tee /etc/docker/daemon.json
export SINGULARITY_DOCKER_HUB_MIRROR="${DOCKER_HUB_MIRROR}"
fi
- startdocker || true
- docker info
# Build .pypirc with PyPI credentials
- touch ~/.pypirc
- chmod 600 ~/.pypirc
- 'printf "[distutils]\nindex-servers =\n pypi\n\n[pypi]\nusername: ${PYPI_USERNAME}\npassword: ${PYPI_PASSWORD}\n" > ~/.pypirc'
after_script:
- stopdocker || true
stages:
- test
test-job:
stage: test
script:
- ./ci.sh
artifacts:
# Let Gitlab see the junit report
reports:
junit: test-report.xml
when: always