-
Notifications
You must be signed in to change notification settings - Fork 18
feat(TRG 5.09): created a workflow to lint and test the Helm deployment #132
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
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
ac54efa
feat: add GitHub Actions workflow for linting and testing Helm charts
gomezbc c5d162d
fix: comment out frontend image build step in Helm workflow
gomezbc 3511c4c
fix: correct template reference for external database secret creation
gomezbc 813a640
fix: update Helm test workflow to use 'testing' tags and set target b…
gomezbc e88cf88
fix: database secret creation logic
gomezbc cd2185c
Merge branch 'main' of https://github.com/eclipse-tractusx/industry-c…
gomezbc fb84563
fix: update Helm test workflow to correctly build frontend image
gomezbc b413b0a
fix: improve Helm test workflow formatting and structure
gomezbc 30eae69
chore: update package-lock.json
gomezbc 948486b
fix: update frontend service to use port 8080 instead of priviliged p…
gomezbc 8456abd
fix: update backend and frontend service ports to use new port config…
gomezbc 0e150e8
fix: include Dockerfile in Helm test workflow triggers
gomezbc 7af3ab7
fix: comment out unused upgrade_from parameter in Helm test workflow
gomezbc fd17247
fix: add license header to Helm test workflow file
gomezbc d404cfb
fix: set action versions to commit tags in Helm test workflow
gomezbc 2f72b32
fix: update Helm chart version to 0.1.1 and fix workflow triggers (on…
gomezbc e8637f7
fix: ensure newline at end of files and removed trailling spaces in H…
gomezbc 0df816d
fix: add Helm repos setup step in the test workflow
gomezbc dd2c604
Merge branch 'main' into main
gomezbc d20f566
chore: update DEPENDENCIES_ICHUB-FRONTEND file
gomezbc ee20baf
fix: update Docker build-push-action to specific version v6.16.0 in h…
gomezbc 38e79b2
Merge branch 'main' into main
gomezbc f95a763
Update .github/workflows/helm-test.yaml
gomezbc facbc1a
Update .github/workflows/helm-test.yaml
gomezbc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
################################################################################# | ||
# Eclipse Tractus-X - Industry Core Hub Frontend | ||
# | ||
# Copyright (c) 2025 Contributors to the Eclipse Foundation | ||
# | ||
# See the NOTICE file(s) distributed with this work for additional | ||
# information regarding copyright ownership. | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Apache License, Version 2.0 which is available at | ||
# https://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 govern in permissions and limitations | ||
# under the License. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
################################################################################# | ||
|
||
name: Lint and Test Charts | ||
|
||
on: | ||
push: | ||
paths: | ||
- "charts/industry-core-hub/**" | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- "charts/industry-core-hub/**" | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
node_image: | ||
description: "kindest/node image for k8s kind cluster" | ||
# k8s version from 3.1 release as default | ||
default: "kindest/node:v1.27.3" | ||
required: false | ||
type: string | ||
# upgrade_from: | ||
# description: "chart version to upgrade from" | ||
# # chart version from 3.1 release as default | ||
# default: "x.x.x" | ||
# required: false | ||
# type: string | ||
helm_version: | ||
description: "helm version to test (default = latest)" | ||
default: "latest" | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
lint-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Kubernetes KinD Cluster | ||
uses: container-tools/kind-action@0ad70e2299366b0e1552c7240f4e4567148f723e # v2.0.4 | ||
with: | ||
# upgrade version, default (v0.17.0) uses node image v1.21.1 and doesn't work with more recent node image versions | ||
version: v0.20.0 | ||
# default value for event_name != workflow_dispatch | ||
node_image: ${{ github.event.inputs.node_image || 'kindest/node:v1.27.3' }} | ||
|
||
- name: Build backend image | ||
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 | ||
with: | ||
context: "{{defaultContext}}:ichub-backend" | ||
push: true | ||
tags: kind-registry:5000/ichub-backend:testing | ||
|
||
- name: Build frontend image | ||
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 | ||
with: | ||
context: "{{defaultContext}}:ichub-frontend" | ||
push: true | ||
tags: kind-registry:5000/ichub-frontend:testing | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4 | ||
with: | ||
version: ${{ github.event.inputs.helm_version || 'latest' }} | ||
|
||
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | ||
with: | ||
python-version: "3.9" | ||
check-latest: true | ||
- name: Set up chart-testing | ||
uses: helm/chart-testing-action@0d28d3144d3a25ea2cc349d6e59901c4ff469b3b # v2.7.0 | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) | ||
if [[ -n "$changed" ]]; then | ||
echo "changed=true" >> $GITHUB_OUTPUT | ||
fi | ||
|
||
- name: Run chart-testing (lint) | ||
run: ct lint --validate-maintainers=false --target-branch ${{ github.event.repository.default_branch }} | ||
|
||
- name: Setup Helm repos | ||
run: | | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm repo add runix https://helm.runix.net | ||
|
||
- name: Run chart-testing (install) | ||
run: ct install --charts charts/industry-core-hub --target-branch ${{ github.event.repository.default_branch }} --helm-extra-set-args "--set backend.image.repository=kind-registry:5000/ichub-backend --set backend.image.tag=testing --set frontend.image.repository=kind-registry:5000/ichub-frontend --set frontend.image.tag=testing" | ||
if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true' | ||
|
||
# Upgrade the released chart version with the locally available chart | ||
# default value for event_name != workflow_dispatch | ||
# industry-core-hub: we don't have yet a released chart | ||
#- name: Run helm upgrade | ||
# run: | | ||
# helm repo add bitnami https://charts.bitnami.com/bitnami | ||
# helm repo add tractusx-dev https://eclipse-tractusx.github.io/charts/dev | ||
# helm install [NAME] tractusx-dev/[CHART] --version ${{ github.event.inputs.upgrade_from || 'x.x.x' }} | ||
# helm dependency update charts/[CHART] | ||
# helm upgrade [NAME] charts/[CHART] | ||
# if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true' |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.