Skip to content

Update scheduled CI pipeline #924

Update scheduled CI pipeline

Update scheduled CI pipeline #924

Workflow file for this run

#
# Copyright 2020 The dNation Kubernetes Monitoring Stack Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Test Chart with k8s versions
on:
pull_request: # Add this to trigger on PRs
branches:
- main # Specify the target branch for the PR
# schedule:
# # Run every 2 weeks
# - cron: "0 0 1,15 * *"
jobs:
test-chart:
name: test-chart
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- k8s-version: v1.28.13
stack-version: v3.6
- k8s-version: v1.29.8
stack-version: v3.6
- k8s-version: v1.30.4
stack-version: v3.6
- k8s-version: v1.28.13
stack-version: v3.5
- k8s-version: v1.29.8
stack-version: v3.5
- k8s-version: v1.30.4
stack-version: v3.5
- k8s-version: v1.28.13
stack-version: v3.4
- k8s-version: v1.29.8
stack-version: v3.4
- k8s-version: v1.30.4
stack-version: v3.4
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch history
run: git fetch --prune --unshallow
- name: Complete semVer with highest patch version
id: highest-patch
run: |
tag=$(git tag -l --sort=-v:refname | grep -F ${{ matrix.stack-version }}. | head -1)
[[ -z $tag ]] && (echo "Patch version for ${{ matrix.stack-version }} not found!" && exit 1)
echo "::set-output name=version::${tag//v}"
- name: Download correct chart
run: |
echo ${{ steps.semver.outputs.version }}
wget https://dnationcloud.github.io/helm-hub/dnation-kubernetes-monitoring-stack-${{ steps.highest-patch.outputs.version }}.tgz
tar -xvf dnation-kubernetes-monitoring-stack-${{ steps.highest-patch.outputs.version }}.tgz
- name: Create kind ${{ matrix.k8s-version }} cluster
uses: helm/[email protected]
with:
node_image: kindest/node:${{ matrix.k8s-version }}
config: .github/kind_cluster_config.yaml
- name: Set up chart-testing
uses: helm/[email protected]
- name: Run chart-testing (install)
run: |
ct install --config .github/ct-scheduled.yaml --helm-extra-set-args "--set loki.ci=true,loki.fullnameOverride=monitoring,thanos.fullnameOverride=monitoring"