-
Notifications
You must be signed in to change notification settings - Fork 2
/
zarf.yaml
41 lines (40 loc) · 1.47 KB
/
zarf.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# yaml-language-server: $schema=https://raw.githubusercontent.com/defenseunicorns/zarf/main/zarf.schema.json
kind: ZarfPackageConfig
metadata:
name: sonarqube-common
description: "UDS SonarQube Common Package"
components:
- name: sonarqube
description: "Deploy sonarqube"
charts:
- name: uds-sonarqube-config
namespace: sonarqube
version: 0.1.0
localPath: ../chart
- name: sonarqube
namespace: sonarqube
url: https://SonarSource.github.io/helm-chart-sonarqube
version: 10.6.1
valuesFiles:
- ../values/common-values.yaml
images:
- ghcr.io/defenseunicorns/uds-package-sonarqube/monitoring:latest
actions:
onCreate:
before:
- cmd: |
docker buildx build --load ../src/monitoring-image -t ghcr.io/defenseunicorns/uds-package-sonarqube/monitoring:latest --platform linux/###ZARF_PKG_ARCH###
onDeploy:
after:
- description: Validate SonarQube Package
maxTotalSeconds: 300
wait:
cluster:
kind: Packages
name: sonarqube
namespace: sonarqube
condition: "'{.status.phase}'=Ready"
- description: Perform DB migrations if necessary
cmd: |
STATUS=$(curl -XPOST -s "https://sonarqube.$ZARF_VAR_DOMAIN/api/system/migrate_db" | ./zarf tools yq '.state')
echo "SonarQube migration state: ${STATUS}"