diff --git a/.vib/neo4j/goss/goss.yaml b/.vib/neo4j/goss/goss.yaml new file mode 100644 index 000000000000..c70b0ed07552 --- /dev/null +++ b/.vib/neo4j/goss/goss.yaml @@ -0,0 +1,12 @@ +gossfile: + # Goss tests exclusive to the current container + ../../neo4j/goss/neo4j.yaml: {} + # Load scripts from .vib/common/goss/templates + ../../common/goss/templates/check-app-version.yaml: {} + ../../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-linked-libraries.yaml: {} + ../../common/goss/templates/check-sed-in-place.yaml: {} + ../../common/goss/templates/check-spdx.yaml: {} diff --git a/.vib/neo4j/goss/neo4j.yaml b/.vib/neo4j/goss/neo4j.yaml new file mode 100644 index 000000000000..68679fb9f6df --- /dev/null +++ b/.vib/neo4j/goss/neo4j.yaml @@ -0,0 +1,24 @@ +file: + # Check config files + /opt/bitnami/neo4j/conf/apoc.conf: + exists: true + filetype: file + mode: "0664" + contains: + - /file\.enabled.*true/ + /opt/bitnami/neo4j/conf/neo4j.conf: + exists: true + filetype: file + contains: + {{ if regexMatch "^4.+" .Env.APP_VERSION }} + - /dbms\.directories\.data.*\/bitnami\/neo4j\/data/ + {{ else if regexMatch "^5.+" .Env.APP_VERSION }} + - /server\.directories\.data.*\/bitnami\/neo4j\/data/ + {{ end }} +command: + check-neo4j-daemon: + exec: neo4j start; neo4j status + exit-status: 0 + timeout: 10000 + stdout: + - "Neo4j is running" diff --git a/.vib/neo4j/goss/vars.yaml b/.vib/neo4j/goss/vars.yaml new file mode 100644 index 000000000000..93ee31c3541f --- /dev/null +++ b/.vib/neo4j/goss/vars.yaml @@ -0,0 +1,27 @@ +binaries: + - cypher-shell + - java + - neo4j + - neo4j-admin +directories: + - mode: "0555" + paths: + - /bitnami/neo4j/import + - /bitnami/neo4j/certificates + - /bitnami/neo4j/conf + - /bitnami/neo4j/plugins + - /opt/bitnami/neo4j/lib + - /docker-entrypoint-initdb.d + - mode: "0775" + paths: + - /bitnami/neo4j/data + - /bitnami/neo4j/metrics + - /opt/bitnami/neo4j/conf + - /opt/bitnami/neo4j/plugins + - /opt/bitnami/neo4j/logs + - /opt/bitnami/neo4j/run + - /opt/bitnami/neo4j/.home +root_dir: /opt/bitnami +version: + bin_name: neo4j + flag: --version diff --git a/.vib/neo4j/vib-publish.json b/.vib/neo4j/vib-publish.json index 8b6fe8eab4e6..a58fa61124ee 100644 --- a/.vib/neo4j/vib-publish.json +++ b/.vib/neo4j/vib-publish.json @@ -3,7 +3,8 @@ "resources": { "url": "{VIB_ENV_CONTAINER_URL}", "path": "{VIB_ENV_PATH}" - } + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" }, "phases": { "package": { @@ -77,9 +78,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": "neo4j/goss/goss.yaml", + "vars_file": "neo4j/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-neo4j" + } } } } diff --git a/.vib/neo4j/vib-verify.json b/.vib/neo4j/vib-verify.json index a34e8aee9161..d969f8a8d7da 100644 --- a/.vib/neo4j/vib-verify.json +++ b/.vib/neo4j/vib-verify.json @@ -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": "neo4j/goss/goss.yaml", + "vars_file": "neo4j/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-neo4j" + } + } + } } ] }