From 97607d9ebaa3f8c6281babb91932f03d4d06332a Mon Sep 17 00:00:00 2001 From: Falk Wolsky Date: Sat, 22 Apr 2023 23:16:30 +0200 Subject: [PATCH 1/7] Added Netlify config file When the Frontend is hosted on Netlify, it needs a proper config file --- client/netlify.toml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 client/netlify.toml diff --git a/client/netlify.toml b/client/netlify.toml new file mode 100644 index 000000000..1cb2010f3 --- /dev/null +++ b/client/netlify.toml @@ -0,0 +1,4 @@ +[[redirects]] + from = "/*" + to = "/" + status = 200 From 04c04484e19d51bba0b68831cda7df518488df54 Mon Sep 17 00:00:00 2001 From: Jan Richter Date: Sat, 29 Apr 2023 22:27:58 +1200 Subject: [PATCH 2/7] feat: sonarcloud Adding static analysis with sonarcloud --- .github/workflows/sonarcloud.yml | 20 ++++++++++++++++++++ sonar-project.properties | 12 ++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/sonarcloud.yml create mode 100644 sonar-project.properties diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml new file mode 100644 index 000000000..d232096b9 --- /dev/null +++ b/.github/workflows/sonarcloud.yml @@ -0,0 +1,20 @@ +name: Build +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] +jobs: + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 000000000..7684e91c0 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,12 @@ +sonar.projectKey=Lowcoder-Community_openblocks +sonar.organization=lowcoder-community + +# This is the name and version displayed in the SonarCloud UI. +#sonar.projectName=openblocks +#sonar.projectVersion=1.0 + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +#sonar.sources=. + +# Encoding of the source code. Default is default system encoding +#sonar.sourceEncoding=UTF-8 \ No newline at end of file From 24c8fc8b45aa2c4c2888c3659800f62f4ab1b0ff Mon Sep 17 00:00:00 2001 From: Jan Richter Date: Sat, 29 Apr 2023 22:43:22 +1200 Subject: [PATCH 3/7] feat: dependabot Dependabot version updates scanning --- .github/dependabot.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..687edb717 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "maven" + directory: "/server" + schedule: + interval: "weekly" + - package-ecosystem: "yarn" + directory: "/client" + schedule: + interval: "weekly" + - package-ecosystem: "docker" + directory: "/deploy/docker" + schedule: + interval: "weekly" From a3b2637662c5442acefaf95afba0792d5dffa363 Mon Sep 17 00:00:00 2001 From: Jan Richter Date: Sat, 29 Apr 2023 22:48:54 +1200 Subject: [PATCH 4/7] ci: switched branch for codeql --- .github/workflows/codeql.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 707e627fc..e43fb36af 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,10 +13,10 @@ name: "CodeQL" on: push: - branches: [ "develop" ] + branches: [ "main" ] pull_request: # The branches below must be a subset of the branches above - branches: [ "develop" ] + branches: [ "main" ] schedule: - cron: '20 15 * * 5' From fd2b8e349880094a46b2694d92e46e2f8453707f Mon Sep 17 00:00:00 2001 From: Jan Richter Date: Sat, 29 Apr 2023 23:10:41 +1200 Subject: [PATCH 5/7] ci: sonarcloud + dependabot config fixes --- .github/dependabot.yml | 6 +++++- sonar-project.properties | 11 +---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 687edb717..81ff084d3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,7 +3,11 @@ version: 2 updates: - package-ecosystem: "maven" - directory: "/server" + directory: "/server/api-service" + schedule: + interval: "weekly" + - package-ecosystem: "yarn" + directory: "/server/node-service" schedule: interval: "weekly" - package-ecosystem: "yarn" diff --git a/sonar-project.properties b/sonar-project.properties index 7684e91c0..2c7d2855c 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,12 +1,3 @@ sonar.projectKey=Lowcoder-Community_openblocks sonar.organization=lowcoder-community - -# This is the name and version displayed in the SonarCloud UI. -#sonar.projectName=openblocks -#sonar.projectVersion=1.0 - -# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. -#sonar.sources=. - -# Encoding of the source code. Default is default system encoding -#sonar.sourceEncoding=UTF-8 \ No newline at end of file +sonar.java.binaries=server/api-service/openblocks-domain/target,server/api-service/openblocks-infra/target,server/api-service/openblocks-sdk/target,server/api-service/openblocks-server/target,server/api-service/openblocks-plugins/clickHousePlugin/target,server/api-service/openblocks-plugins/elasticSearchPlugin/target,server/api-service/openblocks-plugins/googleSheetsPlugin/target,server/api-service/openblocks-plugins/graphqlPlugin/target,server/api-service/openblocks-plugins/mongoPlugin/target,server/api-service/openblocks-plugins/mssqlPlugin/target,server/api-service/openblocks-plugins/mysqlPlugin/target,server/api-service/openblocks-plugins/openblocksApiPlugin/target,server/api-service/openblocks-plugins/oraclePlugin/target,server/api-service/openblocks-plugins/postgresPlugin/target,server/api-service/openblocks-plugins/redisPlugin/target,server/api-service/openblocks-plugins/restApiPlugin/target,server/api-service/openblocks-plugins/smtpPlugin/target,server/api-service/openblocks-plugins/snowflakePlugin/target,server/api-service/openblocks-plugins/sqlBasedPlugin/target \ No newline at end of file From 69785479152ba527ea5b4329569bbdc751e152e9 Mon Sep 17 00:00:00 2001 From: Jan Richter Date: Sat, 29 Apr 2023 23:16:59 +1200 Subject: [PATCH 6/7] ci: sonarcloud + dependabot config fixes --- .github/dependabot.yml | 4 ++-- .github/workflows/sonarcloud.yml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 81ff084d3..be6183512 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,11 +6,11 @@ updates: directory: "/server/api-service" schedule: interval: "weekly" - - package-ecosystem: "yarn" + - package-ecosystem: "npm" directory: "/server/node-service" schedule: interval: "weekly" - - package-ecosystem: "yarn" + - package-ecosystem: "npm" directory: "/client" schedule: interval: "weekly" diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index d232096b9..1b34528e7 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -13,6 +13,9 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Build Java + run: | + mvn clean compile -DskipTests -f ./server/api-service/pom.xml - name: SonarCloud Scan uses: SonarSource/sonarcloud-github-action@master env: From 38862c0719c18c3f455be67f47f2f1c54a6bd3cf Mon Sep 17 00:00:00 2001 From: Jan Richter Date: Sat, 29 Apr 2023 23:19:15 +1200 Subject: [PATCH 7/7] ci: missing java setup --- .github/workflows/sonarcloud.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 1b34528e7..3973e1382 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -10,6 +10,10 @@ jobs: name: SonarCloud runs-on: ubuntu-latest steps: + - name: Setup Java JDK + uses: actions/setup-java@v1 + with: + java-version: 17 - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis