docker-dind.buildx-git/.agola/config.yml

54 lines
1.4 KiB
YAML
Raw Normal View History

2022-05-02 13:50:43 +00:00
version: v0
runs:
- name: Build image
docker_registries_auth:
'mxfox.ru':
username:
from_variable: mxfoxDockerLogin
password:
from_variable: mxfoxDockerSecret
tasks:
# kaniko image doesn't have the git command installed
- name: checkout code
runtime:
containers:
- image: alpine/git
steps:
- clone:
- save_to_workspace:
contents:
- source_dir: .
2022-05-02 14:05:47 +00:00
dest_dir: /workspace
2022-05-02 13:50:43 +00:00
paths:
- '**'
- name: build docker image
runtime:
containers:
- image: gcr.io/kaniko-project/executor:debug
shell: /busybox/sh
environment:
DOCKERLOGIN:
from_variable: mxfoxDockerLogin
DOCKERPASS:
from_variable: mxfoxDockerSecret
steps:
- restore_workspace:
dest_dir: .
2022-05-02 14:01:09 +00:00
- run:
name: generate docker config
command: |
cat << EOF > /kaniko/.docker/config.json
{
"auths": {
"https://mxfox.ru/v1/": { "auth" : "`echo -n \"$DOCKERLOGIN:$DOCKERPASS\" | base64`" }
}
}
EOF
2022-05-02 13:50:43 +00:00
- run: /kaniko/executor --destination mxfox.ru/mxfox/docker-dind.buildx:latest
depends:
- checkout code