This commit is contained in:
parent
c03ddc6c69
commit
aa77b4d263
@ -15,9 +15,9 @@ local PipelineBuild(arch='amd64') = {
|
|||||||
repo: 'xoxys/molecule',
|
repo: 'xoxys/molecule',
|
||||||
username: { from_secret: 'docker_username' },
|
username: { from_secret: 'docker_username' },
|
||||||
password: { from_secret: 'docker_password' },
|
password: { from_secret: 'docker_password' },
|
||||||
build_args: {
|
build_args: [
|
||||||
MOLECULE_VERSION: '${DRONE_TAG%-*}',
|
'MOLECULE_VERSION=${DRONE_TAG%-*}',
|
||||||
},
|
],
|
||||||
},
|
},
|
||||||
when: {
|
when: {
|
||||||
ref: [
|
ref: [
|
||||||
@ -35,9 +35,9 @@ local PipelineBuild(arch='amd64') = {
|
|||||||
repo: 'xoxys/molecule',
|
repo: 'xoxys/molecule',
|
||||||
username: { from_secret: 'docker_username' },
|
username: { from_secret: 'docker_username' },
|
||||||
password: { from_secret: 'docker_password' },
|
password: { from_secret: 'docker_password' },
|
||||||
build_args: {
|
build_args: [
|
||||||
MOLECULE_VERSION: '${DRONE_TAG%-*}',
|
'MOLECULE_VERSION=${DRONE_TAG%-*}',
|
||||||
},
|
],
|
||||||
},
|
},
|
||||||
when: {
|
when: {
|
||||||
ref: [
|
ref: [
|
||||||
|
@ -11,7 +11,7 @@ steps:
|
|||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
build_args:
|
build_args:
|
||||||
MOLECULE_VERSION: ${DRONE_TAG%-*}
|
- MOLECULE_VERSION=${DRONE_TAG%-*}
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
dry_run: true
|
dry_run: true
|
||||||
password:
|
password:
|
||||||
@ -29,7 +29,7 @@ steps:
|
|||||||
auto_tag: true
|
auto_tag: true
|
||||||
auto_tag_suffix: amd64
|
auto_tag_suffix: amd64
|
||||||
build_args:
|
build_args:
|
||||||
MOLECULE_VERSION: ${DRONE_TAG%-*}
|
- MOLECULE_VERSION=${DRONE_TAG%-*}
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
@ -124,6 +124,6 @@ depends_on:
|
|||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: fa487cfd38a0eb95fe99e8c676b90426589aff4954556d23e59be0895771bcc4
|
hmac: 6a2f2a70cc4190a5b53d031261940b46d75e758c78da024c6945fe4740d70191
|
||||||
|
|
||||||
...
|
...
|
||||||
|
29
Dockerfile
29
Dockerfile
@ -16,9 +16,10 @@ ENV PY_COLORS=1 \
|
|||||||
|
|
||||||
COPY overlay/ /
|
COPY overlay/ /
|
||||||
|
|
||||||
RUN apk add --update --no-cache --virtual .build-deps gcc make libffi-dev musl-dev \
|
RUN \
|
||||||
openssl-dev python3-dev && \
|
# apk add --update --no-cache --virtual .build-deps gcc make libffi-dev musl-dev \
|
||||||
apk add --update --no-cache git openssh-client && \
|
# openssl-dev python3-dev && \
|
||||||
|
# apk add --update --no-cache git openssh-client && \
|
||||||
# Required to fix hcloud dependency:
|
# Required to fix hcloud dependency:
|
||||||
# hcloud 1.6.3 has requirement requests<2.23,>=2.20, but you'll have requests 2.23.0
|
# hcloud 1.6.3 has requirement requests<2.23,>=2.20, but you'll have requests 2.23.0
|
||||||
# echo "Installing ansible 'v$ANSIBLE_VERSION' ..." && \
|
# echo "Installing ansible 'v$ANSIBLE_VERSION' ..." && \
|
||||||
@ -26,18 +27,18 @@ RUN apk add --update --no-cache --virtual .build-deps gcc make libffi-dev musl-d
|
|||||||
# pip install -qq --no-cache-dir ansible~="$ANSIBLE_VERSION" && \
|
# pip install -qq --no-cache-dir ansible~="$ANSIBLE_VERSION" && \
|
||||||
# echo "Installing requirements ..." && \
|
# echo "Installing requirements ..." && \
|
||||||
echo "$TEST" && \
|
echo "$TEST" && \
|
||||||
MOLECULE_VERSION="${MOLECULE_VERSION#v}" && \
|
# MOLECULE_VERSION="${MOLECULE_VERSION#v}" && \
|
||||||
MOLECULE_MAJOR="${MOLECULE_VERSION%%.*}" && \
|
# MOLECULE_MAJOR="${MOLECULE_VERSION%%.*}" && \
|
||||||
echo "$MOLECULE_VERSION" && \
|
echo "$MOLECULE_VERSION" && \
|
||||||
pip install -qq --no-cache-dir -r /root/requirements.txt && \
|
# pip install -qq --no-cache-dir -r /root/requirements.txt && \
|
||||||
if [ -z "${MOLECULE_MAJOR//[0-9]}" ] && [ -n "$MOLECULE_MAJOR" ]; then \
|
# if [ -z "${MOLECULE_MAJOR//[0-9]}" ] && [ -n "$MOLECULE_MAJOR" ]; then \
|
||||||
echo "Installing molecule 'v$MOLECULE_VERSION' ..." && \
|
# echo "Installing molecule 'v$MOLECULE_VERSION' ..." && \
|
||||||
pip install -qq --no-cache-dir molecule~="$MOLECULE_VERSION"; \
|
# pip install -qq --no-cache-dir molecule~="$MOLECULE_VERSION"; \
|
||||||
else \
|
# else \
|
||||||
echo "Installing latest molecule ..." && \
|
# echo "Installing latest molecule ..." && \
|
||||||
pip install -qq --no-cache-dir molecule; \
|
# pip install -qq --no-cache-dir molecule; \
|
||||||
fi && \
|
# fi && \
|
||||||
apk del .build-deps && \
|
# apk del .build-deps && \
|
||||||
rm -rf /var/cache/apk/* && \
|
rm -rf /var/cache/apk/* && \
|
||||||
rm -rf /tmp/* && \
|
rm -rf /tmp/* && \
|
||||||
rm -rf /root/.cache/
|
rm -rf /root/.cache/
|
||||||
|
Reference in New Issue
Block a user