[bitnami/natscli,pinniped-cli] chore: 👷 Add VIB integration (#51503)

* [bitnami/natscli,pinniped-cli] chore: 👷 Add VIB integration

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

* fix: 🔧 Add arm64 in pinniped-cli

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

---------

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
This commit is contained in:
Javier J. Salmerón-García
2023-10-11 12:21:09 +02:00
committed by GitHub
parent 55298969da
commit ef80c75c67
8 changed files with 194 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0
gossfile:
# Goss tests exclusive to the current container
../../natscli/goss/natscli.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-spdx.yaml: {}

View File

@@ -0,0 +1,8 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0
user:
natscli:
exists: true
uid: 1001
gid: 0

View File

@@ -0,0 +1,9 @@
binaries:
- nats
root_dir: /opt/bitnami
directories:
- paths:
- /opt/bitnami/natscli
version:
bin_name: nats
flag: --version

View File

@@ -0,0 +1,66 @@
{
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
"actions": [
{
"action_id": "container-image-package",
"params": {
"application": {
"details": {
"name": "{VIB_ENV_CONTAINER}",
"tag": "{VIB_ENV_TAG}"
}
},
"architectures": ["linux/amd64", "linux/arm64"]
}
},
{
"action_id": "container-image-lint",
"params": {
"threshold": "error"
}
}
]
},
"verify": {
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "natscli/goss/goss.yaml",
"vars_file": "natscli/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-natscli"
}
}
}
},
{
"action_id": "trivy",
"params": {
"threshold": "CRITICAL",
"vuln_type": ["OS"]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": ["OS"]
}
}
]
}
}
}

View File

@@ -0,0 +1,14 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0
gossfile:
# Goss tests exclusive to the current container
../../pinniped-cli/goss/pinniped-cli.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-spdx.yaml: {}

View File

@@ -0,0 +1,8 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0
user:
pinniped-cli:
exists: true
uid: 1001
gid: 0

View File

@@ -0,0 +1,9 @@
binaries:
- pinniped
root_dir: /opt/bitnami
directories:
- paths:
- /opt/bitnami/pinniped-cli
version:
bin_name: pinniped
flag: version

View File

@@ -0,0 +1,66 @@
{
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
"actions": [
{
"action_id": "container-image-package",
"params": {
"application": {
"details": {
"name": "{VIB_ENV_CONTAINER}",
"tag": "{VIB_ENV_TAG}"
}
},
"architectures": ["linux/amd64", "linux/arm64"]
}
},
{
"action_id": "container-image-lint",
"params": {
"threshold": "error"
}
}
]
},
"verify": {
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "pinniped-cli/goss/goss.yaml",
"vars_file": "pinniped-cli/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-pinniped-cli"
}
}
}
},
{
"action_id": "trivy",
"params": {
"threshold": "CRITICAL",
"vuln_type": ["OS"]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": ["OS"]
}
}
]
}
}
}