Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scheduled CI pipeline #102

Merged
merged 4 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/ct-scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

# See https://github.com/helm/chart-testing#configuration
chart-dirs:
- dnation-kubernetes-monitoring-stack
charts: dnation-kubernetes-monitoring-stack
- dnation-monitoring
charts: dnation-monitoring
chart-repos:
- prometheus=https://prometheus-community.github.io/helm-charts
- grafana=https://grafana.github.io/helm-charts
- dnation=https://dnationcloud.github.io/helm-hub
- bitnami=https://charts.bitnami.com/bitnami
helm-extra-args: --timeout 600s
128 changes: 66 additions & 62 deletions .github/workflows/ci-scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,65 +13,69 @@
# limitations under the License.
#

# TODO @mfeder: Enable and update below outdated pipeline
#name: Test Chart with k8s versions
#
#on:
# schedule:
# # Run every 2 weeks
# - cron: "0 0 1,15 * *"
#
#jobs:
# test-chart:
# name: test-chart
# runs-on: ubuntu-20.04
# strategy:
# fail-fast: false
# matrix:
# include:
# - k8s-version: v1.19.7
# stack-version: v1.3
# - k8s-version: v1.20.2
# stack-version: v1.3
# - k8s-version: v1.20.7
# stack-version: v1.4
# - k8s-version: v1.21.2
# stack-version: v1.4
# - k8s-version: v1.22.1
# stack-version: v1.4
# - k8s-version: v1.23.13
# stack-version: v2.4
# - k8s-version: v1.25.9
# stack-version: v2.5
#
# steps:
# - name: Checkout
# uses: actions/checkout@v2
#
# - 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/kind-action@v1.2.0
# with:
# node_image: kindest/node:${{ matrix.k8s-version }}
#
# - name: Set up chart-testing
# uses: helm/chart-testing-action@v2.1.0
#
# - name: Run chart-testing (install)
# run: |
# ct install --config .github/ct-scheduled.yaml
name: Test Chart with k8s versions

on:
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
mv dnation-kubernetes-monitoring-stack dnation-monitoring

- name: Create kind ${{ matrix.k8s-version }} cluster
uses: helm/kind-action@v1.10.0
with:
node_image: kindest/node:${{ matrix.k8s-version }}
config: .github/kind_cluster_config.yaml

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1

- name: Run chart-testing (install)
run: |
ct install --config .github/ct-scheduled.yaml --helm-extra-set-args "--set loki.ci=true"