Skip to content

Commit

Permalink
Merge branch 'bitnami:main' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
covert8 authored Jul 18, 2023
2 parents 0a0d5ba + 0d4f8fd commit 0ff25d2
Show file tree
Hide file tree
Showing 973 changed files with 15,112 additions and 4,230 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BITNAMI_TEAM='["Akinorev","CeliaGMqrz","ClaaudiaGarcia","FraPazGal","Javirln","Mauraza","agarcia-oss","alemorcuq","alexherp","alvneiayu","andresbono","antgamdia","aoterolorenzo","aruiz14","beltran-rubo","bitnami-bot","carlossm","carrodher","castelblanque","corico44","cscazorla","dani8art","dariver","dgomezleon","fevisera","fjagugar","fmulero","gdelgadot","gfichtenholt","gongomgra","javsalgar","jbianquetti-nami","jiparis","joancafom","jotadrilo","jotamartos","juamedgod","kaysavps","mdhont","migruiz4","mpermar","pablogalegoc","ppbaena","rafariossaa","rloporp","rogelio-o","ruospalo","tompizmor","xoanteis","zubero"]'
BITNAMI_TEAM='["Akinorev","CeliaGMqrz","ClaaudiaGarcia","FraPazGal","Javirln","Mauraza","agarcia-oss","alemorcuq","alexherp","alvneiayu","andresbono","antgamdia","aoterolorenzo","aruiz14","beltran-rubo","bitnami-bot","carlossm","carrodher","castelblanque","corico44","cscazorla","dani8art","dariver","dgomezleon","fevisera","fjagugar","fmulero","gdelgadot","gfichtenholt","gongomgra","javsalgar","jbianquetti-nami","jiparis","joancafom","jotadrilo","jotamartos","juamedgod","juan131","kaysavps","mdhont","migruiz4","mpermar","pablogalegoc","ppbaena","rafariossaa","rloporp","rogelio-o","ruospalo","tompizmor","xoanteis","zubero"]'
IN_PROGRESS_COLUMN_ID=19026822
TRIAGE_COLUMN_ID=19026814
SOLVED_COLUMN_ID=19026825
Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/license-headers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,31 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- id: get-modified-files
name: 'Get modified files'
env:
DIFF_URL: "${{github.event.pull_request.diff_url}}"
TEMP_FILE: "${{runner.temp}}/pr-${{github.event.number}}.diff"
run: |
# This request doesn't consume API calls.
curl -Lkso $TEMP_FILE $DIFF_URL
files_changed="$(sed -nr 's/[\-\+]{3} [ab]\/(.*)/\1/p' $TEMP_FILE | sort | uniq)"
dockerfiles=()
while read -r file_changed; do
# Avoid removed files
if [[ -f "${file_changed}" ]]; then
dockerfiles+=("${file_changed}")
fi
done <<< "$(echo "$files_changed" | grep -oE ".*/Dockerfile$" | sort | uniq || true)"
if [[ ${#dockerfiles[@]} -gt 0 ]]; then
# There are modifications on dockerfiles
export dockerfiles_json=$(printf "%s\n" "${dockerfiles[@]}" | jq -R . | jq -cs .)
# Overwrite configuration file to analyze only changed dockerfiles
yq -i '. | .header.paths=env(dockerfiles_json)' .licenserc.yaml
echo "result=success" >> $GITHUB_OUTPUT
else
echo "result=skip" >> $GITHUB_OUTPUT
fi
- name: Check license Headers
uses: apache/skywalking-eyes/header@v0.4.0
uses: apache/skywalking-eyes/header@v0.4.0
if: ${{ steps.get-modified-files.outputs.result == 'success' }}
14 changes: 14 additions & 0 deletions .vib/jax/goss/goss.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0

gossfile:
# Goss tests exclusive to the current container
../../jax/goss/jax.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: {}
15 changes: 15 additions & 0 deletions .vib/jax/goss/jax.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0

user:
jax:
exists: true
uid: 1001
gid: 0
command:
run-jax:
exec: python -c 'import jax.numpy as jnp; from jax import grad, jit, vmap; from jax import random; key = random.PRNGKey(0); x = random.normal(key, (10,)); print(x)'
timeout: 8000
exit-status: 0
stdout:
- 0.3721109
10 changes: 10 additions & 0 deletions .vib/jax/goss/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
binaries:
- python
root_dir: /opt/bitnami
directories:
- paths:
# Paths to the client and server directories
- /opt/bitnami/python
version:
bin_name: python
flag: "-c 'import jax; print(jax.__version__)'"
123 changes: 123 additions & 0 deletions .vib/jax/vib-publish.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"context": {
"resources": {
"url": "{VIB_ENV_CONTAINER_URL}",
"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": "jax/goss/goss.yaml",
"vars_file": "jax/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-jax"
}
}
}
},
{
"action_id": "trivy",
"params": {
"threshold": "CRITICAL",
"vuln_type": [
"OS"
]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": [
"OS"
]
}
},
{
"action_id": "osspi-application",
"params": {
"additional_packages_file": "osspi-packages-amd64.json",
"scan_type": "BASE_OS",
"osm": {
"associated_bossd_release": "{VIB_ENV_BOSSD_RELEASE_ID}",
"product_name": "main-catalog-{VIB_ENV_CONTAINER}",
"product_version": "{VIB_ENV_APP_VERSION}-{VIB_ENV_OS_FLAVOUR}-container",
"architecture_overrides": [
{
"architecture": "linux/amd64",
"product_version": "{VIB_ENV_APP_VERSION}-{VIB_ENV_OS_FLAVOUR}-container",
"additional_packages_file": "osspi-packages-amd64.json"
},
{
"architecture": "linux/arm64",
"product_version": "{VIB_ENV_APP_VERSION}-{VIB_ENV_OS_FLAVOUR}-container-arm64",
"additional_packages_file": "osspi-packages-arm64.json"
}
]
},
"resources": {
"url": "{VIB_ENV_PACKAGES_JSON_URL}",
"path": "/{VIB_ENV_PATH}",
"authn": {
"header": "Authorization",
"token": "Bearer {VIB_ENV_GITHUB_TOKEN}"
}
}
}
}
]
},
"publish": {
"actions": [
{
"action_id": "container-image-publish",
"params": {
"metadata": {
"tags": {VIB_ENV_ROLLING_TAGS}
},
"repository": {
"kind": "OCI",
"url": "{VIB_ENV_REGISTRY_URL}",
"username": "{VIB_ENV_REGISTRY_USERNAME}",
"password": "{VIB_ENV_REGISTRY_PASSWORD}"
}
}
}
]
}
}
}
65 changes: 65 additions & 0 deletions .vib/jax/vib-verify.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"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}"
}
}
}
},
{
"action_id": "container-image-lint",
"params": {
"threshold": "error"
}
}
]
},
"verify": {
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "jax/goss/goss.yaml",
"vars_file": "jax/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-jax"
}
}
}
},
{
"action_id": "trivy",
"params": {
"threshold": "CRITICAL",
"vuln_type": ["OS"]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": ["OS"]
}
}
]
}
}
}
4 changes: 2 additions & 2 deletions .vib/milvus/goss/milvus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ file:
linked-to: /opt/bitnami/milvus/tmp
command:
run-milvus:
exec: cd /opt/bitnami/milvus; timeout --preserve-status 5 milvus run standalone || true
timeout: 8000
exec: cd /opt/bitnami/milvus; timeout --preserve-status 15 milvus run standalone || true
timeout: 20000
exit-status: 0
stdout:
- running Milvus components
14 changes: 14 additions & 0 deletions .vib/opensearch-dashboards/goss/goss.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0

gossfile:
# Goss tests exclusive to the current container
../../opensearch-dashboards/goss/opensearch-dashboards.yaml: {}
# Load scripts from .vib/common/goss/templates
../../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: {}
9 changes: 9 additions & 0 deletions .vib/opensearch-dashboards/goss/opensearch-dashboards.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0

command:
check-app-version:
exec: grep '"version":' /opt/bitnami/opensearch-dashboards/package.json
exit-status: 0
stdout:
- '"version": "{{ .Env.APP_VERSION }}",'
14 changes: 14 additions & 0 deletions .vib/opensearch-dashboards/goss/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
binaries:
- node
directories:
- mode: "0775"
paths:
- /bitnami/opensearch-dashboards
- /opt/bitnami/opensearch-dashboards/logs
- /opt/bitnami/opensearch-dashboards/plugins
- /opt/bitnami/opensearch-dashboards/tmp
- /opt/bitnami/opensearch-dashboards/config
files:
- paths:
- /opt/bitnami/opensearch-dashboards/package.json
root_dir: /opt/bitnami
Loading

0 comments on commit 0ff25d2

Please sign in to comment.