Skip to content
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

Bitbucket Server unable to trigger pipelines #1393

Open
Timoses opened this issue Dec 3, 2021 · 0 comments
Open

Bitbucket Server unable to trigger pipelines #1393

Timoses opened this issue Dec 3, 2021 · 0 comments

Comments

@Timoses
Copy link

Timoses commented Dec 3, 2021

I believe due to the following one can never trigger jobs: jenkins-x/go-scm#310

IsCollaborator will always fail.

[lighthouse-webhooks-c57dc69b9-q5w77] {"Branch":"master","Clone":"https://bitbucket.int/scm/test/testrepo.git","ID":"285","Link":"https://bitbucket.int/projects/test/repos/testrepo/browse","Name":"testrepo","Namespace":"TEST","Webhook":"pull_request","author":"myname","error":
"could not check membership: error in IsCollaborator: Not Authorized","level":"error","msg":"Error handling PullRequestEvent.","org":"TEST","pr":31,"repo":"testrepo","time":"2021-12-03T13:09:19Z","url":"https://bitbucket.int/projects/test/repos/testrepo/pull-requests/31"}

(Note: I set GIT_CLONE_PATH_PREFIX=scm/ for the webhooks container. Otherwise it would have tried to clone from https://bitbucket.int/test/testrepo:

cloneSuffix := os.Getenv("GIT_CLONE_PATH_PREFIX")
)

plugins.yaml:

  plugins.yaml: |
    triggers:
      - repos:
        - TEST
        ignore_ok_to_test: false
        elide_skipped_contexts: false
        only_org_members: false
    owners:
      skip_collaborators:
        - TEST
    welcome:
      - repos:
        - TEST
        message_template: Nice to meet you @{{.AuthorLogin}} !
    plugins:
      TEST/testrepo:
        - trigger
        - lgtm
        - welcome

config.yaml:

apiVersion: v1
data:
  config.yaml: |
    pod_namespace: jx
    prowjob_namespace: jx
    in_repo_config:
      enabled:
        TEST: true

Unfortunately, it does not seem to be possible to configure trigger to only use the OWNERS file for info who may trigger jobs.

For trigger it always seems the first check:
https://github.com/jenkins-x/lighthouse/blob/main/pkg/plugins/trigger/pull-request.go#L45
(same for '/test ' comment in generate-comment.go)

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

No branches or pull requests

2 participants