2018-06-29 02:05:36 -07:00
|
|
|
version: 2
|
|
|
|
|
jobs:
|
|
|
|
|
build:
|
|
|
|
|
docker:
|
2018-06-29 02:18:45 -07:00
|
|
|
- image: continuumio/miniconda3:4.5.4
|
2018-06-29 02:05:36 -07:00
|
|
|
|
|
|
|
|
working_directory: ~/repo
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- checkout
|
|
|
|
|
|
|
|
|
|
# Download and cache dependencies
|
|
|
|
|
- restore_cache:
|
|
|
|
|
keys:
|
2018-06-29 02:18:45 -07:00
|
|
|
- v1-dependencies-miniconda3-4.5.4-{{ checksum "setup.py" }}-{{ checksum "dev-requirements.txt" }}
|
|
|
|
|
- v1-dependencies-miniconda3-4.5.4-
|
2018-06-29 02:05:36 -07:00
|
|
|
|
|
|
|
|
- run:
|
|
|
|
|
name: install dependencies
|
|
|
|
|
command: |
|
|
|
|
|
pip install -r dev-requirements.txt
|
|
|
|
|
pip install -e .
|
|
|
|
|
|
|
|
|
|
- save_cache:
|
|
|
|
|
paths:
|
2018-06-29 02:18:45 -07:00
|
|
|
- /opt/conda
|
2018-06-29 02:20:43 -07:00
|
|
|
key: v1-dependencies-miniconda3-4.5.4-{{ checksum "setup.py" }}-{{ checksum "dev-requirements.txt" }}
|
2018-06-29 02:05:36 -07:00
|
|
|
|
|
|
|
|
- run:
|
2018-06-29 02:26:20 -07:00
|
|
|
name: run unit tests
|
2018-06-29 02:05:36 -07:00
|
|
|
command: |
|
2018-06-29 02:21:02 -07:00
|
|
|
py.test tests/
|
2018-06-29 02:26:20 -07:00
|
|
|
|
|
|
|
|
# Run full installer test
|
|
|
|
|
- setup_remote_docker
|
|
|
|
|
|
|
|
|
|
- run:
|
2018-06-29 02:34:19 -07:00
|
|
|
#FIXME: Bake this into the base image
|
|
|
|
|
name: install docker
|
2018-06-29 02:26:20 -07:00
|
|
|
command: |
|
2018-06-29 02:34:19 -07:00
|
|
|
apt-get update
|
|
|
|
|
|
|
|
|
|
apt-get install --yes \
|
|
|
|
|
apt-transport-https \
|
|
|
|
|
ca-certificates \
|
|
|
|
|
curl \
|
|
|
|
|
gnupg2 \
|
|
|
|
|
software-properties-common
|
|
|
|
|
|
2018-06-29 02:41:47 -07:00
|
|
|
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
|
2018-06-29 02:34:19 -07:00
|
|
|
add-apt-repository \
|
|
|
|
|
"deb [arch=amd64] https://download.docker.com/linux/debian \
|
|
|
|
|
$(lsb_release -cs) \
|
|
|
|
|
stable"
|
|
|
|
|
|
|
|
|
|
apt-get update
|
2018-06-29 02:37:06 -07:00
|
|
|
|
2018-06-29 02:48:27 -07:00
|
|
|
apt-get install --yes docker-ce
|
2018-06-29 02:37:06 -07:00
|
|
|
|
|
|
|
|
- run:
|
2018-06-29 02:56:43 -07:00
|
|
|
name: build systemd image
|
2018-06-29 02:37:06 -07:00
|
|
|
command: |
|
|
|
|
|
docker build -t tljh-systemd .
|
2018-06-29 02:26:20 -07:00
|
|
|
|
|
|
|
|
- run:
|
2018-06-29 02:56:43 -07:00
|
|
|
name: start systemd image
|
2018-06-29 02:26:20 -07:00
|
|
|
command: |
|
|
|
|
|
docker run \
|
|
|
|
|
--privileged \
|
|
|
|
|
--detach \
|
2018-06-29 02:56:43 -07:00
|
|
|
--name=tljh-systemd-ci \
|
2018-06-29 02:26:20 -07:00
|
|
|
tljh-systemd
|
2018-06-29 02:56:43 -07:00
|
|
|
- run:
|
2018-06-29 03:12:16 -07:00
|
|
|
name: run tljh installer
|
2018-06-29 02:56:43 -07:00
|
|
|
command: |
|
|
|
|
|
docker cp . tljh-systemd-ci:/srv/src
|
2018-07-02 15:12:26 -07:00
|
|
|
docker exec -it tljh-systemd-ci python3 /srv/src/bootstrap/bootstrap.py
|
2018-06-29 03:12:16 -07:00
|
|
|
|
|
|
|
|
- run:
|
|
|
|
|
name: check jupyterhub is up
|
|
|
|
|
command: |
|
|
|
|
|
docker exec -it tljh-systemd-ci curl -L --fail http://localhost
|