fox-proxy-letsencrypt/.drone.yml

24 lines
828 B
YAML
Raw Normal View History

2022-11-28 09:42:33 +00:00
kind: pipeline
name: Build image
image_pull_secrets:
- dockerconfig
steps:
- name: Build docker image
image: mxfox.ru/mxfox/docker-dind.buildx:latest
privileged: true
environment:
DOCKER_AUTH:
from_secret: dockerconfig
2022-11-28 15:48:10 +00:00
IMAGE_PREFIX: mxfox.ru/mxfox/fox-proxy-lessl
2022-11-28 09:42:33 +00:00
commands:
- buildx-bgstart.sh
- echo $${DOCKER_AUTH} > ~/.docker/config.json
- |
if [ -n "${DRONE_TAG}" ]
then
export xBuildSuffix=" -t $${IMAGE_PREFIX}:${DRONE_TAG} -t $${IMAGE_PREFIX}:latest --push"
else
export xBuildSuffix=" -t $${IMAGE_PREFIX}:${CI_COMMIT_BRANCH}-${CI_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10} -t $${IMAGE_PREFIX}:${CI_COMMIT_BRANCH} --push"
fi
- docker buildx build --platform linux/amd64,linux/arm64,linux/arm . $${xBuildSuffix}