0
0
mirror of https://github.com/thegeeklab/wp-ansible.git synced 2024-11-24 22:50:39 +00:00

refactor: cleanup docker setup (#9)

This commit is contained in:
Robert Kaussow 2021-02-09 10:45:07 +01:00 committed by GitHub
parent aefe9b8813
commit c1dcfa78f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 9 deletions

View File

@ -143,7 +143,7 @@ def linux(ctx, arch):
"name": "docker", "name": "docker",
"image": "plugins/docker", "image": "plugins/docker",
"settings": { "settings": {
"dockerfile": "docker/Dockerfile.linux.%s" % (arch), "dockerfile": "docker/Dockerfile.%s" % (arch),
"repo": "owncloudci/%s" % (ctx.repo.name), "repo": "owncloudci/%s" % (ctx.repo.name),
"username": { "username": {
"from_secret": "docker_username", "from_secret": "docker_username",
@ -152,14 +152,26 @@ def linux(ctx, arch):
"from_secret": "docker_password", "from_secret": "docker_password",
}, },
"auto_tag": True, "auto_tag": True,
"auto_tag_suffix": "linux-%s" % (arch), "auto_tag_suffix": "%s" % (arch),
},
})
else:
steps.append({
"name": "dryrun",
"image": "plugins/docker",
"settings": {
'dry_run': True,
"dockerfile": "docker/Dockerfile.%s" % (arch),
"repo": "owncloudci/%s" % (ctx.repo.name),
"auto_tag": True,
"auto_tag_suffix": "%s" % (arch),
}, },
}) })
return { return {
"kind": "pipeline", "kind": "pipeline",
"type": "docker", "type": "docker",
"name": "linux-%s" % (arch), "name": "build-%s" % (arch),
"platform": { "platform": {
"os": "linux", "os": "linux",
"arch": arch, "arch": arch,

View File

@ -7,8 +7,10 @@ LABEL org.opencontainers.image.url="https://github.com/owncloud-ci/drone-ansible
LABEL org.opencontainers.image.source="https://github.com/owncloud-ci/drone-ansible" LABEL org.opencontainers.image.source="https://github.com/owncloud-ci/drone-ansible"
LABEL org.opencontainers.image.documentation="https://github.com/owncloud-ci/drone-ansible" LABEL org.opencontainers.image.documentation="https://github.com/owncloud-ci/drone-ansible"
ARG ANSIBLE_VERSION
# renovate: datasource=pypi depName=ansible # renovate: datasource=pypi depName=ansible
ENV ANSIBLE_VERSION="2.10.5" ENV ANSIBLE_VERSION="${ANSIBLE_VERSION:-2.10.5}"
RUN apk add --no-cache bash git curl rsync openssh-client sshpass py3-pip py3-requests py3-paramiko python3-dev libffi-dev libressl-dev libressl build-base && \ RUN apk add --no-cache bash git curl rsync openssh-client sshpass py3-pip py3-requests py3-paramiko python3-dev libffi-dev libressl-dev libressl build-base && \
pip3 install -U pip && \ pip3 install -U pip && \

View File

@ -7,8 +7,10 @@ LABEL org.opencontainers.image.url="https://github.com/owncloud-ci/drone-ansible
LABEL org.opencontainers.image.source="https://github.com/owncloud-ci/drone-ansible" LABEL org.opencontainers.image.source="https://github.com/owncloud-ci/drone-ansible"
LABEL org.opencontainers.image.documentation="https://github.com/owncloud-ci/drone-ansible" LABEL org.opencontainers.image.documentation="https://github.com/owncloud-ci/drone-ansible"
ARG ANSIBLE_VERSION
# renovate: datasource=pypi depName=ansible # renovate: datasource=pypi depName=ansible
ENV ANSIBLE_VERSION="2.10.5" ENV ANSIBLE_VERSION="${ANSIBLE_VERSION:-2.10.5}"
RUN apk add --no-cache bash git curl rsync openssh-client sshpass py3-pip py3-requests py3-paramiko python3-dev libffi-dev libressl-dev libressl build-base && \ RUN apk add --no-cache bash git curl rsync openssh-client sshpass py3-pip py3-requests py3-paramiko python3-dev libffi-dev libressl-dev libressl build-base && \
pip3 install -U pip && \ pip3 install -U pip && \

View File

@ -7,8 +7,10 @@ LABEL org.opencontainers.image.url="https://github.com/owncloud-ci/drone-ansible
LABEL org.opencontainers.image.source="https://github.com/owncloud-ci/drone-ansible" LABEL org.opencontainers.image.source="https://github.com/owncloud-ci/drone-ansible"
LABEL org.opencontainers.image.documentation="https://github.com/owncloud-ci/drone-ansible" LABEL org.opencontainers.image.documentation="https://github.com/owncloud-ci/drone-ansible"
ARG ANSIBLE_VERSION
# renovate: datasource=pypi depName=ansible # renovate: datasource=pypi depName=ansible
ENV ANSIBLE_VERSION="2.10.5" ENV ANSIBLE_VERSION="${ANSIBLE_VERSION:-2.10.5}"
RUN apk add --no-cache bash git curl rsync openssh-client sshpass py3-pip py3-requests py3-paramiko python3-dev libffi-dev libressl-dev libressl build-base && \ RUN apk add --no-cache bash git curl rsync openssh-client sshpass py3-pip py3-requests py3-paramiko python3-dev libffi-dev libressl-dev libressl build-base && \
pip3 install -U pip && \ pip3 install -U pip && \

View File

@ -6,16 +6,16 @@ tags:
{{/each}} {{/each}}
{{/if}} {{/if}}
manifests: manifests:
- image: owncloudci/drone-ansible:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 - image: owncloudci/drone-ansible:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}amd64
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux
- image: owncloudci/drone-ansible:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 - image: owncloudci/drone-ansible:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm64
platform: platform:
architecture: arm64 architecture: arm64
os: linux os: linux
variant: v8 variant: v8
- image: owncloudci/drone-ansible:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm - image: owncloudci/drone-ansible:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm
platform: platform:
architecture: arm architecture: arm
os: linux os: linux