Skip to content

Increase privilege of github-bot on Jenkins #2394

Description

@mmarchini

I just added github-bot credentials to nodejs/reliability so that we can generate daily reports of failures in the CI via GitHub Actions. Unfortunately, it seems like the bot doens't have enough permissions on Jenkins, which leads to ncu-ci failing:

Run ncu-ci walk pr --stats=true --markdown $PWD/results.md
  ncu-ci walk pr --stats=true --markdown $PWD/results.md
  shell: /bin/bash -e {0}
- Querying https://ci.nodejs.org/job/node-test-pull-request/api/json?tree=builds%5Burl%2Cresult%5D
TypeError: Cannot read property 'filter' of undefined
    at filterBuild (/opt/hostedtoolcache/node/12.18.2/x64/lib/node_modules/node-core-utils/lib/ci/ci_result_parser.js:898:6)
    at listBuilds (/opt/hostedtoolcache/node/12.18.2/x64/lib/node_modules/node-core-utils/lib/ci/ci_result_parser.js:912:18)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async WalkCommand.initialize (/opt/hostedtoolcache/node/12.18.2/x64/lib/node_modules/node-core-utils/bin/ncu-ci:290:20)
    at async main (/opt/hostedtoolcache/node/12.18.2/x64/lib/node_modules/node-core-utils/bin/ncu-ci:391:3)
##[error]Process completed with exit code 1.

https://github.com/nodejs/reliability/runs/910446091?check_suite_focus=true

I tried to run the same command (ncu-ci walk pr --stats=true --markdown $PWD/results.md) on my machine with my credentials and with bot credentials. The command works with my credentials and it fails with bot credentials. Not sure which permissions it needs in order to make the required API requests to Jenkins. Also, we intend to use the bot credentials to start CI via label, which means the bot will need permission to start CI runs.

Can we add the same permissions we have to @nodejs/collaborators to @nodejs/Bots (or to the user @nodejs-github-bot? cc @nodejs/jenkins-admins

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions