From efcb6957c48945e696ffde1234e48fa5d6b8a059 Mon Sep 17 00:00:00 2001 From: SanDim Ciin Date: Tue, 28 Feb 2023 12:41:34 -0800 Subject: [PATCH 1/2] Added issue #155 to CHANGELOG. Added pipeline files. --- .viperlightignore | 4 +++ .viperlightrc | 4 +++ CHANGELOG.md | 5 ++- buildspec.yml | 34 ++++++++++++++++++++ sonar-project.properties | 69 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 .viperlightignore create mode 100644 .viperlightrc create mode 100644 buildspec.yml create mode 100644 sonar-project.properties diff --git a/.viperlightignore b/.viperlightignore new file mode 100644 index 00000000..ab3158fe --- /dev/null +++ b/.viperlightignore @@ -0,0 +1,4 @@ +CONTRIBUTING.md:44 +CODE_OF_CONDUCT.md:4 +source/custom-resource/lib/cfn/index.spec.js:29 +Config \ No newline at end of file diff --git a/.viperlightrc b/.viperlightrc new file mode 100644 index 00000000..34036e5a --- /dev/null +++ b/.viperlightrc @@ -0,0 +1,4 @@ +{ + "all": true, + "failOn": "medium" +} diff --git a/CHANGELOG.md b/CHANGELOG.md index a9f01e9c..56bd4179 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,15 @@ 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/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [6.1.0] - 2023-2-27 +## [6.1.0] - 2023-3-30 ### Changed - Added region name and account ID to AppRegistry Application name - Changed AppRegistry Attribute Group name to Region-StackName - Updated AppRegistry attribute and tag names +### Fixed +- #155 appRegistry associateStack has been deprecated + ## [6.0.0] - 2022-10-17 ### Added - Added cdk infrastructure in source/cdk directory diff --git a/buildspec.yml b/buildspec.yml new file mode 100644 index 00000000..70b29fdd --- /dev/null +++ b/buildspec.yml @@ -0,0 +1,34 @@ +version: 0.2 + +phases: + install: + runtime-versions: + nodejs: 14 + python: 3.8 + pre_build: + commands: + - echo "Installing dependencies and executing unit tests - `pwd`" + - cd deployment && chmod +x ./run-unit-tests.sh && ./run-unit-tests.sh + - echo "Installing dependencies and executing unit tests completed `date`" + build: + commands: + - echo "Starting build `date` in `pwd`" + - chmod +x ./build-s3-dist.sh && ./build-s3-dist.sh $DIST_OUTPUT_BUCKET $SOLUTION_NAME $VERSION + - echo "Build completed `date`" + - echo "Starting open-source-dist `date` in `pwd`" + - chmod +x ./build-open-source-dist.sh && ./build-open-source-dist.sh $SOLUTION_NAME + - echo "Open Source Dist completed `date`" + post_build: + commands: + - echo "Retrieving next stage buildspec `date` in `pwd`" + - aws s3 cp s3://solutions-build-assets/changelog-spec.yml ../buildspec.yml + - echo "Retrieving next stage buildspec complete" + - echo "Post build completed on `date`" +artifacts: + files: + - deployment/**/* + - source/**/* + - CHANGELOG.md + - buildspec.yml + - .gitignore + - sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000..9045f359 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,69 @@ +# Note: Currently testing and supported with code coverage sonarqube +# collection for python lambda (python pytest, python unittest) and javascript jest +# and CDK TypeScript + +# Uncomment to enable debugging by default +#sonar.verbose=true +#sonar.log.level=DEBUG + +# Disable if needed +#sonar.scm.disabled=true + +# +# Refer to https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/ +# for details on sources and exclusions. Note also .gitignore +# + + +sonar.sources=source + +sonar.exclusions= \ + **/cdk.out/**, \ + **/node_modules/**, \ + **/**.spec.js, \ + **/test**.py, \ + **/setup.py, \ + **/**.test.**, \ + **/jest.config.js, \ + source/test/**, \ + source/custom-resource/index.js + + + +sonar.sourceEncoding=UTF-8 + +## Python Specific Properties* +# coverage +# https://docs.sonarqube.org/pages/viewpage.action?pageId=4784149 +# Comma-separated list of ant pattern describing paths to coverage reports, relative to projects +# root. Leave unset to use the default ("coverage-reports/*coverage-*.xml"). +sonar.python.coverage.reportPaths= \ + source/test/coverage-reports/pytest/mediainfo/coverage.xml + + +# Sensor SonarJS Coverage [javascript] was not allowing globbing +# for sonar.javascript.lcov.reportPaths such as this +# source/test/coverage-reports/jest/*/lcov.info +# so we have to provide an explicit list of reportPaths +sonar.javascript.lcov.reportPaths= \ + source/test/coverage-reports/jest/cdk/lcov.info, \ + source/test/coverage-reports/jest/custom-resource/lcov.info, \ + source/test/coverage-reports/jest/archive-source/lcov.info, \ + source/test/coverage-reports/jest/dynamo/lcov.info, \ + source/test/coverage-reports/jest/encode/lcov.info, \ + source/test/coverage-reports/jest/error-handler/lcov.info, \ + source/test/coverage-reports/jest/input-validate/lcov.info, \ + source/test/coverage-reports/jest/media-package-assets/lcov.info, \ + source/test/coverage-reports/jest/output-validate/lcov.info, \ + source/test/coverage-reports/jest/profiler/lcov.info, \ + source/test/coverage-reports/jest/sns-notification/lcov.info, \ + source/test/coverage-reports/jest/sqs-publish/lcov.info, \ + source/test/coverage-reports/jest/step-functions/lcov.info + +# Project Specific ignores with rational +# sonar.issue.ignore.multicriteria=ts1 + +# TODO: Temporary ignore for typescript:S1848. Review and update code as needed. Only ignore this for typescript file which are in CDK since there are many common cases of new (this, ...) without using the created object. +#typescript:S1848 Objects should not be created to be dropped immediately without being used +# sonar.issue.ignore.multicriteria.ts1.ruleKey=typescript:S1848 +# sonar.issue.ignore.multicriteria.ts1.resourceKey=**/*.ts \ No newline at end of file From fe30f041acf42f858e0c742b3866cd86321f0a42 Mon Sep 17 00:00:00 2001 From: SanDim Ciin Date: Tue, 28 Feb 2023 12:45:54 -0800 Subject: [PATCH 2/2] Update release date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56bd4179..c483318e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ 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/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [6.1.0] - 2023-3-30 +## [6.1.0] - 2023-2-27 ### Changed - Added region name and account ID to AppRegistry Application name - Changed AppRegistry Attribute Group name to Region-StackName