Skip to content

Fix node exporter related expressions in host L1 #234

Fix node exporter related expressions in host L1

Fix node exporter related expressions in host L1 #234

Workflow file for this run

#
# Copyright 2020 The dNation Kubernetes Monitoring 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: Lint and Test Jsonnet and Helm Chart
on:
pull_request:
# Only if there are chart or jsonnet changes to test.
paths:
- 'chart/**'
- 'jsonnet/**'
jobs:
lint-chart:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch history
run: git fetch --prune --unshallow
- name: Package jsonnet
run: make jsonnet-package
- name: Run chart-testing (lint)
uses: helm/[email protected]
with:
command: lint
config: .github/ct.yaml
lint-appVersion:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check if jsonnet folder changed
uses: dorny/paths-filter@v2
id: changes
with:
filters: |
jsonnet:
- 'jsonnet/**'
- name: Get new helm chart appVersion
id: new-helm-app-version
run: |
app=$(grep "appVersion" chart/Chart.yaml | head -1 | awk '{print $2}')
echo "::set-output name=app-version::$app"
- name: Checkout main branch
uses: actions/checkout@v2
with:
ref: main
- name: Get old helm chart appVersion
id: old-helm-app-version
run: |
app=$(grep "appVersion" chart/Chart.yaml | head -1 | awk '{print $2}')
echo "::set-output name=app-version::$app"
- name: Check if chart appVersion is bumped if jsonnet folder changed
if: steps.changes.outputs.jsonnet == 'true'
uses: nick-invision/assert-action@v1
with:
expected: ${{ steps.new-helm-app-version.outputs.app-version }}
actual: ${{ steps.old-helm-app-version.outputs.app-version }}
comparison: notEqual
lint-jsonnet:
runs-on: ubuntu-20.04
needs:
- lint-chart
- lint-appVersion
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch history
run: git fetch --prune --unshallow
- name: Run jsonnet-testing (lint)
run: make jsonnet-lint
- name: Build jsonnet grafana dashboards
run: make json-dashboards
- name: Build jsonnet prometheus rules
run: make json-rules
install-chart:
runs-on: ubuntu-20.04
needs:
- lint-chart
- lint-appVersion
- lint-jsonnet
strategy:
matrix:
k8s:
- v1.20.2
- v1.22.1
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch history
run: git fetch --prune --unshallow
- name: Package jsonnet
run: make jsonnet-package
- name: Create kind ${{ matrix.k8s }} cluster
uses: helm/[email protected]
with:
node_image: kindest/node:${{ matrix.k8s }}
- name: Install prometheusrules crd
run: kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/release-0.42/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
- name: Set up chart-testing
uses: helm/[email protected]
- name: Run chart-testing (install)
run: |
ct install --config .github/ct.yaml