mirror of
https://github.com/bitnami/containers.git
synced 2026-03-07 10:07:20 +08:00
[bitnami/sonarqube] Add VIB tests (#28679)
* [bitnami/sonarqube] Add VIB tests Signed-off-by: FraPazGal <fdepaz@vmware.com> * Trim tests and remove faulty check Signed-off-by: FraPazGal <fdepaz@vmware.com> * Revert faulty check removal Signed-off-by: FraPazGal <fdepaz@vmware.com> * Remove faulty test Signed-off-by: FraPazGal <fdepaz@vmware.com> * Remove VIB trigger Signed-off-by: FraPazGal <fdepaz@vmware.com> * Fix typo and trigger VIB CI Signed-off-by: FraPazGal <fdepaz@vmware.com> * Remove VIB trigger Signed-off-by: FraPazGal <fdepaz@vmware.com> * Add goss template and tigger VIB Signed-off-by: FraPazGal <fdepaz@vmware.com> * Fix file test Signed-off-by: FraPazGal <fdepaz@vmware.com> * Remove VIB trigger Signed-off-by: FraPazGal <fdepaz@vmware.com> --------- Signed-off-by: FraPazGal <fdepaz@vmware.com>
This commit is contained in:
committed by
GitHub
parent
57992e35d1
commit
a49d0a217b
12
.vib/sonarqube/goss/goss.yaml
Normal file
12
.vib/sonarqube/goss/goss.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../sonarqube/goss/sonarqube.yaml: {}
|
||||
# Load scripts from .vib/common/goss/templates
|
||||
../../common/goss/templates/check-binaries.yaml: {}
|
||||
../../common/goss/templates/check-broken-symlinks.yaml: {}
|
||||
../../common/goss/templates/check-ca-certs.yaml: {}
|
||||
../../common/goss/templates/check-directories.yaml: {}
|
||||
../../common/goss/templates/check-files.yaml: {}
|
||||
../../common/goss/templates/check-linked-libraries.yaml: {}
|
||||
../../common/goss/templates/check-sed-in-place.yaml: {}
|
||||
../../common/goss/templates/check-spdx.yaml: {}
|
||||
24
.vib/sonarqube/goss/sonarqube.yaml
Normal file
24
.vib/sonarqube/goss/sonarqube.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
file:
|
||||
/opt/bitnami/sonarqube/bin/linux-x86-64/sonar.sh:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
{{ if regexMatch "^8.+" .Env.APP_VERSION }}
|
||||
- "PIDDIR=\"../../pids\""
|
||||
{{ else if regexMatch "^9.+" .Env.APP_VERSION }}
|
||||
- "PIDFILE=\"/opt/bitnami/sonarqube/pids/$APP_NAME.pid\""
|
||||
{{ end }}
|
||||
# Test specific for branch@8
|
||||
{{ if regexMatch "^8.+" .Env.APP_VERSION }}
|
||||
/opt/bitnami/sonarqube/conf/wrapper.conf:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- "wrapper.logfile.rollmode=NONE"
|
||||
{{ end }}
|
||||
group:
|
||||
sonarqube:
|
||||
exists: true
|
||||
user:
|
||||
sonarqube:
|
||||
exists: true
|
||||
19
.vib/sonarqube/goss/vars.yaml
Normal file
19
.vib/sonarqube/goss/vars.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
binaries:
|
||||
- gosu
|
||||
- java
|
||||
- psql
|
||||
directories:
|
||||
- mode: "0775"
|
||||
paths:
|
||||
- /bitnami/sonarqube
|
||||
- /bitnami/sonarqube-provisioning
|
||||
- /opt/bitnami/sonarqube/data
|
||||
- /opt/bitnami/sonarqube/extensions
|
||||
- /opt/bitnami/sonarqube/logs
|
||||
- /opt/bitnami/sonarqube/temp
|
||||
- /opt/bitnami/sonarqube/pids
|
||||
files:
|
||||
- mode: "0664"
|
||||
paths:
|
||||
- /opt/bitnami/sonarqube/conf/sonar.properties
|
||||
root_dir: /opt/bitnami
|
||||
@@ -3,7 +3,8 @@
|
||||
"resources": {
|
||||
"url": "{VIB_ENV_CONTAINER_URL}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
}
|
||||
},
|
||||
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||
},
|
||||
"phases": {
|
||||
"package": {
|
||||
@@ -63,9 +64,24 @@
|
||||
"url": "{VIB_ENV_PACKAGES_JSON_URL}",
|
||||
"path": "/{VIB_ENV_PATH}",
|
||||
"authn": {
|
||||
"header": "Authorization",
|
||||
"token": "Bearer {VIB_ENV_GITHUB_TOKEN}"
|
||||
}
|
||||
"header": "Authorization",
|
||||
"token": "Bearer {VIB_ENV_GITHUB_TOKEN}"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "sonarqube/goss/goss.yaml",
|
||||
"vars_file": "sonarqube/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-sonarqube"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
"resources": {
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
}
|
||||
},
|
||||
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||
},
|
||||
"phases": {
|
||||
"package": {
|
||||
@@ -46,6 +47,21 @@
|
||||
"OS"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "sonarqube/goss/goss.yaml",
|
||||
"vars_file": "sonarqube/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-sonarqube"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user