blog/.agola/config.yml

62 lines
1.8 KiB
YAML
Raw Normal View History

2022-09-08 20:55:59 +00:00
version: v0
runs:
- name: Build
tasks:
2022-09-15 17:20:00 +00:00
- name: Checkout code
2022-09-08 20:55:59 +00:00
runtime:
type: pod
containers:
- image: docker.io/alpine/git
steps:
- clone:
2022-09-21 05:57:43 +00:00
recurse_submodules: true
2022-09-08 20:55:59 +00:00
- save_to_workspace:
contents:
- source_dir: .
dest_dir: .
paths:
- '**'
2022-09-15 17:08:17 +00:00
- name: Build
2022-09-08 20:55:59 +00:00
runtime:
containers:
- image: gcr.io/kaniko-project/executor:debug
2022-09-10 10:16:49 +00:00
environment:
DOCKERAUTH:
from_variable: dockerauth
2022-09-08 20:55:59 +00:00
shell: /busybox/sh
steps:
- restore_workspace:
dest_dir: .
- run:
name: generate docker config
command: |
cat << EOF > /kaniko/.docker/config.json
{
"auths": {
2022-09-18 09:58:41 +00:00
"https://code.icb4dc0.de": { "auth" : "$DOCKERAUTH" }
2022-09-08 20:55:59 +00:00
}
}
EOF
- run:
name: Build container image
command: |
/kaniko/executor \
--destination code.icb4dc0.de/prskr/blog:$AGOLA_GIT_COMMITSHA \
--destination code.icb4dc0.de/prskr/blog:latest \
--context dir:///root/project/ \
--dockerfile /root/project/Dockerfile
2022-09-08 20:55:59 +00:00
depends:
2022-09-15 17:20:00 +00:00
- Checkout code
2022-09-15 17:08:17 +00:00
- name: Deploy
runtime:
containers:
- image: docker.io/alpine/helm
2022-09-18 09:58:41 +00:00
service_account_name: agola
2022-09-15 17:08:17 +00:00
steps:
- restore_workspace:
dest_dir: .
- run:
name: Deploy Helm chart
2022-09-20 20:06:17 +00:00
command: helm upgrade --set image.tag=$AGOLA_GIT_COMMITSHA --install --namespace blog blog deploy/helm
2022-09-15 17:20:00 +00:00
depends:
- Build