forked from eclipse-tractusx/managed-identity-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
465 additions
and
1,613 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -16,16 +16,19 @@ jobs: | |
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: v3.9.3 | ||
version: v3.11.3 | ||
|
||
- name: Add Helm repos | ||
- name: Update Helm dependencies | ||
run: | | ||
cd charts/managed-identity-wallet | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm dependency update | ||
- name: Install Helm unittest plugin | ||
run: | | ||
helm plugin install https://github.com/helm-unittest/helm-unittest.git | ||
# Setup python as a prerequisite for chart linting | ||
- uses: actions/setup-python@v2 | ||
with: | ||
|
@@ -34,17 +37,24 @@ jobs: | |
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Install Task | ||
uses: arduino/setup-task@v1 | ||
|
||
- 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 "::set-output name=changed::true" | ||
fi | ||
# run chart linting | ||
- name: Run chart-testing (lint) | ||
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --config charts/chart-testing-config.yaml | ||
|
||
- name: Run Helm unittests | ||
run: task helm:unittest | ||
|
||
# Preparing a kind cluster to install and test charts on | ||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
|
This file contains 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 |
---|---|---|
|
@@ -80,7 +80,7 @@ jobs: | |
uses: veracode/[email protected] | ||
continue-on-error: true | ||
with: | ||
appname: 'project-managed-identity-wallets' | ||
appname: 'project-managed-identity-wallet' | ||
createprofile: false | ||
filepath: 'build/libs/*' # add filepath for upload | ||
vid: '${{ secrets.ORG_VERACODE_API_ID }}' # reference to API ID, which is set as github org. secret | ||
|
@@ -93,4 +93,4 @@ jobs: | |
context: . | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest${{ env.TAG_SUFFIX }}, ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.APP_VERSION }}.${{ env.SHORT_SHA }}, ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.APP_VERSION }}${{ env.TAG_SUFFIX }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains 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 |
---|---|---|
|
@@ -73,9 +73,9 @@ jobs: | |
uses: veracode/[email protected] | ||
continue-on-error: true | ||
with: | ||
appname: 'project-managed-identity-wallets' | ||
appname: 'project-managed-identity-wallet' | ||
createprofile: false | ||
filepath: 'build/install/org.eclipse.tractusx.managedidentitywallets/lib/*' # add filepath for upload | ||
filepath: 'build/libs/*' # add filepath for upload | ||
vid: '${{ secrets.ORG_VERACODE_API_ID }}' # reference to API ID, which is set as github org. secret | ||
vkey: '${{ secrets.ORG_VERACODE_API_KEY }}' #reference to API Key in github, which is set as github or. secret | ||
include: 'build/install/org.eclipse.tractusx.managedidentitywallets/lib/org.eclipse.tractusx.managedidentitywallets-*jar' | ||
include: 'build/libs/miw-latest.jar' |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
72 changes: 72 additions & 0 deletions
72
charts/managed-identity-wallet/tests/custom-values/deployment_test.yaml
This file contains 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,72 @@ | ||
# /******************************************************************************** | ||
# * Copyright (c) 2021,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 | ||
# ********************************************************************************/ | ||
|
||
suite: test dev deployment | ||
chart: | ||
version: 9.9.9+test | ||
appVersion: 9.9.9 | ||
values: | ||
- values.yml | ||
tests: | ||
- it: should have latest image tag | ||
template: templates/deployment.yaml | ||
asserts: | ||
- matchRegex: | ||
path: spec.template.spec.containers[0].image | ||
pattern: .:latest | ||
|
||
- it: should have environment variables set | ||
template: templates/deployment.yaml | ||
asserts: | ||
- isNotEmpty: | ||
path: spec.template.spec.containers[0].env | ||
- lengthEqual: | ||
path: spec.template.spec.containers[0].env | ||
count: 5 | ||
- contains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: APPLICATION_PORT | ||
value: "8080" | ||
- contains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: DB_HOST | ||
value: postgres-host | ||
- contains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: MIW_HOST_NAME | ||
value: miw | ||
- contains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: DB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
key: DB_PASSWORD | ||
name: RELEASE-NAME-managed-identity-wallet | ||
- contains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: DB_USER_NAME | ||
valueFrom: | ||
secretKeyRef: | ||
key: DB_USER_NAME | ||
name: RELEASE-NAME-managed-identity-wallet |
73 changes: 73 additions & 0 deletions
73
charts/managed-identity-wallet/tests/custom-values/ingress_test.yaml
This file contains 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,73 @@ | ||
# /******************************************************************************** | ||
# * Copyright (c) 2021,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 | ||
# ********************************************************************************/ | ||
|
||
suite: test dev ingress | ||
chart: | ||
version: 9.9.9+test | ||
appVersion: 9.9.9 | ||
values: | ||
- values.yml | ||
tests: | ||
- it: should have correct metadata | ||
template: templates/ingress.yaml | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- containsDocument: | ||
kind: Ingress | ||
apiVersion: networking.k8s.io/v1 | ||
name: RELEASE-NAME-managed-identity-wallet | ||
- isSubset: | ||
path: metadata.labels | ||
content: | ||
helm.sh/chart: managed-identity-wallet-9.9.9_test | ||
app.kubernetes.io/name: managed-identity-wallet | ||
app.kubernetes.io/instance: RELEASE-NAME | ||
app.kubernetes.io/version: "9.9.9" | ||
app.kubernetes.io/managed-by: Helm | ||
|
||
- it: must have rules set | ||
template: templates/ingress.yaml | ||
asserts: | ||
- isNotEmpty: | ||
path: spec.rules | ||
- lengthEqual: | ||
path: spec.rules | ||
count: 1 | ||
- isNotEmpty: | ||
path: spec.rules[0].host | ||
- lengthEqual: | ||
path: spec.rules[0].http.paths | ||
count: 1 | ||
- isNotEmpty: | ||
path: spec.rules[0].http.paths[0].path | ||
|
||
- it: must have tls set | ||
template: templates/ingress.yaml | ||
asserts: | ||
- isNotEmpty: | ||
path: spec.tls | ||
- lengthEqual: | ||
path: spec.tls | ||
count: 1 | ||
- isNotEmpty: | ||
path: spec.tls[0].hosts | ||
- lengthEqual: | ||
path: spec.tls[0].hosts[0] | ||
count: 1 |
Oops, something went wrong.