diff --git a/.eslintrc.js b/.eslintrc.js index 960244c1..295acb79 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -8,10 +8,8 @@ module.exports = { extends: [ 'standard', 'eslint:recommended', - '@nuxtjs/eslint-config-typescript', 'plugin:cypress/recommended' ], - // add your custom rules here rules: { 'dot-notation': 'off', 'generator-star-spacing': 'off', diff --git a/.github/workflows/build-extension-charts.yml b/.github/workflows/build-extension-charts.yml index b38f64eb..8318aba1 100644 --- a/.github/workflows/build-extension-charts.yml +++ b/.github/workflows/build-extension-charts.yml @@ -1,125 +1,22 @@ name: Build and Release Extension Charts on: - workflow_dispatch: release: types: [released] -env: - ACTIONS_RUNNER_DEBUG: false - CI_COMMIT_MESSAGE: CI Build Artifacts - TARGET_BRANCH: gh-pages - defaults: run: shell: bash working-directory: ./ jobs: - build-extension-artifact: - name: Build extension artifact - runs-on: ubuntu-latest - permissions: - actions: write - contents: read - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Configure Git - run: | - git config user.name 'github-actions[bot]' - git config user.email 'github-actions[bot]@users.noreply.github.com' - - - name: Setup Helm - uses: azure/setup-helm@v4 - with: - version: v3.14.4 - - - name: Setup Nodejs and npm - uses: actions/setup-node@v4 - with: - node-version: '16' - - - name: Setup yarn - run: npm install -g yarn - - - name: Setup Nodejs with yarn caching - uses: actions/setup-node@v4 - with: - node-version: '16' - cache: yarn - - - name: Install dependencies - run: yarn - - - name: Parse Extension Name - if: github.ref_type == 'tag' - id: parsed-name - env: - GH_TOKEN: ${{ github.token }} - run: | - chmod +x ./node_modules/@rancher/shell/scripts/extension/parse-tag-name - yarn parse-tag-name ${{ github.ref_name }} ${{ github.run_id }} "charts" - - - name: Run build script - shell: bash - id: build_script - run: | - publish="yarn publish-pkgs -s ${{ github.repository }} -b ${{ env.TARGET_BRANCH }}" - - if [[ -n "${{ github.ref_name }}" ]]; then - publish="$publish -t ${{ github.ref_name }}" - fi - - $publish - - - name: Upload charts artifact - if: github.ref_type == 'tag' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request') - uses: actions/upload-artifact@v4 - with: - name: charts - path: tmp - - release: - name: Release Build - if: github.ref_type == 'tag' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request') - needs: build-extension-artifact - runs-on: ubuntu-latest + build-extension-charts: + uses: rancher/dashboard/.github/workflows/build-extension-charts.yml@master permissions: actions: write contents: write deployments: write pages: write - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: "${{ env.TARGET_BRANCH }}" - - - name: Configure Git - run: | - git config user.name 'github-actions[bot]' - git config user.email 'github-actions[bot]@users.noreply.github.com' - - - name: Download build artifact - uses: actions/download-artifact@v4 - with: - name: charts - - - name: Commit build - run: | - git add ./{assets,charts,extensions,index.yaml} - git commit -a -m "${{ env.CI_COMMIT_MESSAGE }}" - git push - - - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.6.0 - with: - charts_dir: ./charts/* - env: - CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - CR_SKIP_EXISTING: true - + with: + target_branch: gh-pages + tagged_release: ${{ github.ref_name }} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 245958df..b3be520a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,7 @@ jobs: - name: Setup Nodejs and npm uses: actions/setup-node@v4 with: - node-version: '16' + node-version: '20' - name: Setup yarn run: npm install -g yarn @@ -29,7 +29,7 @@ jobs: - name: Setup Nodejs with yarn caching uses: actions/setup-node@v4 with: - node-version: '16' + node-version: '20' cache: yarn - name: Install dependencies diff --git a/package.json b/package.json index 2110d9c2..a0928fe3 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "dependencies": { "@kubernetes/client-node": "^0.20.0", "@rancher/components": "^0.3.0-alpha.1", - "@rancher/shell": "^3.0.0-rc.4", + "@rancher/shell": "3.0.0-rc.5", "cache-loader": "^4.1.0", "color": "4.2.3", "core-js": "^3.37.1", @@ -36,11 +36,13 @@ "@vue/cli-plugin-unit-jest": "^5.0.8", "@vue/vue2-jest": "^29.2.6", "babel-jest": "^29.7.0", + "file-loader": "^6.2.0", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "sass-loader": "10.1.1", "ts-jest": "^29.1.5", - "typescript": "4.5.5" + "typescript": "4.5.5", + "url-loader": "^4.1.1" }, "engines": { "node": ">=20" diff --git a/pkg/kubewarden/chart/kubewarden/admission/ContextAware/index.vue b/pkg/kubewarden/chart/kubewarden/admission/ContextAware/index.vue index 5399eeea..ce27c731 100644 --- a/pkg/kubewarden/chart/kubewarden/admission/ContextAware/index.vue +++ b/pkg/kubewarden/chart/kubewarden/admission/ContextAware/index.vue @@ -1,6 +1,5 @@