-
Notifications
You must be signed in to change notification settings - Fork 587
HDDS-9171. Resolve dependabot build issues when updating npm packages #5538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
55b4a56
HDDS-9171. Added dependabot.yml and github actions to control dependa…
devabhishekpal c7fdd6a
Separated out dependabot workflow to individual file
devabhishekpal 415ed31
Removed explicit reference to apache/ozone repo, added permission to …
devabhishekpal 00ee7f8
Merge branch 'apache:master' into HDDS-9171
devabhishekpal 8da5304
Addressed review comments, added license header to dependabot.yml, se…
devabhishekpal e793216
Addressed review comments
devabhishekpal ecc383c
Replaced static versions with env values
devabhishekpal dd97b15
Merge branch 'apache:master' into HDDS-9171
devabhishekpal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| version: 2 | ||
| updates: | ||
| # Maintain dependencies for GitHub Actions | ||
| - package-ecosystem: "npm" | ||
| directory: "hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/" | ||
| schedule: | ||
| interval: "weekly" | ||
| commit-message: | ||
| prefix: "[Recon] Dependabot Package Upgrade: " | ||
| ignore: | ||
| - dependency-name: "*" | ||
| update-types: ["version-update:semver-major"] | ||
errose28 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| pull-request-branch-name: | ||
| separator: "-" | ||
|
|
||
| - package-ecosystem: maven | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| commit-message: | ||
| prefix: "[Java] Dependabot Package Upgrade: " | ||
| pull-request-branch-name: | ||
| separator: "-" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| name: dependabot-ci | ||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize] | ||
| concurrency: | ||
| group: dependabot-ci-${{ github.event.pull_request.number || github.sha }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
| jobs: | ||
| dependabot-check: | ||
| if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' && startsWith(github.event.pull_request.title, '[Recon] Dependabot Package Upgrade') }} | ||
| runs-on: ubuntu-20.04 | ||
| env: | ||
| CI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| NODE_VERSION: 16.14.2 | ||
errose28 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| PNPM_VERSION: 7.33.6 | ||
| cURL_LOC: /usr/bin/curl | ||
| cURL_ARGS: -fsSL | ||
| PNPM_URL: https://get.pnpm.io/install.sh | ||
| timeout-minutes: 15 | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Extract branch name | ||
| shell: bash | ||
| run: echo "branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | ||
| id: get_branch_name | ||
| - name: Checkout dependabot branch | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| path: ozone | ||
| - name: Delete the lockfile | ||
| working-directory: ozone | ||
| run: | | ||
| #Delete the lockfile created by dependabot | ||
| rm -rf hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/pnpm-lock.yaml | ||
| - name: Install NodeJS v${{ env.NODE_VERSION }} | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
| - name: Install pnpm v${{ env.PNPM_VERSION }} and recreate lockfile | ||
| working-directory: ozone | ||
| shell: bash | ||
| run: | | ||
| # Install PNPM and recreate lockfile | ||
| echo "Fetching pnpm from $PNPM_URL with version $PNPM_VERSION" | ||
| $cURL_LOC $cURL_ARGS $PNPM_URL | env PNPM_VERSION=$PNPM_VERSION SHELL="$(which sh)" ENV="$HOME/.shrc" sh - | ||
| source /home/runner/.shrc | ||
| PNPM_EXEC=$(which pnpm) | ||
| echo "pnpm is present at: $PNPM_EXEC" | ||
| $PNPM_EXEC config set store-dir ~/.pnpm-store | ||
| cd hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/ | ||
| $PNPM_EXEC install --lockfile-only | ||
| - name: Commit generated lockfile | ||
| working-directory: ozone | ||
| run: | | ||
| OZONE_SHA=$(git -C ./ rev-parse HEAD) | ||
| cd hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/ | ||
| git add ./pnpm-lock.yaml | ||
| git status | ||
| git config --global user.name 'Github Actions' | ||
| git config --global user.email '[email protected]' | ||
| git commit -m "[auto] Generated pnpm-lock from actions for $OZONE_SHA" || true | ||
| git push origin HEAD:${{ steps.get_branch_name.outputs.branch_name }} | ||
1 change: 1 addition & 0 deletions
1
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| { | ||
| "packageManager": "[email protected]", | ||
| "name": "ozone-recon", | ||
| "version": "0.1.0", | ||
| "private": true, | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.