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..c483318e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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