Skip to content
Merged
Show file tree
Hide file tree
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 Apr 8, 2025
c5d162d
fix: comment out frontend image build step in Helm workflow
gomezbc Apr 8, 2025
3511c4c
fix: correct template reference for external database secret creation
gomezbc Apr 8, 2025
813a640
fix: update Helm test workflow to use 'testing' tags and set target b…
gomezbc Apr 8, 2025
e88cf88
fix: database secret creation logic
gomezbc Apr 8, 2025
cd2185c
Merge branch 'main' of https://github.com/eclipse-tractusx/industry-c…
gomezbc Apr 9, 2025
fb84563
fix: update Helm test workflow to correctly build frontend image
gomezbc Apr 9, 2025
b413b0a
fix: improve Helm test workflow formatting and structure
gomezbc Apr 9, 2025
30eae69
chore: update package-lock.json
gomezbc Apr 9, 2025
948486b
fix: update frontend service to use port 8080 instead of priviliged p…
gomezbc Apr 9, 2025
8456abd
fix: update backend and frontend service ports to use new port config…
gomezbc Apr 9, 2025
0e150e8
fix: include Dockerfile in Helm test workflow triggers
gomezbc Apr 9, 2025
7af3ab7
fix: comment out unused upgrade_from parameter in Helm test workflow
gomezbc Apr 9, 2025
fd17247
fix: add license header to Helm test workflow file
gomezbc Apr 9, 2025
d404cfb
fix: set action versions to commit tags in Helm test workflow
gomezbc Apr 9, 2025
2f72b32
fix: update Helm chart version to 0.1.1 and fix workflow triggers (on…
gomezbc Apr 10, 2025
e8637f7
fix: ensure newline at end of files and removed trailling spaces in H…
gomezbc Apr 10, 2025
0df816d
fix: add Helm repos setup step in the test workflow
gomezbc Apr 10, 2025
dd2c604
Merge branch 'main' into main
gomezbc Apr 24, 2025
d20f566
chore: update DEPENDENCIES_ICHUB-FRONTEND file
gomezbc Apr 25, 2025
ee20baf
fix: update Docker build-push-action to specific version v6.16.0 in h…
gomezbc Apr 28, 2025
38e79b2
Merge branch 'main' into main
gomezbc Apr 29, 2025
f95a763
Update .github/workflows/helm-test.yaml
gomezbc Apr 29, 2025
facbc1a
Update .github/workflows/helm-test.yaml
gomezbc Apr 29, 2025
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
129 changes: 129 additions & 0 deletions .github/workflows/helm-test.yaml
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'
Loading
Loading