From 317978f14c90a3b5c6e5155b53821780befbc7ca Mon Sep 17 00:00:00 2001 From: Doris Lam Date: Tue, 11 Jul 2023 11:15:50 -0700 Subject: [PATCH 01/23] update docs --- docs/conf.py | 4 ++-- storage/README.rst | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 2b469ac88..2d4f50ea9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,14 +19,14 @@ # -- Project information ----------------------------------------------------- -project = 'Model Management System' +project = 'Model Management System (MMS 4)' copyright = '2020, OpenMBEE' author = 'OpenMBEE' master_doc = 'index' # The full version, including alpha/beta/rc tags -release = '4.0.0' +release = '4.0.18' # -- General configuration --------------------------------------------------- diff --git a/storage/README.rst b/storage/README.rst index d668760da..fb947d2ce 100644 --- a/storage/README.rst +++ b/storage/README.rst @@ -12,6 +12,9 @@ If s3.access_key or s3.secret_key are omitted, will follow the `default credenti Configuration ^^^^^^^^^^^^^ + s3.endpoint + Endpoint of S3 compliant storage service + s3.access_key This is the access key for the S3 bucket. Required. From 36d2df8208cd934d89032bfbe82f822ee591cd3b Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 7 Nov 2023 14:31:29 -0800 Subject: [PATCH 02/23] Update spring dependencies for vulnerabilities --- gradle.properties | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index d605db2b4..cc1c5ef4b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,9 +1,9 @@ -version=4.0.18 +version=4.0.19 group=org.openmbee.mms -springBootVersion=2.6.7 +springBootVersion=2.7.11 springFrameworkVersion=5.3.20 -springSecurityVersion=5.7.0 -springDataVersion=2.7.0 +springSecurityVersion=5.7.10 +springDataVersion=2.7.14 jacksonVersion=2.13.3 elasticVersion=7.8.1 \ No newline at end of file From 5195bc52504faf3d15a7f70e1ccb1cbb2df17a34 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Wed, 8 Nov 2023 15:55:08 -0800 Subject: [PATCH 03/23] Update spring framework --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index d605db2b4..bca8b0e3e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ version=4.0.18 group=org.openmbee.mms springBootVersion=2.6.7 -springFrameworkVersion=5.3.20 +springFrameworkVersion=5.3.30 springSecurityVersion=5.7.0 springDataVersion=2.7.0 jacksonVersion=2.13.3 From 7e923d7538ee2a98f57b2628cdc9d5df6f655a69 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Wed, 8 Nov 2023 15:56:56 -0800 Subject: [PATCH 04/23] Revert "Update spring framework" This reverts commit 5195bc52504faf3d15a7f70e1ccb1cbb2df17a34. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index bca8b0e3e..d605db2b4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ version=4.0.18 group=org.openmbee.mms springBootVersion=2.6.7 -springFrameworkVersion=5.3.30 +springFrameworkVersion=5.3.20 springSecurityVersion=5.7.0 springDataVersion=2.7.0 jacksonVersion=2.13.3 From c6afd937d665ecbe760bb8d5bc37fbe3ae1e89c0 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Wed, 8 Nov 2023 15:59:01 -0800 Subject: [PATCH 05/23] Update spring framework --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index cc1c5ef4b..21873bc57 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ version=4.0.19 group=org.openmbee.mms springBootVersion=2.7.11 -springFrameworkVersion=5.3.20 +springFrameworkVersion=5.3.30 springSecurityVersion=5.7.10 springDataVersion=2.7.14 jacksonVersion=2.13.3 From 29470d3127dc537a92b4637b54a11b0e01de4208 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Wed, 8 Nov 2023 15:59:38 -0800 Subject: [PATCH 06/23] Update spring boot to latest --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 21873bc57..336ca74f4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ version=4.0.19 group=org.openmbee.mms -springBootVersion=2.7.11 +springBootVersion=2.7.17 springFrameworkVersion=5.3.30 springSecurityVersion=5.7.10 springDataVersion=2.7.14 From beee070405afbe75e6d478d824ec9efcee28b587 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 5 Dec 2023 12:56:27 -0800 Subject: [PATCH 07/23] Update version in conf.py --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 2d4f50ea9..24beaec43 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ master_doc = 'index' # The full version, including alpha/beta/rc tags -release = '4.0.18' +release = '4.0.19' # -- General configuration --------------------------------------------------- From 657e2beec7e1f2d195974a77eead39586cba67d2 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 12 Dec 2023 08:39:11 -0800 Subject: [PATCH 08/23] Add suggested .readthedocs.yaml for v2 migration --- .readthedocs.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 000000000..a0c403c64 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,22 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# We recommend specifying your dependencies to enable reproducible builds: +# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +# python: +# install: +# - requirements: docs/requirements.txt \ No newline at end of file From a67b57723096411988b1c81456593e6f27d53cc0 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 12 Dec 2023 08:44:30 -0800 Subject: [PATCH 09/23] Fix circleci link and remove lgtm --- README.rst | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index 446e42f2a..2956dc8a7 100644 --- a/README.rst +++ b/README.rst @@ -1,14 +1,9 @@ MMS Structured Data Version Control =================================== - - -.. image:: https://img.shields.io/lgtm/grade/java/g/Open-MBEE/mms.svg?logo=lgtm&logoWidth=18 - :target: https://lgtm.com/projects/g/Open-MBEE/mms/context:java - :alt: Language grade: Java -.. image:: https://circleci.com/gh/Open-MBEE/mms.svg?style=svg - :target: https://circleci.com/gh/Open-MBEE/mms +.. image:: https://circleci.com/gh/Open-MBEE/exec-mms.svg?style=svg + :target: https://circleci.com/gh/Open-MBEE/exec-mms :alt: CircleCI .. image:: https://readthedocs.org/projects/model-management-system/badge/?version=latest From fecb4fc165b5fec0af67c8e604c159a76bce9e4a Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 12 Dec 2023 08:49:27 -0800 Subject: [PATCH 10/23] Update circleci config for sonarcloud --- .circleci/config.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9ec19d859..0adadde10 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,7 @@ version: 2.1 orbs: docker: circleci/docker@2.1.1 + sonarcloud: sonarsource/sonarcloud@2.0.0 executors: openjdk_executor: docker: @@ -46,6 +47,16 @@ jobs: paths: - mms/* + scan: + executor: + name: docker/docker + working_directory: /home/circleci/mms + steps: + - checkout + - attach_workspace: + at: ~/ + - sonarcloud/scan + deploy_snapshot: executor: openjdk_executor working_directory: /home/circleci/mms @@ -70,18 +81,21 @@ workflows: build-test-deploy: jobs: - build_and_test: + - scan: + requires: + - build_and_test filters: tags: only: /[0-9.]+(-(a|b|rc)[0-9]+)?/ - deploy_snapshot: requires: - - build_and_test + - scan filters: branches: only: /((release|hotfix|support)/[0-9.]+(-(a|b|rc)[0-9]+)?|develop)/ - deploy_release: requires: - - build_and_test + - scan filters: tags: only: /[0-9.]+(-(a|b|rc)[0-9]+)?/ From a052298b2a59eb356aa5e74b3ac437413461c421 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 12 Dec 2023 10:02:22 -0800 Subject: [PATCH 11/23] Fix syntax --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0adadde10..b46bd78d4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -80,7 +80,7 @@ workflows: version: 2 build-test-deploy: jobs: - - build_and_test: + - build_and_test - scan: requires: - build_and_test From b06db81aebd7da52b3291d275f95158c21c6ffe4 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 12 Dec 2023 11:06:22 -0800 Subject: [PATCH 12/23] Add sonar-project.properties --- sonar-project.properties | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 000000000..9e2c52725 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.projectKey=Open-MBEE_exec-mms +sonar.organization=openmbee +sonar.language=java +sonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml \ No newline at end of file From 2b507f585e831fb127b904a0252b6fc6d6909322 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 12 Dec 2023 11:17:53 -0800 Subject: [PATCH 13/23] Add sonar-exclusion --- sonar-project.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 9e2c52725..28f60a27f 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,5 @@ sonar.projectKey=Open-MBEE_exec-mms sonar.organization=openmbee sonar.language=java -sonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml \ No newline at end of file +sonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml +sonar.exclusions=**/*.java \ No newline at end of file From ebe544ccbf3eb98732c488d4ed6a50b1026b9669 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 12 Dec 2023 11:50:53 -0800 Subject: [PATCH 14/23] Add context to circleci --- .circleci/config.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b46bd78d4..81dc200a9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -87,12 +87,16 @@ workflows: filters: tags: only: /[0-9.]+(-(a|b|rc)[0-9]+)?/ + context: + - SonarCloud - deploy_snapshot: requires: - scan filters: branches: only: /((release|hotfix|support)/[0-9.]+(-(a|b|rc)[0-9]+)?|develop)/ + context: + - DockerHub - deploy_release: requires: - scan @@ -100,4 +104,6 @@ workflows: tags: only: /[0-9.]+(-(a|b|rc)[0-9]+)?/ branches: - ignore: /.*/ \ No newline at end of file + ignore: /.*/ + context: + - DockerHub \ No newline at end of file From f81ac2e48824c238c9393d66956b0eed057d8212 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 12 Dec 2023 12:06:46 -0800 Subject: [PATCH 15/23] Add sonarcloud badge --- README.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 2956dc8a7..0aa22a90e 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,11 @@ MMS Structured Data Version Control =================================== - + +.. image:: https://sonarcloud.io/api/project_badges/measure?project=Open-MBEE_exec-mms&metric=alert_status + :target: https://sonarcloud.io/summary/new_code?id=Open-MBEE_exec-mms + :alt: SonarCloud + .. image:: https://circleci.com/gh/Open-MBEE/exec-mms.svg?style=svg :target: https://circleci.com/gh/Open-MBEE/exec-mms :alt: CircleCI From 3138287afeb77c38cc517c09a1f6ccdc12b7750e Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 12 Dec 2023 14:36:07 -0800 Subject: [PATCH 16/23] Try running scan concurrently --- .circleci/config.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 81dc200a9..a1aaaa92b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -80,7 +80,10 @@ workflows: version: 2 build-test-deploy: jobs: - - build_and_test + - build_and_test: + filters: + tags: + only: /[0-9.]+(-(a|b|rc)[0-9]+)?/ - scan: requires: - build_and_test @@ -91,19 +94,15 @@ workflows: - SonarCloud - deploy_snapshot: requires: - - scan + - build_and_test filters: branches: only: /((release|hotfix|support)/[0-9.]+(-(a|b|rc)[0-9]+)?|develop)/ - context: - - DockerHub - deploy_release: requires: - - scan + - build_and_test filters: tags: only: /[0-9.]+(-(a|b|rc)[0-9]+)?/ branches: - ignore: /.*/ - context: - - DockerHub \ No newline at end of file + ignore: /.*/ \ No newline at end of file From a82543856250ad4466fca8cb392a30dd26901ce0 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 12 Dec 2023 15:10:27 -0800 Subject: [PATCH 17/23] Copy out built jar from docker --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index a1aaaa92b..7b2beecb2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,6 +26,7 @@ jobs: cp example/src/main/resources/application.properties.example ./example/src/main/resources/application.properties docker-compose up --build -d docker run --network container:mms curlimages/curl --retry 8 --retry-delay 10 --retry-max-time 90 --retry-connrefused http://mms:8080/healthcheck + docker cp mms:/app.jar /home/circleci/mms/ - run: name: "Run and test Postman Collection" From 5c2cdf0ef813688aa760d31002093b0869141e46 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 12 Dec 2023 15:28:34 -0800 Subject: [PATCH 18/23] Move around scan task --- .circleci/config.yml | 5 ----- sonar-project.properties | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7b2beecb2..0d4ec6e21 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,7 +26,6 @@ jobs: cp example/src/main/resources/application.properties.example ./example/src/main/resources/application.properties docker-compose up --build -d docker run --network container:mms curlimages/curl --retry 8 --retry-delay 10 --retry-max-time 90 --retry-connrefused http://mms:8080/healthcheck - docker cp mms:/app.jar /home/circleci/mms/ - run: name: "Run and test Postman Collection" @@ -54,8 +53,6 @@ jobs: working_directory: /home/circleci/mms steps: - checkout - - attach_workspace: - at: ~/ - sonarcloud/scan deploy_snapshot: @@ -86,8 +83,6 @@ workflows: tags: only: /[0-9.]+(-(a|b|rc)[0-9]+)?/ - scan: - requires: - - build_and_test filters: tags: only: /[0-9.]+(-(a|b|rc)[0-9]+)?/ diff --git a/sonar-project.properties b/sonar-project.properties index 28f60a27f..9e2c52725 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,5 +1,4 @@ sonar.projectKey=Open-MBEE_exec-mms sonar.organization=openmbee sonar.language=java -sonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml -sonar.exclusions=**/*.java \ No newline at end of file +sonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml \ No newline at end of file From 763259bf2d8dbea74a637354bd114bd7a3eb33b1 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 12 Dec 2023 15:33:42 -0800 Subject: [PATCH 19/23] Change executor --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0d4ec6e21..c13f14e86 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -48,8 +48,7 @@ jobs: - mms/* scan: - executor: - name: docker/docker + executor: openjdk_executor working_directory: /home/circleci/mms steps: - checkout From c69be4c4fe9284fde2630b914062b62250759103 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 12 Dec 2023 16:00:00 -0800 Subject: [PATCH 20/23] Try building and scanning --- .circleci/config.yml | 3 +++ sonar-project.properties | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c13f14e86..e98ab8249 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,6 +52,9 @@ jobs: working_directory: /home/circleci/mms steps: - checkout + - run: + name: Build classes to scan + command: ./gradlew build - sonarcloud/scan deploy_snapshot: diff --git a/sonar-project.properties b/sonar-project.properties index 9e2c52725..28f60a27f 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,5 @@ sonar.projectKey=Open-MBEE_exec-mms sonar.organization=openmbee sonar.language=java -sonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml \ No newline at end of file +sonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml +sonar.exclusions=**/*.java \ No newline at end of file From cb6c6677d132b14fb3f81326d3e82216a1a6964f Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 12 Dec 2023 16:26:54 -0800 Subject: [PATCH 21/23] Skip tests on gradle build --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e98ab8249..df27e029d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,7 +54,7 @@ jobs: - checkout - run: name: Build classes to scan - command: ./gradlew build + command: ./gradlew build -x test - sonarcloud/scan deploy_snapshot: From e356955d93766fa9e49c5d0bad94e7cadf96937a Mon Sep 17 00:00:00 2001 From: dlamoris Date: Tue, 12 Dec 2023 17:04:08 -0800 Subject: [PATCH 22/23] Update sonar-project.properties try taking out exclusions and jacoco --- sonar-project.properties | 2 -- 1 file changed, 2 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index 28f60a27f..22ed1b08c 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,5 +1,3 @@ sonar.projectKey=Open-MBEE_exec-mms sonar.organization=openmbee sonar.language=java -sonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml -sonar.exclusions=**/*.java \ No newline at end of file From 8e3391935cca0320ea1a64123bc391f53b7fba9c Mon Sep 17 00:00:00 2001 From: dlamoris Date: Tue, 12 Dec 2023 17:13:25 -0800 Subject: [PATCH 23/23] Update sonar-project.properties add binary location --- sonar-project.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/sonar-project.properties b/sonar-project.properties index 22ed1b08c..b3bfa8103 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,3 +1,4 @@ sonar.projectKey=Open-MBEE_exec-mms sonar.organization=openmbee sonar.language=java +sonar.java.binaries=**/build/classes/java/main