Skip to content

Commit

Permalink
Merge pull request eclipse-tractusx#56 from catenax-ng/lint
Browse files Browse the repository at this point in the history
feat: _additon of linting_
  • Loading branch information
almadigabor committed Jun 28, 2023
2 parents 484ce4a + 141f159 commit bb561ba
Show file tree
Hide file tree
Showing 9 changed files with 119 additions and 50 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/helm-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#################################################################################
# Copyright (c) 2022,2023 T-Systems International GmbH
# Copyright (c) 2022,2023 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 governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
################################################################################


name: Lint and Test Chart

on:
push:
paths:
- 'charts/**'
branches: [main]
pull_request:
paths:
- 'charts/**'
workflow_dispatch:
inputs:
node_image:
description: 'kindest/node image for k8s kind cluster'
# k8s version from 3.1 release
default: 'kindest/node:v1.24.6'
required: false
type: string
upgrade_from:
description: 'portal chart version to upgrade from'
# portal version from 3.1 release
default: '1.3.0'
required: false
type: string

jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Kubernetes KinD Cluster
uses: container-tools/kind-action@v2
with:
version: v0.19.0
node_image: ${{ github.event.inputs.node_image || 'kindest/node:v1.24.6' }}

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.10.3

# Setup python as a prerequisite for chart linting
- uses: actions/setup-python@v4
with:
python-version: '3.9'
check-latest: true

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

- 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 "CHART_CHANGED=true" >> $GITHUB_ENV
fi
# run chart linting
- name: Run chart-testing (lint)
run: ct lint --charts charts/daps-reg-service --config charts/chart-testing-config.yaml

# Preparing a kind cluster to install and test charts on
- name: Create kind cluster
uses: helm/kind-action@v1.4.0
if: ${{ env.CHART_CHANGED == 'true' }}

# install the chart to the kind cluster and run helm test
# define charts to test with the --charts parameter
- name: Run chart-testing (install)
run: ct install --charts charts/daps-reg-service --config charts/chart-testing-config.yaml
if: ${{ env.CHART_CHANGED == 'true' }}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]
N/A

## [2.1.0] - 2023-06-27

### Added
- Addition of Lint and Test Chart

## [2.0.9] - 2023-06-21

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ of the DAPS are not disclosed to the requester.

### Software Version
```shell
Helm version is v2.0.9
Application version is v2.0.9
Helm version is v2.1.0
Application version is v2.1.0
```

# Solution Strategy
Expand Down
1 change: 1 addition & 0 deletions charts/chart-testing-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
validate-maintainers: false
11 changes: 7 additions & 4 deletions charts/daps-reg-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,19 @@ description: Daps regisgter service is used to register the EDC connector into D
type: application

sources:
- https://github.com/eclipse-tractusx/daps-registration-service
- https://github.com/eclipse-tractusx/daps-registration-service

maintainers:
- name: adkumar1
email: aditya.kumar@t-systems.com

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.0.9

version: 2.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: 2.0.9
appVersion: 2.1.0
3 changes: 2 additions & 1 deletion charts/daps-reg-service/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# daps-reg-service

![Version: 2.0.9](https://img.shields.io/badge/Version-2.0.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.9](https://img.shields.io/badge/AppVersion-2.0.9-informational?style=flat-square)
![Version: 2.1.0](https://img.shields.io/badge/Version-2.0.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.7](https://img.shields.io/badge/AppVersion-2.0.7-informational?style=flat-square)


Daps regisgter service is used to register the EDC connector into DAPS

Expand Down
35 changes: 0 additions & 35 deletions charts/daps-reg-service/templates/tests/test-connection.yaml

This file was deleted.

12 changes: 5 additions & 7 deletions charts/daps-reg-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,14 @@ service:
port: 80
# -- Container Port details for sevice
targetPort: 8080

ingress:
# -- If you want to enable or disable the ingress
enabled: false
# -- a reference to an Ingress Class resource that contains additional configuration including the name of the controller that should implement the class.
className: ""
annotations:
#kubernetes.io/ingress.class: nginx
#nginx.ingress.kubernetes.io/use-regex: "true"
#cert-manager.io/cluster-issuer: "letsencrypt-prod"
annotations: {}

hosts:
# -- Host of the application on which application runs
- host: ""
Expand All @@ -105,15 +103,15 @@ drs:
daps_jwks: ""
# -- JWK Set URI
jwkSetUri: ""

resources:
limits:
cpu: 500m
memory: 400Mi
requests:
cpu: 200m
memory: 300Mi

# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>org.eclipse.tractusx</groupId>
<artifactId>dapsreg</artifactId>
<version>2.0.9</version>
<version>2.1.0</version>
<name>dapsreg</name>
<description>client registration to the DAPS</description>
<properties>
Expand Down

0 comments on commit bb561ba

Please sign in to comment.