bitnami-containers/.vib/java-min/goss/java-min.yaml

37 lines
937 B
YAML

command:
check-java-version:
exec:
- java
{{- if regexMatch "^1.8.+" .Env.APP_VERSION }}
- -version
exit-status: 0
# APP_VERSION follows format 1.8.XXX-Y
# while stdout shows 1.8.0_XXX
stderr:
- /openjdk version "{{ (semver .Env.APP_VERSION).Major }}.{{ (semver .Env.APP_VERSION).Minor }}.*_{{ (semver .Env.APP_VERSION).Patch }}"/
{{- else }}
- --version
exit-status: 0
# Replace "-" with "+" in the version string
stdout:
- {{ .Env.APP_VERSION | replace "-" "+" | replace ".0.0+" "+" }}
{{- end }}
check-hello-world:
exec:
- java
- -jar
- /shared/java-min/goss/HelloWorld.jar
exit-status: 0
stdout:
- "Hello World"
{{- $releaseFile := readFile "/etc/os-release" }}
{{- if contains "photon" $releaseFile }}
file:
/opt/bitnami/bc-fips/bc-fips.jar:
exists: true
mode: "0644"
owner: root
group: root
filetype: file
{{- end }}