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

No configuration options when used together with GitHub Org pipeline (branch source plugin) #256

Open
biolauri opened this issue Jul 27, 2021 · 6 comments
Labels

Comments

@biolauri
Copy link

Version report

Jenkins and plugins versions report:

(I reduced the list to the relevant plugins)

Jenkins: 2.289.1
OS: Linux - 5.4.104+
---
github-branch-source:2.11.2
github-api:1.123
github:1.33.1
cloudbees-bitbucket-branch-source:2.9.10
Office-365-Connector:4.15.0
token-macro:2.15

Reproduction steps

  • Install github-branch-source plugin
  • Add GitHub org as pipeline

Results

Expected result:

I expected to be able to configure the Office 365 Connector in the GitHub org pipeline config, which will configure this for all repository multibranch pipelines within this org.

Actual result:

No Office 365 Connector section found, neither in the GitHub org level, nor in the repository level of the pipeline config. It is available on the branch level config, but readonly and therefor not usable.

@biolauri biolauri added the bug label Jul 27, 2021
@biolauri
Copy link
Author

I found a workaround for it. But the problem still exists because the workaround consists of changing the Jenkinsfiles within all of the repositories in my org. So I'd still like to configure this on the org level once and for every pipeline. :)

The workaround is to use the options directive within the pipeline and configure the necessary settings there. The webhook URL can be omitted and set at Jenkins config (Office 365 Connector section in Configure System) instead:

pipeline {
  options {
    office365ConnectorWebhooks([[
          name: 'Fancy Name',
          startNotification: false,
          notifySuccess: false,
          notifyAborted: true,
          notifyNotBuilt: true,
          notifyUnstable: true,
          notifyFailure: true,
          notifyBackToNormal: false,
          notifyRepeatedFailure: true,
          macros: [[template: env.BRANCH_NAME, value: 'main']], // Only send status on main branch
          factDefinitions: [[name: 'Help?', template: '💁🏼‍♀️ [Markdown supported](https://example.com)']]
      ]]
    )
  }
...
}

@pdomineaux
Copy link

I can confirm this issue.
It is sad because Github is also linked to Blue Ocean plugin.
So actually, no way to get this connector working if BlueOcean plugin is installed.

@pdomineaux
Copy link

Uninstalling and reinstalling the plugin fixed the issue for me.
Configure System configuration was also saved.
Multiple restart of Jenkins were performed for other purposes.

@alexey-sellforte
Copy link

@pdomineaux reinstalling blueocean or office-365 plugin?

@pdomineaux
Copy link

@alexey-sellforte Reinstalling office-365 plugin.

@mattsee
Copy link

mattsee commented May 25, 2022

Re-installation of the office365 plugin in the Jenkins did not resolve the issue for me, however the workaround suggested by biolauri by embedding within [ every instance of ] the Jenkinsfile the relevant config and utilisation commands of the office365connector seems to be working ( despite the hassle of having to implement this in every Jenkinsfile within the various repos setup to use the Jenkins instance ).

As an aside - despite being a local administrator of the Jenkins - the Jenkins instance I am trying to configure is a "shared" corporate Jenkins [ 'serverless' ] instance which is remotely configured and managed by a central team - this may have some side effects regarding the plugins and associated configs and what they are allowed to change [ or not ] within the Jenkins instance etc.

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

No branches or pull requests

4 participants