Skip to content
Snippets Groups Projects
Verified Commit c6291acb authored by Varac's avatar Varac
Browse files

Add Dockerfile for CI image

parent d3fdcd86
No related branches found
No related tags found
No related merge requests found
ci_test_image:
stage: build
variables:
DOCKER_DRIVER: overlay2
image: docker:stable
services:
- docker:dind
before_script:
- docker info
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t openappstack/bootstrap/bootstrap-ci test/
- docker tag openappstack/bootstrap/bootstrap-ci docker.greenhost.net/openappstack/bootstrap/bootstrap-ci
- docker push docker.greenhost.net/openappstack/bootstrap/bootstrap-ci
only:
changes:
- test/Dockerfile
control_image:
stage: build
variables:
......@@ -18,16 +36,12 @@ control_image:
bootstrap:
stage: deploy
image: alpine
image: docker.greenhost.net/openappstack/bootstrap/bootstrap-ci
script:
# Ensure test/ is not world-writable otherwise ansible-playbook refuses to run, see
# https://docs.ansible.com/ansible/devel/reference_appendices/config.html#cfg-in-world-writable-dir
- chmod 755 test/
- cd test/
- apk --no-cache add ansible musl-dev linux-headers gcc py3-psutil py3-requests openssh-client chromium chromium-chromedriver
# p3-tabulate is not installable, see https://code.greenhost.net/openappstack/bootstrap/issues/54
# There is no alpine package for testinfra and behave(-webdriver)
- pip3 install behave-webdriver tabulate testinfra
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- ANSIBLE_HOST_KEY_CHECKING=False python3 -u ./ci-bootstrap.py --create_droplet
......
FROM alpine
LABEL Name="Openappstack bootstrap CI test image"
LABEL version="0.0.2"
LABEL vendor1="Greenhost"
RUN apk --no-cache add \
ansible \
musl-dev \
linux-headers \
gcc \
py3-psutil \
py3-requests \
openssh-client \
chromium \
chromium-chromedriver
# p3-tabulate is not installable via pip3,
# see https://code.greenhost.net/openappstack/bootstrap/issues/54
# There is no alpine package for testinfra and behave(-webdriver)
RUN pip3 install behave-webdriver tabulate testinfra
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment