Add DroneCI config for build Docker image
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
317aac735f
commit
8314053506
@ -0,0 +1,36 @@
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build tagged docker image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
dockerfile: Dockerfile
|
||||
repo: evolix/ansible-roles
|
||||
auto_tag: true
|
||||
environment:
|
||||
ROLES_VERSION: $DRONE_COMMIT_SHA
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: build latest docker image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
dockerfile: Dockerfile
|
||||
repo: evolix/ansible-roles
|
||||
tags: latest
|
||||
environment:
|
||||
ROLES_VERSION: $DRONE_COMMIT_SHA
|
||||
when:
|
||||
branch:
|
||||
- unstable
|
||||
|
@ -0,0 +1,20 @@
|
||||
FROM debian:stretch-slim
|
||||
|
||||
ENV ROLES_VERSION=${ROLES_VERSION:-unstable}
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
git \
|
||||
ansible \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN ansible-galaxy install --force \
|
||||
--roles-path /etc/ansible \
|
||||
"git+https://gitea.evolix.org/evolix/ansible-roles.git,${ROLES_VERSION},roles"
|
||||
|
||||
ENV ANSIBLE_FORCE_COLOR=1
|
||||
ENV ANSIBLE_HOST_KEY_CHECKING=false
|
||||
ENV ANSIBLE_RETRY_FILES_ENABLED=false
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
ENTRYPOINT ["ansible-playbook"]
|
Loading…
Reference in New Issue