Added CI
agola/module-packer/Build image The run finished successfully
Details
agola/module-packer/Build image The run finished successfully
Details
This commit is contained in:
parent
8e93dce6e6
commit
95b85af0f5
|
@ -0,0 +1,55 @@
|
||||||
|
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
|
||||||
|
working_dir: '/workspace'
|
||||||
|
runtime:
|
||||||
|
containers:
|
||||||
|
- image: alpine/git
|
||||||
|
steps:
|
||||||
|
- clone:
|
||||||
|
- save_to_workspace:
|
||||||
|
contents:
|
||||||
|
- source_dir: .
|
||||||
|
dest_dir: .
|
||||||
|
paths:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
- name: build docker image
|
||||||
|
working_dir: '/workspace'
|
||||||
|
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: .
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: generate docker config
|
||||||
|
command: |
|
||||||
|
cat << EOF > /kaniko/.docker/config.json
|
||||||
|
{
|
||||||
|
"auths": {
|
||||||
|
"https://mxfox.ru/v1/": { "auth" : "`echo -n \"$DOCKERLOGIN:$DOCKERPASS\" | base64`" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
- run: /kaniko/executor --destination mxfox.ru/mxfox/module-packer:latest
|
||||||
|
depends:
|
||||||
|
- checkout code
|
||||||
|
|
Loading…
Reference in New Issue