2022-03-30 04:46:56 -04:00
|
|
|
name: "Charts: Test"
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
checkoutCommit:
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
chartChangesDetected:
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
unit-test:
|
|
|
|
name: Run unit tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-22 15:28:18 -04:00
|
|
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
2022-03-30 04:46:56 -04:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
ref: ${{ inputs.checkoutCommit }}
|
|
|
|
|
|
|
|
- name: Install Kubernetes tools
|
2022-06-29 06:18:35 -04:00
|
|
|
uses: yokawasa/action-setup-kube-tools@f7f73d7965074b0f5491b7210ff51e3254d42058 # tag=v0.8.2
|
2022-03-30 04:46:56 -04:00
|
|
|
with:
|
|
|
|
setup-tools: |
|
|
|
|
helmv3
|
|
|
|
helm: "3.8.0"
|
|
|
|
|
|
|
|
- name: Install Ruby
|
|
|
|
uses: ruby/setup-ruby@v1
|
|
|
|
with:
|
|
|
|
ruby-version: 2.7
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
env:
|
|
|
|
RUBYJQ_USE_SYSTEM_LIBRARIES: 1
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install libjq-dev
|
|
|
|
bundle install
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
bundle exec m -r ./test/
|
|
|
|
|
|
|
|
generate-install-matrix:
|
|
|
|
name: Generate matrix for install
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
2022-03-30 15:01:34 -04:00
|
|
|
matrix1: |
|
2022-03-30 04:46:56 -04:00
|
|
|
{
|
2022-03-30 15:01:34 -04:00
|
|
|
"chart": ${{ steps.list-changed.outputs.charts1 }}
|
|
|
|
}
|
|
|
|
matrix2: |
|
|
|
|
{
|
|
|
|
"chart": ${{ steps.list-changed.outputs.charts2 }}
|
2022-03-30 04:46:56 -04:00
|
|
|
}
|
2022-04-05 13:30:02 -04:00
|
|
|
matrix3: |
|
|
|
|
{
|
|
|
|
"chart": ${{ steps.list-changed.outputs.charts3 }}
|
|
|
|
}
|
|
|
|
matrix4: |
|
|
|
|
{
|
|
|
|
"chart": ${{ steps.list-changed.outputs.charts4 }}
|
|
|
|
}
|
|
|
|
matrix5: |
|
|
|
|
{
|
|
|
|
"chart": ${{ steps.list-changed.outputs.charts5 }}
|
|
|
|
}
|
|
|
|
matrix6: |
|
|
|
|
{
|
|
|
|
"chart": ${{ steps.list-changed.outputs.charts6 }}
|
|
|
|
}
|
2022-03-31 05:17:40 -04:00
|
|
|
detected1: ${{ steps.list-changed.outputs.detected1 }}
|
|
|
|
detected2: ${{ steps.list-changed.outputs.detected2 }}
|
2022-04-05 13:30:02 -04:00
|
|
|
detected3: ${{ steps.list-changed.outputs.detected3 }}
|
|
|
|
detected4: ${{ steps.list-changed.outputs.detected4 }}
|
|
|
|
detected5: ${{ steps.list-changed.outputs.detected5 }}
|
|
|
|
detected6: ${{ steps.list-changed.outputs.detected6 }}
|
2022-03-30 04:46:56 -04:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-22 15:28:18 -04:00
|
|
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
2022-03-30 04:46:56 -04:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
ref: ${{ inputs.checkoutCommit }}
|
|
|
|
|
|
|
|
- name: Set up chart-testing
|
2022-08-11 08:36:25 -04:00
|
|
|
uses: helm/chart-testing-action@09ed88797198755e5031f25be13da255e7e33aad # tag=v2.3.0
|
2022-03-30 04:46:56 -04:00
|
|
|
|
|
|
|
- name: Run chart-testing (list-changed)
|
|
|
|
id: list-changed
|
|
|
|
if: inputs.chartChangesDetected == 'true'
|
|
|
|
run: |
|
|
|
|
EXCLUDED=$(yq eval -o=json '.excluded-charts // []' .github/ct-install.yaml)
|
|
|
|
CHARTS=$(ct list-changed --config .github/ct-install.yaml)
|
|
|
|
CHARTS_JSON=$(echo "${CHARTS}" | jq -R -s -c 'split("\n")[:-1]')
|
|
|
|
OUTPUT_JSON=$(echo "{\"excluded\": ${EXCLUDED}, \"all\": ${CHARTS_JSON}}" | jq -c '.all-.excluded')
|
2022-06-07 13:41:19 -04:00
|
|
|
OUTPUT_JSON1=$((echo $OUTPUT_JSON | jq -r -c '.[:50]'; echo $OUTPUT_JSON | jq -r -c '.[301:350]'; echo $OUTPUT_JSON | jq -r -c '.[601:650]'; echo $OUTPUT_JSON | jq -r -c '.[901:950]'; echo $OUTPUT_JSON | jq -r -c '.[1201:1250]') | jq -s add)
|
|
|
|
OUTPUT_JSON2=$((echo $OUTPUT_JSON | jq -r -c '.[51:100]'; echo $OUTPUT_JSON | jq -r -c '.[351:400]'; echo $OUTPUT_JSON | jq -r -c '.[651:700]'; echo $OUTPUT_JSON | jq -r -c '.[951:1000]'; echo $OUTPUT_JSON | jq -r -c '.[1251:1300]') | jq -s add)
|
|
|
|
OUTPUT_JSON3=$((echo $OUTPUT_JSON | jq -r -c '.[101:150]'; echo $OUTPUT_JSON | jq -r -c '.[401:450]'; echo $OUTPUT_JSON | jq -r -c '.[701:750]'; echo $OUTPUT_JSON | jq -r -c '.[1001:1050]'; echo $OUTPUT_JSON | jq -r -c '.[1301:1350]') | jq -s add)
|
|
|
|
OUTPUT_JSON4=$((echo $OUTPUT_JSON | jq -r -c '.[151:200]'; echo $OUTPUT_JSON | jq -r -c '.[451:500]'; echo $OUTPUT_JSON | jq -r -c '.[751:800]'; echo $OUTPUT_JSON | jq -r -c '.[1051:1100]'; echo $OUTPUT_JSON | jq -r -c '.[1351:1400]') | jq -s add)
|
|
|
|
OUTPUT_JSON5=$((echo $OUTPUT_JSON | jq -r -c '.[201:250]'; echo $OUTPUT_JSON | jq -r -c '.[501:550]'; echo $OUTPUT_JSON | jq -r -c '.[801:850]'; echo $OUTPUT_JSON | jq -r -c '.[1101:1150]'; echo $OUTPUT_JSON | jq -r -c '.[1401:1450]') | jq -s add)
|
|
|
|
OUTPUT_JSON6=$((echo $OUTPUT_JSON | jq -r -c '.[251:300]'; echo $OUTPUT_JSON | jq -r -c '.[551:600]'; echo $OUTPUT_JSON | jq -r -c '.[851:900]'; echo $OUTPUT_JSON | jq -r -c '.[1151:1200]'; echo $OUTPUT_JSON | jq -r -c '.[1451:1500]') | jq -s add)
|
2022-03-30 15:01:34 -04:00
|
|
|
echo ::set-output name=charts1::${OUTPUT_JSON1}
|
|
|
|
echo ::set-output name=charts2::${OUTPUT_JSON2}
|
2022-06-07 13:41:19 -04:00
|
|
|
echo ::set-output name=charts3::${OUTPUT_JSON3}
|
|
|
|
echo ::set-output name=charts4::${OUTPUT_JSON4}
|
|
|
|
echo ::set-output name=charts5::${OUTPUT_JSON5}
|
|
|
|
echo ::set-output name=charts6::${OUTPUT_JSON6}
|
2022-03-31 05:17:40 -04:00
|
|
|
if [[ $(echo ${OUTPUT_JSON1} | jq -c '. | length') -gt 0 ]]; then
|
|
|
|
echo "::set-output name=detected1::true"
|
|
|
|
fi
|
|
|
|
if [[ $(echo ${OUTPUT_JSON2} | jq -c '. | length') -gt 0 ]]; then
|
|
|
|
echo "::set-output name=detected2::true"
|
2022-03-30 04:46:56 -04:00
|
|
|
fi
|
2022-04-05 13:30:02 -04:00
|
|
|
if [[ $(echo ${OUTPUT_JSON3} | jq -c '. | length') -gt 0 ]]; then
|
|
|
|
echo "::set-output name=detected3::true"
|
|
|
|
fi
|
|
|
|
if [[ $(echo ${OUTPUT_JSON4} | jq -c '. | length') -gt 0 ]]; then
|
|
|
|
echo "::set-output name=detected4::true"
|
|
|
|
fi
|
|
|
|
if [[ $(echo ${OUTPUT_JSON5} | jq -c '. | length') -gt 0 ]]; then
|
|
|
|
echo "::set-output name=detected5::true"
|
|
|
|
fi
|
|
|
|
if [[ $(echo ${OUTPUT_JSON6} | jq -c '. | length') -gt 0 ]]; then
|
|
|
|
echo "::set-output name=detected6::true"
|
|
|
|
fi
|
2022-03-30 04:46:56 -04:00
|
|
|
|
2022-03-30 15:01:34 -04:00
|
|
|
install-charts1:
|
|
|
|
needs:
|
|
|
|
- generate-install-matrix
|
2022-03-31 05:17:40 -04:00
|
|
|
if: needs.generate-install-matrix.outputs.detected1 == 'true'
|
2022-03-30 15:01:34 -04:00
|
|
|
name: Install charts Part 1
|
|
|
|
strategy:
|
|
|
|
matrix: ${{ fromJson(needs.generate-install-matrix.outputs.matrix1) }}
|
2022-03-30 15:22:26 -04:00
|
|
|
fail-fast: false
|
2022-08-08 15:17:50 -04:00
|
|
|
max-parallel: 10
|
2022-03-30 15:01:34 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-22 15:28:18 -04:00
|
|
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
2022-03-30 15:01:34 -04:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
ref: ${{ inputs.checkoutCommit }}
|
|
|
|
|
|
|
|
- name: Install Kubernetes tools
|
2022-06-29 06:18:35 -04:00
|
|
|
uses: yokawasa/action-setup-kube-tools@f7f73d7965074b0f5491b7210ff51e3254d42058 # tag=v0.8.2
|
2022-03-30 15:01:34 -04:00
|
|
|
with:
|
|
|
|
setup-tools: |
|
|
|
|
helmv3
|
|
|
|
helm: "3.8.0"
|
|
|
|
|
2022-08-08 15:20:13 -04:00
|
|
|
- uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5 # tag=v4
|
2022-03-30 15:01:34 -04:00
|
|
|
with:
|
|
|
|
python-version: "3.10"
|
|
|
|
|
|
|
|
- name: Set up chart-testing
|
2022-08-11 08:36:25 -04:00
|
|
|
uses: helm/chart-testing-action@09ed88797198755e5031f25be13da255e7e33aad # tag=v2.3.0
|
2022-03-30 15:01:34 -04:00
|
|
|
|
|
|
|
- name: Create k3d cluster
|
|
|
|
uses: nolar/setup-k3d-k3s@v1
|
|
|
|
with:
|
2022-06-13 04:53:15 -04:00
|
|
|
version: v1.24
|
2022-07-06 07:25:34 -04:00
|
|
|
k3d-args: -p 31990-31999:31990-31999@server:0
|
2022-03-30 15:01:34 -04:00
|
|
|
- name: Remove node taints
|
|
|
|
run: |
|
|
|
|
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
|
|
|
|
|
|
|
|
- name: Run chart-testing (install)
|
2022-07-06 07:25:34 -04:00
|
|
|
run: ct install --config ".github/ct-install.yaml" --charts "${{ matrix.chart }}" --upgrade
|
2022-04-05 13:30:02 -04:00
|
|
|
|
2022-03-30 15:01:34 -04:00
|
|
|
install-charts2:
|
2022-03-30 04:46:56 -04:00
|
|
|
needs:
|
|
|
|
- generate-install-matrix
|
2022-03-31 05:17:40 -04:00
|
|
|
if: needs.generate-install-matrix.outputs.detected2 == 'true'
|
2022-03-30 15:01:34 -04:00
|
|
|
name: Install charts Part 2
|
2022-03-30 04:46:56 -04:00
|
|
|
strategy:
|
2022-03-31 05:17:40 -04:00
|
|
|
matrix: ${{ fromJson(needs.generate-install-matrix.outputs.matrix2) }}
|
2022-03-30 15:22:26 -04:00
|
|
|
fail-fast: false
|
2022-08-08 15:17:50 -04:00
|
|
|
max-parallel: 10
|
2022-03-30 04:46:56 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-22 15:28:18 -04:00
|
|
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
2022-03-30 04:46:56 -04:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
ref: ${{ inputs.checkoutCommit }}
|
|
|
|
|
|
|
|
- name: Install Kubernetes tools
|
2022-06-29 06:18:35 -04:00
|
|
|
uses: yokawasa/action-setup-kube-tools@f7f73d7965074b0f5491b7210ff51e3254d42058 # tag=v0.8.2
|
2022-03-30 04:46:56 -04:00
|
|
|
with:
|
|
|
|
setup-tools: |
|
|
|
|
helmv3
|
2022-03-30 05:30:23 -04:00
|
|
|
helm: "3.8.0"
|
2022-03-30 04:46:56 -04:00
|
|
|
|
2022-08-08 15:20:13 -04:00
|
|
|
- uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5 # tag=v4
|
2022-03-30 04:46:56 -04:00
|
|
|
with:
|
|
|
|
python-version: "3.10"
|
|
|
|
|
|
|
|
- name: Set up chart-testing
|
2022-08-11 08:36:25 -04:00
|
|
|
uses: helm/chart-testing-action@09ed88797198755e5031f25be13da255e7e33aad # tag=v2.3.0
|
2022-03-30 04:46:56 -04:00
|
|
|
|
|
|
|
- name: Create k3d cluster
|
|
|
|
uses: nolar/setup-k3d-k3s@v1
|
|
|
|
with:
|
2022-06-13 04:53:15 -04:00
|
|
|
version: v1.24
|
2022-07-06 07:25:34 -04:00
|
|
|
k3d-args: -p 31990-31999:31990-31999@server:0
|
2022-03-30 04:46:56 -04:00
|
|
|
|
|
|
|
- name: Remove node taints
|
|
|
|
run: |
|
|
|
|
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
|
|
|
|
|
|
|
|
- name: Run chart-testing (install)
|
2022-07-06 07:25:34 -04:00
|
|
|
run: ct install --config ".github/ct-install.yaml" --charts "${{ matrix.chart }}" --upgrade
|
2022-03-30 04:46:56 -04:00
|
|
|
|
2022-04-05 13:30:02 -04:00
|
|
|
install-charts3:
|
|
|
|
needs:
|
|
|
|
- generate-install-matrix
|
|
|
|
if: needs.generate-install-matrix.outputs.detected3 == 'true'
|
|
|
|
name: Install charts Part 3
|
|
|
|
strategy:
|
|
|
|
matrix: ${{ fromJson(needs.generate-install-matrix.outputs.matrix3) }}
|
|
|
|
fail-fast: false
|
2022-08-08 15:17:50 -04:00
|
|
|
max-parallel: 10
|
2022-04-05 13:30:02 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-22 15:28:18 -04:00
|
|
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
2022-04-05 13:30:02 -04:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
ref: ${{ inputs.checkoutCommit }}
|
|
|
|
|
|
|
|
- name: Install Kubernetes tools
|
2022-06-29 06:18:35 -04:00
|
|
|
uses: yokawasa/action-setup-kube-tools@f7f73d7965074b0f5491b7210ff51e3254d42058 # tag=v0.8.2
|
2022-04-05 13:30:02 -04:00
|
|
|
with:
|
|
|
|
setup-tools: |
|
|
|
|
helmv3
|
|
|
|
helm: "3.8.0"
|
|
|
|
|
2022-08-08 15:20:13 -04:00
|
|
|
- uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5 # tag=v4
|
2022-04-05 13:30:02 -04:00
|
|
|
with:
|
|
|
|
python-version: "3.10"
|
|
|
|
|
|
|
|
- name: Set up chart-testing
|
2022-08-11 08:36:25 -04:00
|
|
|
uses: helm/chart-testing-action@09ed88797198755e5031f25be13da255e7e33aad # tag=v2.3.0
|
2022-04-05 13:30:02 -04:00
|
|
|
|
|
|
|
- name: Create k3d cluster
|
|
|
|
uses: nolar/setup-k3d-k3s@v1
|
|
|
|
with:
|
2022-06-13 04:53:15 -04:00
|
|
|
version: v1.24
|
2022-07-06 07:25:34 -04:00
|
|
|
k3d-args: -p 31990-31999:31990-31999@server:0
|
2022-04-05 13:30:02 -04:00
|
|
|
- name: Remove node taints
|
|
|
|
run: |
|
|
|
|
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
|
|
|
|
|
|
|
|
- name: Run chart-testing (install)
|
2022-07-06 07:25:34 -04:00
|
|
|
run: ct install --config ".github/ct-install.yaml" --charts "${{ matrix.chart }}" --upgrade
|
2022-04-05 13:30:02 -04:00
|
|
|
|
|
|
|
install-charts4:
|
|
|
|
needs:
|
|
|
|
- generate-install-matrix
|
|
|
|
if: needs.generate-install-matrix.outputs.detected4 == 'true'
|
|
|
|
name: Install charts Part 4
|
|
|
|
strategy:
|
|
|
|
matrix: ${{ fromJson(needs.generate-install-matrix.outputs.matrix4) }}
|
|
|
|
fail-fast: false
|
2022-08-08 15:17:50 -04:00
|
|
|
max-parallel: 10
|
2022-04-05 13:30:02 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-22 15:28:18 -04:00
|
|
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
2022-04-05 13:30:02 -04:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
ref: ${{ inputs.checkoutCommit }}
|
|
|
|
|
|
|
|
- name: Install Kubernetes tools
|
2022-06-29 06:18:35 -04:00
|
|
|
uses: yokawasa/action-setup-kube-tools@f7f73d7965074b0f5491b7210ff51e3254d42058 # tag=v0.8.2
|
2022-04-05 13:30:02 -04:00
|
|
|
with:
|
|
|
|
setup-tools: |
|
|
|
|
helmv3
|
|
|
|
helm: "3.8.0"
|
|
|
|
|
2022-08-08 15:20:13 -04:00
|
|
|
- uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5 # tag=v4
|
2022-04-05 13:30:02 -04:00
|
|
|
with:
|
|
|
|
python-version: "3.10"
|
|
|
|
|
|
|
|
- name: Set up chart-testing
|
2022-08-11 08:36:25 -04:00
|
|
|
uses: helm/chart-testing-action@09ed88797198755e5031f25be13da255e7e33aad # tag=v2.3.0
|
2022-04-05 13:30:02 -04:00
|
|
|
|
|
|
|
- name: Create k3d cluster
|
|
|
|
uses: nolar/setup-k3d-k3s@v1
|
|
|
|
with:
|
2022-06-13 04:53:15 -04:00
|
|
|
version: v1.24
|
2022-07-06 07:25:34 -04:00
|
|
|
k3d-args: -p 31990-31999:31990-31999@server:0
|
2022-04-05 13:30:02 -04:00
|
|
|
- name: Remove node taints
|
|
|
|
run: |
|
|
|
|
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
|
|
|
|
|
|
|
|
- name: Run chart-testing (install)
|
2022-07-06 07:25:34 -04:00
|
|
|
run: ct install --config ".github/ct-install.yaml" --charts "${{ matrix.chart }}" --upgrade
|
2022-04-05 13:30:02 -04:00
|
|
|
|
|
|
|
install-charts5:
|
|
|
|
needs:
|
|
|
|
- generate-install-matrix
|
|
|
|
if: needs.generate-install-matrix.outputs.detected5 == 'true'
|
|
|
|
name: Install charts Part 5
|
|
|
|
strategy:
|
|
|
|
matrix: ${{ fromJson(needs.generate-install-matrix.outputs.matrix5) }}
|
|
|
|
fail-fast: false
|
2022-08-08 15:17:50 -04:00
|
|
|
max-parallel: 10
|
2022-04-05 13:30:02 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-22 15:28:18 -04:00
|
|
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
2022-04-05 13:30:02 -04:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
ref: ${{ inputs.checkoutCommit }}
|
|
|
|
|
|
|
|
- name: Install Kubernetes tools
|
2022-06-29 06:18:35 -04:00
|
|
|
uses: yokawasa/action-setup-kube-tools@f7f73d7965074b0f5491b7210ff51e3254d42058 # tag=v0.8.2
|
2022-04-05 13:30:02 -04:00
|
|
|
with:
|
|
|
|
setup-tools: |
|
|
|
|
helmv3
|
|
|
|
helm: "3.8.0"
|
|
|
|
|
2022-08-08 15:20:13 -04:00
|
|
|
- uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5 # tag=v4
|
2022-04-05 13:30:02 -04:00
|
|
|
with:
|
|
|
|
python-version: "3.10"
|
|
|
|
|
|
|
|
- name: Set up chart-testing
|
2022-08-11 08:36:25 -04:00
|
|
|
uses: helm/chart-testing-action@09ed88797198755e5031f25be13da255e7e33aad # tag=v2.3.0
|
2022-04-05 13:30:02 -04:00
|
|
|
|
|
|
|
- name: Create k3d cluster
|
|
|
|
uses: nolar/setup-k3d-k3s@v1
|
|
|
|
with:
|
2022-06-13 04:53:15 -04:00
|
|
|
version: v1.24
|
2022-07-06 07:25:34 -04:00
|
|
|
k3d-args: -p 31990-31999:31990-31999@server:0
|
2022-04-05 13:30:02 -04:00
|
|
|
- name: Remove node taints
|
|
|
|
run: |
|
|
|
|
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
|
|
|
|
|
|
|
|
- name: Run chart-testing (install)
|
2022-07-06 07:25:34 -04:00
|
|
|
run: ct install --config ".github/ct-install.yaml" --charts "${{ matrix.chart }}" --upgrade
|
2022-04-05 13:30:02 -04:00
|
|
|
|
|
|
|
install-charts6:
|
|
|
|
needs:
|
|
|
|
- generate-install-matrix
|
|
|
|
if: needs.generate-install-matrix.outputs.detected6 == 'true'
|
|
|
|
name: Install charts Part 6
|
|
|
|
strategy:
|
|
|
|
matrix: ${{ fromJson(needs.generate-install-matrix.outputs.matrix6) }}
|
|
|
|
fail-fast: false
|
2022-08-08 15:17:50 -04:00
|
|
|
max-parallel: 10
|
2022-04-05 13:30:02 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-22 15:28:18 -04:00
|
|
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
2022-04-05 13:30:02 -04:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
ref: ${{ inputs.checkoutCommit }}
|
|
|
|
|
|
|
|
- name: Install Kubernetes tools
|
2022-06-29 06:18:35 -04:00
|
|
|
uses: yokawasa/action-setup-kube-tools@f7f73d7965074b0f5491b7210ff51e3254d42058 # tag=v0.8.2
|
2022-04-05 13:30:02 -04:00
|
|
|
with:
|
|
|
|
setup-tools: |
|
|
|
|
helmv3
|
|
|
|
helm: "3.8.0"
|
|
|
|
|
2022-08-08 15:20:13 -04:00
|
|
|
- uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5 # tag=v4
|
2022-04-05 13:30:02 -04:00
|
|
|
with:
|
|
|
|
python-version: "3.10"
|
|
|
|
|
|
|
|
- name: Set up chart-testing
|
2022-08-11 08:36:25 -04:00
|
|
|
uses: helm/chart-testing-action@09ed88797198755e5031f25be13da255e7e33aad # tag=v2.3.0
|
2022-04-05 13:30:02 -04:00
|
|
|
|
|
|
|
- name: Create k3d cluster
|
|
|
|
uses: nolar/setup-k3d-k3s@v1
|
|
|
|
with:
|
2022-06-13 04:53:15 -04:00
|
|
|
version: v1.24
|
2022-07-06 07:25:34 -04:00
|
|
|
k3d-args: -p 31990-31999:31990-31999@server:0
|
2022-04-05 13:30:02 -04:00
|
|
|
- name: Remove node taints
|
|
|
|
run: |
|
|
|
|
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
|
|
|
|
|
|
|
|
- name: Run chart-testing (install)
|
2022-07-06 07:25:34 -04:00
|
|
|
run: ct install --config ".github/ct-install.yaml" --charts "${{ matrix.chart }}" --upgrade
|
2022-04-05 13:30:02 -04:00
|
|
|
|
2022-03-30 04:46:56 -04:00
|
|
|
# Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7
|
|
|
|
install_success:
|
|
|
|
needs:
|
|
|
|
- generate-install-matrix
|
2022-03-30 15:01:34 -04:00
|
|
|
- install-charts1
|
|
|
|
- install-charts2
|
2022-06-07 13:41:19 -04:00
|
|
|
- install-charts3
|
|
|
|
- install-charts4
|
|
|
|
- install-charts5
|
|
|
|
- install-charts6
|
2022-03-30 04:46:56 -04:00
|
|
|
if: |
|
|
|
|
always()
|
|
|
|
name: Install successful
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check install matrix status
|
2022-06-07 13:41:19 -04:00
|
|
|
if: ${{ ( (needs.generate-install-matrix.outputs.detected1 == 'true') && (needs.install-charts1.result != 'success') ) && ( (needs.generate-install-matrix.outputs.detected2 == 'true') && ( (needs.install-charts2.result != 'success') || ( needs.install-charts2.result != 'skipped' ) ) ) && ( (needs.generate-install-matrix.outputs.detected3 == 'true') && ( (needs.install-charts3.result != 'success') || ( needs.install-charts3.result != 'skipped' ) ) ) && ( (needs.generate-install-matrix.outputs.detected4 == 'true') && ( (needs.install-charts4.result != 'success') || ( needs.install-charts4.result != 'skipped' ) ) ) && ( (needs.generate-install-matrix.outputs.detected5 == 'true') && ( (needs.install-charts5.result != 'success') || ( needs.install-charts5.result != 'skipped' ) ) ) && ( (needs.generate-install-matrix.outputs.detected6 == 'true') && ( (needs.install-charts6.result != 'success') || ( needs.install-charts6.result != 'skipped' ) ) ) }}
|
2022-03-30 04:46:56 -04:00
|
|
|
run: exit 1
|
2022-07-06 07:25:34 -04:00
|
|
|
|
2022-07-06 14:09:28 -04:00
|
|
|
- uses: vishnudxb/cancel-workflow@c3c77eb4383ba7d023e6614a07d94fe990501ac6 # tag=v1.2
|
2022-07-06 07:25:34 -04:00
|
|
|
if: failure()
|
|
|
|
with:
|
2022-08-08 17:57:58 -04:00
|
|
|
repo: truecharts/charts
|
2022-07-06 07:25:34 -04:00
|
|
|
workflow_id: ${{ github.run_id }}
|
|
|
|
access_token: ${{ github.token }}
|