diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..ef90c9c --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Hardware Management Team Members and Administrators +* @Cray-HPE/hardware-management @Cray-HPE/hardware-management-admin diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..10228c1 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,58 @@ +### Summary and Scope + +EXPLAIN WHY THIS PR IS NECESSARY. WHAT IS IMPACTED? +IS THIS A NEW FEATURE OR CRITICAL BUG FIX? SUMMARIZE WHAT CHANGED. + +DOES THIS CHANGE INVOLVE ANY SCHEME CHANGES? Y/N + +REMINDER: HAVE YOU INCREMENTED VERSION NUMBERS? E.G., .spec, Chart.yaml, .version, CHANGELOG.md + +REMINDER 2: HAVE YOU UPDATED THE COPYRIGHT PER hpe GUIDELINES: (C) Copyright 2014-2021 Hewlett Packard Enterprise Development LP ? Y/N + +### Issues and Related PRs + +LIST AND CHARACTERIZE RELATIONSHIP TO JIRA ISSUES AND OTHER PULL REQUESTS. BE SURE LIST DEPENDENCIES. + +* Resolves CASM-XYZ +* Change will also be needed in `` +* Future work required by CASM-ABC +* Merge with `` +* Merge before `` +* Merge after `` + +### Testing + +LIST THE ENVIRONMENTS IN WHICH THESE CHANGES WERE TESTED. + +Tested on: + +* `` +* Craystack +* CMS base-box +* Virtual Shasta + +Were the install/upgrade based validation checks/tests run?(goss tests/install-validation doc) +Were continuous integration tests run? Y/N If not, Why? +Was an Upgrade tested? Y/N If not, Why? +Was a Downgrade tested? Y/N If not, Why? +If schema changes were part of this change, how were those handled in your upgrade/downgrade testing? + +WHAT WAS THE EXTENT OF TESTING PERFORMED? MANUAL VERSUS AUTOMATED TESTS (UNIT/SMOKE/OTHER) +HOW WERE CHANGES VERIFIED TO BE SUCCESSFUL? + +### Risks and Mitigations + +HAS A SECURITY AUDIT BEEN RUN? (./runSnyk.sh) +ARE THERE KNOWN ISSUES WITH THESE CHANGES? +ANY OTHER SPECIAL CONSIDERATIONS? + +INCLUDE THE FOLLOWING ITEMS THAT APPLY. LIST ADDITIONAL ITEMS AND PROVIDE MORE DETAILED INFORMATION AS APPROPRIATE. + +Requires: + +* Additional testing on bare-metal +* Compute nodes +* 3rd party software +* Broader integration testing +* Fresh install +* Platform upgrade diff --git a/.github/workflows/build_and_release_charts.yaml b/.github/workflows/build_and_release_charts.yaml new file mode 100644 index 0000000..55dad48 --- /dev/null +++ b/.github/workflows/build_and_release_charts.yaml @@ -0,0 +1,9 @@ +name: Build and Publish Helm charts +on: [push, pull_request, workflow_dispatch] +jobs: + build_and_release: + uses: Cray-HPE/hms-build-chart-workflows/.github/workflows/build_and_release_charts.yaml@v2 + with: + artifactory-component: csm-redfish-interface-emulator + target-branch: main + secrets: inherit diff --git a/.github/workflows/charts_lint_test_scan.yaml b/.github/workflows/charts_lint_test_scan.yaml new file mode 100644 index 0000000..71d1f58 --- /dev/null +++ b/.github/workflows/charts_lint_test_scan.yaml @@ -0,0 +1,17 @@ +name: Lint, test, and scan Helm charts +on: + pull_request: + branches: + - main + - release/** + workflow_dispatch: +jobs: + lint-test-scan: + uses: Cray-HPE/hms-build-chart-workflows/.github/workflows/charts_lint_test_scan.yaml@v2 + with: + lint-charts: ${{ github.event_name == 'pull_request' }} + test-charts: false + ct-yaml: ct.yaml + scan-image-snyk-args: "--severity-threshold=high" + scan-chart-snyk-args: "--severity-threshold=high" + secrets: inherit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b6ea8e7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Helm +.packaged +*.tgz +Chart.lock + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# VSCode +.vscode + +# Prevent certificates from getting checked in +*.ca +*.cer +*.crt +*.csr +*.key +*.pem + +# Vendor directories that should not be checked in +vendor/hms-build-changed-charts-action/ + diff --git a/.license_check.yaml b/.license_check.yaml new file mode 100644 index 0000000..bf0137d --- /dev/null +++ b/.license_check.yaml @@ -0,0 +1,4 @@ +add_exclude: + - ".license_check.yaml" + - "*/*.yaml" + - "*.yaml" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..051e39d --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Cray / HPE + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7658742 --- /dev/null +++ b/Makefile @@ -0,0 +1,53 @@ +# MIT License +# +# (C) Copyright 2023 Hewlett Packard Enterprise Development LP +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +# HMS Build changed charts configuration +HMS_BUILD_CHANGED_CHARTS_ACTION_BRANCH ?= v1 + +# Helm Chart +TARGET_BRANCH ?= main +UNSTABLE_BUILD_SUFFIX ?= "" # If this variable is the empty string, then this is a stable build + # Otherwise, if this variable is non-empty then this is an unstable build + +all-charts: vendor/hms-build-changed-charts-action + ./vendor/hms-build-changed-charts-action/scripts/build_all_charts.sh ./charts + +vendor/hms-build-changed-charts-action: + mkdir -p vendor + git clone git@github.com:Cray-HPE/hms-build-changed-charts-action.git vendor/hms-build-changed-charts-action --branch ${HMS_BUILD_CHANGED_CHARTS_ACTION_BRANCH} + + ./vendor/hms-build-changed-charts-action/scripts/verify_build_environment.sh + +changed-charts: vendor/hms-build-changed-charts-action ct-config + ./vendor/hms-build-changed-charts-action/scripts/build_changed_charts.sh ./charts ${TARGET_BRANCH} + +ct-config: vendor/hms-build-changed-charts-action + git checkout -- ct.yaml + ./vendor/hms-build-changed-charts-action/scripts/update-ct-config-with-chart-dirs.sh charts + +lint: vendor/hms-build-changed-charts-action ct-config + ct lint --config ct.yaml + +clean: vendor/hms-build-changed-charts-action + git checkout -- ct.yaml + ./vendor/hms-build-changed-charts-action/scripts/clean_all_charts.sh ./charts + rm -rf .packaged diff --git a/README.md b/README.md new file mode 100644 index 0000000..d19f5ed --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# csm-redfish-interface-emulator-charts \ No newline at end of file diff --git a/changelog/v0.0.md b/changelog/v0.0.md new file mode 100644 index 0000000..d47bbca --- /dev/null +++ b/changelog/v0.0.md @@ -0,0 +1,9 @@ +# Changelog for v2.0 + +All notable changes to this project for v0.0.X will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.0.1] - 2023-03-13 + diff --git a/csm-redfish-interface-emulator.compatibility.yaml b/csm-redfish-interface-emulator.compatibility.yaml new file mode 100644 index 0000000..d178e6a --- /dev/null +++ b/csm-redfish-interface-emulator.compatibility.yaml @@ -0,0 +1,23 @@ +--- +# CSM Version is not really following semver. +chartVersionToCSMVersion: {} + # Chart version: CSM version + # ">=2.0.0": "~1.2.0" # Chart Version: 2.0.0 <= x.y.z, CSM Version: 1.2.0 <= x.y.z < 1.3.0 + +# The application version must be compliant to semantic versioning. +# If the application makes a backwards incompatible change, then its major version needs to be increment. +# This is the idealized world +chartVersionToApplicationVersion: {} + # Chart version: Application version + # "2.0.0": "1.11.0" + + +# Test results for combinations of Chart, Application, and CSM versions. +chartValidationLog: +# - chartVersion: 2.0.0 +# applicationVersion: 1.11.0 +# csm: 1.2.0-alpha.16 +# environment: baremetal +# result: PASS +# tester: rsjostrand-hpe +# date: 2021-11-17 diff --git a/ct.yaml b/ct.yaml new file mode 100644 index 0000000..a9d0690 --- /dev/null +++ b/ct.yaml @@ -0,0 +1,5 @@ +--- +chart-dirs: [] +chart-repos: [] +validate-maintainers: false +check-version-increment: false