Support root-level spire-lib chart reuse (#785)
* Add root-level spire-lib chart Signed-off-by: Faisal Memon <[email protected]> * Make spire consume root-level spire-lib Signed-off-by: Faisal Memon <[email protected]> * Prepare chart dependencies in CI Signed-off-by: Faisal Memon <[email protected]> * Document DCO requirement in CODEX Signed-off-by: Faisal Memon <[email protected]> * Centralize local chart dependency prep Signed-off-by: Faisal Memon <[email protected]> * Exclude spire-lib from chart-testing install Signed-off-by: Faisal Memon <[email protected]> * Rename CODEX guide to AGENTS Signed-off-by: Faisal Memon <[email protected]> * Add make target for chart dependencies Signed-off-by: Faisal Memon <[email protected]> --------- Signed-off-by: Faisal Memon <[email protected]>
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT="$(readlink -f "$0")"
|
||||
SCRIPTPATH="$(dirname "${SCRIPT}")"
|
||||
REPO_ROOT="$(dirname "${SCRIPTPATH}")/.."
|
||||
|
||||
charts=(
|
||||
"charts/spire"
|
||||
"charts/spire-ha-agent"
|
||||
"charts/spire-nested"
|
||||
)
|
||||
|
||||
for chart in "${charts[@]}"; do
|
||||
chart_path="${REPO_ROOT}/${chart}"
|
||||
if grep -q 'file://../spire-lib' "${chart_path}/Chart.yaml"; then
|
||||
helm dependency update --skip-refresh "${chart_path}"
|
||||
fi
|
||||
done
|
||||
@@ -84,12 +84,20 @@ jobs:
|
||||
cache-dependency-path: tests/go.sum
|
||||
check-latest: true
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/[email protected]
|
||||
with:
|
||||
version: ${{ env.HELM_VERSION }}
|
||||
|
||||
- name: Install do dependencies
|
||||
run: |
|
||||
go mod download
|
||||
go install github.com/onsi/ginkgo/v2/ginkgo@latest
|
||||
working-directory: ./tests/unit
|
||||
|
||||
- name: Prepare local chart dependencies
|
||||
run: ./.github/scripts/prepare-local-chart-deps.sh
|
||||
|
||||
- name: Run Unit Tests
|
||||
run: ginkgo
|
||||
working-directory: ./tests/unit
|
||||
@@ -173,10 +181,13 @@ jobs:
|
||||
run: ./pre-install.sh
|
||||
working-directory: .github/tests
|
||||
|
||||
- name: Prepare local chart dependencies
|
||||
run: ./.github/scripts/prepare-local-chart-deps.sh
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
run: |
|
||||
helm install -n spire-server spire-crds charts/spire-crds
|
||||
ct install --config ct.yaml --excluded-charts spire-crds,spiffe-step-ssh,spire-ha-agent \
|
||||
ct install --config ct.yaml --excluded-charts spire-crds,spiffe-step-ssh,spire-ha-agent,spire-lib \
|
||||
--target-branch ${{ github.base_ref || inputs.target_branch }}
|
||||
|
||||
- name: Test summary
|
||||
@@ -252,6 +263,9 @@ jobs:
|
||||
config: .github/kind/conf/kind-config.yaml
|
||||
verbosity: 1
|
||||
|
||||
- name: Prepare local chart dependencies
|
||||
run: ./.github/scripts/prepare-local-chart-deps.sh
|
||||
|
||||
- name: Install and test example
|
||||
run: |
|
||||
if [ "${{ matrix.example }}" = "examples/federation" -o "${{ matrix.example }}" = "examples/nested-full" -o "${{ matrix.example }}" = "examples/nested-security" ]; then
|
||||
@@ -304,6 +318,9 @@ jobs:
|
||||
config: .github/kind/conf/kind-config.yaml
|
||||
verbosity: 1
|
||||
|
||||
- name: Prepare local chart dependencies
|
||||
run: ./.github/scripts/prepare-local-chart-deps.sh
|
||||
|
||||
- name: Install and test integration
|
||||
run: |
|
||||
helm install --create-namespace -n spire-mgmt spire-crds charts/spire-crds
|
||||
@@ -347,5 +364,8 @@ jobs:
|
||||
config: .github/kind/conf/kind-config.yaml
|
||||
verbosity: 1
|
||||
|
||||
- name: Prepare local chart dependencies
|
||||
run: ./.github/scripts/prepare-local-chart-deps.sh
|
||||
|
||||
- name: Install and test example
|
||||
run: tests/integration/production/run-tests.sh -u
|
||||
|
||||
Reference in New Issue
Block a user