Dan Anglin
0cedf15ad9
- Add Dockerfile to install Ansible and the playbook. - Add Makefile target to build the image. - Add Makefile target to run the playbook. - Add the playbook that ansible will run. - Add .dockerignore to limit the files added to the context. - Added a pipeline job to test the image build. - Added a pipeline job to lint the Dockerfile. This closes dananglin/pleroma-ansible-playbook#13
63 lines
948 B
YAML
63 lines
948 B
YAML
---
|
|
stages:
|
|
- test
|
|
|
|
.use-python:
|
|
image: python:3.7.6-slim-buster
|
|
|
|
.docker-dind-service:
|
|
services:
|
|
- docker:19.03.8-dind
|
|
|
|
.use-docker:
|
|
image: docker:19.03.8
|
|
|
|
.install-deps: &install-deps
|
|
- apk add --no-cache make
|
|
|
|
test:dockerfile-lint:
|
|
image: hadolint/hadolint:v1.17.5-alpine
|
|
script:
|
|
- hadolint ./Dockerfile
|
|
only:
|
|
refs:
|
|
- merge_requests
|
|
changes:
|
|
- Dockerfile
|
|
except:
|
|
refs:
|
|
- master
|
|
|
|
test:docker-image-build:
|
|
extends:
|
|
- .docker-dind-service
|
|
- .use-docker
|
|
script:
|
|
- *install-deps
|
|
- make image
|
|
stage: test
|
|
only:
|
|
refs:
|
|
- merge_requests
|
|
changes:
|
|
- Dockerfile
|
|
except:
|
|
refs:
|
|
- master
|
|
|
|
test:custom-modules:
|
|
extends: .use-python
|
|
stage: test
|
|
before_script:
|
|
- apt-get update && apt-get install make
|
|
- pip install ansible==2.9.6
|
|
script:
|
|
- make test_modules_unit
|
|
only:
|
|
refs:
|
|
- merge_requests
|
|
changes:
|
|
- library/*
|
|
except:
|
|
refs:
|
|
- master
|