From 8fd55bfe62ec7dbd18fe628fe426a42ff08b0f25 Mon Sep 17 00:00:00 2001 From: Pavel Dmitriev Date: Mon, 28 Nov 2022 12:42:33 +0300 Subject: [PATCH] added crone.ci --- .drone.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .drone.yml diff --git a/ .drone.yml b/ .drone.yml new file mode 100644 index 0000000..88a97e0 --- /dev/null +++ b/ .drone.yml @@ -0,0 +1,24 @@ +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 + IMAGE_PREFIX: mxfox.ru/mxfox/fox-fennec-basic + + 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} \ No newline at end of file