cleanup
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Robert Kaussow 2020-02-22 16:46:02 +01:00
parent ea9fd89537
commit dea378c303
3 changed files with 16 additions and 15 deletions

View File

@ -12,11 +12,11 @@ local PipelineBuild(arch='amd64') = {
settings: {
dry_run: true,
dockerfile: 'Dockerfile',
repo: 'xoxys/molecule',
repo: 'xoxys/${DRONE_REPO_NAME}',
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
build_args: [
'MOLECULE_VERSION=${DRONE_TAG%-*}',
'BUILD_VERSION=${DRONE_TAG%-*}',
],
},
when: {
@ -32,11 +32,11 @@ local PipelineBuild(arch='amd64') = {
auto_tag: true,
auto_tag_suffix: arch,
dockerfile: 'Dockerfile',
repo: 'xoxys/molecule',
repo: 'xoxys/${DRONE_REPO_NAME}',
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
build_args: [
'MOLECULE_VERSION=${DRONE_TAG%-*}',
'BUILD_VERSION=${DRONE_TAG%-*}',
],
},
when: {
@ -99,7 +99,7 @@ local PipelineNotifications(depends_on=[]) = {
DOCKERHUB_USERNAME: { from_secret: 'docker_username' },
DOCKERHUB_PASSWORD: { from_secret: 'docker_password' },
DOCKERHUB_REPO_PREFIX: 'xoxys',
DOCKERHUB_REPO_NAME: 'molecule',
DOCKERHUB_REPO_NAME: '${DRONE_REPO_NAME}',
README_PATH: 'README.md',
SHORT_DESCRIPTION: 'Molecule - Automated Ansible roles testing',
},

View File

@ -11,12 +11,12 @@ steps:
image: plugins/docker
settings:
build_args:
- MOLECULE_VERSION=${DRONE_TAG%-*}
- BUILD_VERSION=${DRONE_TAG%-*}
dockerfile: Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: xoxys/molecule
repo: xoxys/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
@ -29,11 +29,11 @@ steps:
auto_tag: true
auto_tag_suffix: amd64
build_args:
- MOLECULE_VERSION=${DRONE_TAG%-*}
- BUILD_VERSION=${DRONE_TAG%-*}
dockerfile: Dockerfile
password:
from_secret: docker_password
repo: xoxys/molecule
repo: xoxys/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
@ -86,7 +86,7 @@ steps:
environment:
DOCKERHUB_PASSWORD:
from_secret: docker_password
DOCKERHUB_REPO_NAME: molecule
DOCKERHUB_REPO_NAME: ${DRONE_REPO_NAME}
DOCKERHUB_REPO_PREFIX: xoxys
DOCKERHUB_USERNAME:
from_secret: docker_username
@ -126,6 +126,6 @@ depends_on:
---
kind: signature
hmac: 3a7e5e7004cee14e0fe11fce0fc1e7033b5bb525e4066ad4cc10586d2fc54630
hmac: 461d7541c6d7b1b46499d8d391ae5f9145845aa41e71787e0a79fea27803e4d1
...

View File

@ -7,12 +7,13 @@ LABEL maintainer="Robert Kaussow <mail@geeklabor.de>" \
org.label-schema.schema-version="1.0"
ARG ANSIBLE_VERSION=2.9.0
ARG MOLECULE_VERSION=latest
ARG BUILD_VERSION=latest
ENV PY_COLORS=1 \
ANSIBLE_FORCE_COLOR=true \
USER=root \
PATH=/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
PATH=/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin \
MOLECULE_VERSION="${BUILD_VERSION:-latest}"
COPY overlay/ /
@ -25,11 +26,11 @@ RUN apk add --update --no-cache --virtual .build-deps gcc make libffi-dev musl-d
pip install -qq --upgrade --no-cache-dir pip setuptools requests~=2.22.0 && \
pip install -qq --no-cache-dir ansible~="$ANSIBLE_VERSION" && \
echo "Installing requirements ..." && \
MOLECULE_VERSION="${MOLECULE_VERSION#v}" && \
MOLECULE_VERSION="${MOLECULE_VERSION##v}" && \
MOLECULE_MAJOR="${MOLECULE_VERSION%%.*}" && \
pip install -qq --no-cache-dir -r /root/requirements.txt && \
if [ -z "${MOLECULE_MAJOR//[0-9]}" ] && [ -n "$MOLECULE_MAJOR" ]; then \
echo "Installing molecule 'v$MOLECULE_VERSION' ..." && \
echo "Installing molecule version '$MOLECULE_VERSION' ..." && \
pip install -qq --no-cache-dir molecule~="$MOLECULE_VERSION"; \
else \
echo "Installing latest molecule ..." && \