Use commit hash as image tag

This commit is contained in:
Nikolai Rodionov 2023-02-25 12:44:29 +01:00
parent eaef2d67e2
commit 0bfd66b78d
2 changed files with 31 additions and 13 deletions

View File

@ -7,8 +7,6 @@ type: kubernetes
name: Build badhouseplants.net
trigger:
branch:
- main
event:
- push
@ -29,16 +27,6 @@ steps:
commands:
- git submodule update --init --recursive
- name: Get static content
image: rclone/rclone:latest
environment:
RCLONE_CONFIG_CONTENT:
from_secret: RCLONE_CONFIG_CONTENT
RCLONE_CONFIG: /tmp/rclone.conf
commands:
- echo "$RCLONE_CONFIG_CONTENT" > $RCLONE_CONFIG
- rclone copy -P badhouseplants-public:/badhouseplants-static static
- name: Build and push the docker image
image: plugins/docker
settings:
@ -47,7 +35,7 @@ steps:
password:
from_secret: GITEA_TOKEN
repo: git.badhouseplants.net/allanger/badhouseplants-net
tags: latest
tags: ${DRONE_COMMIT_SHA}
depends_on:
- Init git submodules with themes
- Get static content

30
kube/applicationset.yaml Normal file
View File

@ -0,0 +1,30 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: badhouseplants-net
namespace: argo-system
spec:
generators:
- list:
elements:
- name: dynamic-charts
app: badhouseplants
branch: dynamic-charts
template:
metadata:
name: "{{ app }}-{{ name }}"
namespace: argo-system
spec:
project: "default"
source:
helm:
valueFiles:
- values.yaml
values: |-
{{ values }}
repoURL: https://git.badhouseplants.net/api/packages/allanger/helm
targetRevision: "{{ chart.version }}"
chart: badhouseplants-net
destination:
server: "{{ argo.cluster }}"
namespace: "{{ app }}-{{ name }}"