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

add baseUrl parameter to support slack-compatible integrations #293

Merged
merged 3 commits into from
Mar 6, 2017
Merged

Conversation

Reamer
Copy link
Contributor

@Reamer Reamer commented Mar 2, 2017

@samrocketman
Copy link
Member

samrocketman commented Mar 2, 2017

@Reamer can you amend your PR so that there's two commits? One commit for the author of #204 and a second commit for your additional changes? I prefer to preserve credit where due in the contributor statistics.

Actually, since you resolved conflicts that may no longer be easily done. Tell me your thoughts.

@samrocketman
Copy link
Member

I'll test this change now.

@samrocketman
Copy link
Member

So far in my testing; upgrading the plugin from 2.1 to 2.2-SNAPSHOT doesn't break any configurations. That's a good start. Now I'm going to review the code.

@samrocketman
Copy link
Member

I have mattermost configured on http://localhost:8065/. How do I configure the Slack plugin to interact with it? I don't know how to test this feature.

Bootstrap Jenkins with slack configured and a mattermost machine (requires vagrant).

  1. Clone https://github.com/samrocketman/jenkins-bootstrap-slack
  2. Bring up mattermost; vagrant up; once mattermost is up you can visit http://localhost:8065/.
  3. Bring up Jenkins; ./slack_bootstrap.sh; The end of the console output will include how to log into it.

Beyond that; I don't know how to test the integration.

@Reamer
Copy link
Contributor Author

Reamer commented Mar 3, 2017

@samrocketman You have now write access to my branch.
To test this feature with mattermost:

  1. Login to Mattermost
  2. click in the upper right corner on three points
  3. click on Integrations
  4. click on Incoming Webhooks
  5. Create a Webhook
  6. You should now have a URL with a Token, something like this (https://mydomain.com/hooks/xxxxxxxxxxxxxx)
  7. "https://mydomain.com/hooks/" is your baseUrl + "xxxxxxxxxxxxxx" your token.

Now I will take a look into your Vagrant-Box

@Reamer
Copy link
Contributor Author

Reamer commented Mar 3, 2017

@samrocketman: Vagrant is up and running, but I doesn't want a local jenkins server on my os. I was wondering that the integration button was missing. After a clean install you must enable this integration
Go to http://localhost:8065/admin_console/integrations/custom and enable webhook integration. After this you can follow my instructions in my last comment.

Let me know ,if I can help you with testing.

@samrocketman
Copy link
Member

Thanks, I'll try it tomorrow.

@samrocketman
Copy link
Member

samrocketman commented Mar 5, 2017

What works

Upgrading plugin preserves settings for existing slack configurations.

All plugin settings were preserved when I updated the Base URL. Notifying mattermost was also successful. Here's a screenshot of some output.

screenshot_20170305_154243

What doesn't work

Test Connection

So far adding a trailing slash is required. I configured Base URL = http://localhost:8065/hooks/ and "Test Connection" button succeeded. However, Base URL = http://localhost:8065/hooks causes "Test Connection" button to fail. It should not matter; this is a bug.

@samrocketman
Copy link
Member

Fully Tested

Okay, this has FINALLY been successfully tested. I tested the following:

  1. Upgrading configurations from prior version of Slack plugin (success).
  2. Configured with Mattermost using http://localhost:8065/hooks (no trailing slash) (success).
  3. Configured with Mattermost using http://localhost:8065/hooks/ (trailing slash) (success).

This pull request is ready to be merged!

@samrocketman samrocketman merged commit 24537f4 into jenkinsci:master Mar 6, 2017
@samrocketman
Copy link
Member

Thanks for your work @Reamer and @andrzejwp.

@samrocketman samrocketman removed their request for review March 6, 2017 02:06
@samrocketman samrocketman added this to the slack-2.2 milestone Mar 6, 2017
@samrocketman
Copy link
Member

Feel free to subscribe to #296 for updates related to Slack Plugin 2.2 release.

@andrzejwp
Copy link

Great! Sorry I didn't asist further. Hope this makes it to the public release soon. Thanks!

@samrocketman
Copy link
Member

No worries. It's challenging to stay on top of volunteer stuff so I appreciate your contributions.

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

Successfully merging this pull request may close these issues.

3 participants