fox-proxy/.agola/config.yml

48 lines
1.4 KiB
YAML
Raw Permalink Normal View History

2022-03-21 18:22:04 +00:00
version: v0
runs:
2022-03-21 20:12:42 +00:00
- name: Build image
2022-03-21 18:22:04 +00:00
docker_registries_auth:
'mxfox.ru':
username:
from_variable: mxfoxDockerLogin
2022-03-21 18:22:04 +00:00
password:
from_variable: mxfoxDockerSecret
2022-03-21 18:22:04 +00:00
tasks:
- name: build docker image
runtime:
containers:
- image: mxfox.ru/mxfox/docker-dind.buildx:latest
2022-03-21 18:22:04 +00:00
privileged: true
#shell: /busybox/sh
working_dir: /workspace
environment:
DOCKERLOGIN:
from_variable: mxfoxDockerLogin
2022-03-21 18:22:04 +00:00
DOCKERPASS:
from_variable: mxfoxDockerSecret
2022-03-21 18:22:04 +00:00
steps:
2022-03-21 20:12:42 +00:00
- clone:
2022-03-21 18:22:04 +00:00
- run:
2022-03-21 20:12:42 +00:00
name: buildX prepare
command: buildx-bgstart.sh
2022-03-21 18:22:04 +00:00
- run:
2022-03-21 20:12:42 +00:00
name: buildX build
2022-03-21 18:22:04 +00:00
command: |
2022-03-21 20:12:42 +00:00
case ${AGOLA_GIT_BRANCH} in
master)
export xBuildSuffix=" -t mxfox.ru/mxfox/fox-proxy:latest --push"
2022-03-21 20:12:42 +00:00
;;
test)
export xBuildSuffix=" -t mxfox.ru/mxfox/fox-proxy:test --push"
2022-03-21 20:12:42 +00:00
;;
*)
export xBuildSuffix=""
;;
esac
docker login mxfox.ru -u ${DOCKERLOGIN} -p ${DOCKERPASS}
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 . ${xBuildSuffix}