From 38ea13e1f08beffb74bc5f8c5397ffd9a9089567 Mon Sep 17 00:00:00 2001 From: Steven Zhang Date: Tue, 29 Jul 2025 22:47:47 -0700 Subject: [PATCH] Added build job for CI, replace dependabot into renovate, fixed some typo bugs --- .github/dependabot.yml | 7 ----- .github/renovate.json | 21 ++++++++++++++ .github/workflows/release.yml | 22 ++++++++++++++ .github/workflows/renovate-vault.yml | 29 +++++++++++++++++++ .github/workflows/{ci.yml => unit-test.yml} | 2 +- .../sbombastic-image-vulnerability-scanner.ts | 2 +- .../{registries.vue => Registries.vue} | 0 ...ulnerabilities.vue => Vulnerabilities.vue} | 0 ...stic-image-vulnerability-scanner-routes.ts | 4 +-- 9 files changed, 76 insertions(+), 11 deletions(-) delete mode 100644 .github/dependabot.yml create mode 100644 .github/renovate.json create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/renovate-vault.yml rename .github/workflows/{ci.yml => unit-test.yml} (98%) rename pkg/sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/{registries.vue => Registries.vue} (100%) rename pkg/sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/{vulnerabilities.vue => Vulnerabilities.vue} (100%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 8ab4cb5..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "daily" - open-pull-requests-limit: 10 \ No newline at end of file diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..15e722c --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,21 @@ +{ + "extends": [ + "github>rancher/renovate-config#release" + ], + "baseBranches": [ + "main" + ], + "prHourlyLimit": 2, + "vulnerabilityAlerts": { + "enabled": true + }, + "osvVulnerabilityAlerts": true, + "packageRules": [ + { + "enabled": false, + "matchPackageNames": [ + "*" + ] + } + ] +} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..69bbb4e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Build and Release Extension Charts + +on: + release: + types: [prereleased, released] + +defaults: + run: + shell: bash + working-directory: ./ + +jobs: + build-extension-charts: + uses: rancher/dashboard/.github/workflows/build-extension-charts.yml@master + permissions: + actions: write + contents: write + deployments: write + pages: write + with: + target_branch: gh-pages + tagged_release: ${{ github.ref_name }} \ No newline at end of file diff --git a/.github/workflows/renovate-vault.yml b/.github/workflows/renovate-vault.yml new file mode 100644 index 0000000..52f6a5d --- /dev/null +++ b/.github/workflows/renovate-vault.yml @@ -0,0 +1,29 @@ +name: Renovate +on: + workflow_dispatch: + inputs: + logLevel: + description: "Override default log level" + required: false + default: "info" + type: string + overrideSchedule: + description: "Override all schedules" + required: false + default: "false" + type: string + # Run twice in the early morning (UTC) for initial and follow up steps (create pull request and merge) + schedule: + - cron: '30 4,6 * * *' + +permissions: + contents: read + id-token: write + +jobs: + call-workflow: + uses: rancher/renovate-config/.github/workflows/renovate-vault.yml@release + with: + logLevel: ${{ inputs.logLevel || 'info' }} + overrideSchedule: ${{ github.event.inputs.overrideSchedule == 'true' && '{''schedule'':null}' || '' }} + secrets: inherit diff --git a/.github/workflows/ci.yml b/.github/workflows/unit-test.yml similarity index 98% rename from .github/workflows/ci.yml rename to .github/workflows/unit-test.yml index 26234f2..df04f0d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/unit-test.yml @@ -1,4 +1,4 @@ -name: CI +name: Unit test on: [push, pull_request] jobs: test: diff --git a/pkg/sbombastic-image-vulnerability-scanner/config/sbombastic-image-vulnerability-scanner.ts b/pkg/sbombastic-image-vulnerability-scanner/config/sbombastic-image-vulnerability-scanner.ts index 299fbd2..b6da066 100644 --- a/pkg/sbombastic-image-vulnerability-scanner/config/sbombastic-image-vulnerability-scanner.ts +++ b/pkg/sbombastic-image-vulnerability-scanner/config/sbombastic-image-vulnerability-scanner.ts @@ -39,7 +39,7 @@ export function init($plugin: IPlugin, store: any) { }); virtualType({ - label: store.getters["i18n/t"]("image_scanner.vulnerabilities.title"), + labelKey: "imageScanner.vulnerabilities.title", name: PAGE.VULNERABILITY_OVERVIEW, namespaced: false, route: { diff --git a/pkg/sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/registries.vue b/pkg/sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/Registries.vue similarity index 100% rename from pkg/sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/registries.vue rename to pkg/sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/Registries.vue diff --git a/pkg/sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/vulnerabilities.vue b/pkg/sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/Vulnerabilities.vue similarity index 100% rename from pkg/sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/vulnerabilities.vue rename to pkg/sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/Vulnerabilities.vue diff --git a/pkg/sbombastic-image-vulnerability-scanner/routes/sbombastic-image-vulnerability-scanner-routes.ts b/pkg/sbombastic-image-vulnerability-scanner/routes/sbombastic-image-vulnerability-scanner-routes.ts index 8647275..95de59a 100644 --- a/pkg/sbombastic-image-vulnerability-scanner/routes/sbombastic-image-vulnerability-scanner-routes.ts +++ b/pkg/sbombastic-image-vulnerability-scanner/routes/sbombastic-image-vulnerability-scanner-routes.ts @@ -1,8 +1,8 @@ import RegistryDetails from "@sbombastic-image-vulnerability-scanner/components/RegistryDetails.vue"; import ComponentDemo from "@sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/ComponentDemo.vue"; import ImageOverview from "@sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/ImageOverview.vue"; -import Registries from "@sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/registries.vue"; -import Vulnerabilities from "@sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/vulnerabilities.vue"; +import Registries from "@sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/Registries.vue"; +import Vulnerabilities from "@sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/Vulnerabilities.vue"; import { PRODUCT_NAME,