Generate Slack app manifest for self-managed
What does this MR do and why?
The GitLab for Slack app that is distibuted through the Slack App Directory can only work with GitLab.com. This is because the Slack app configuration requires specific hard-coded URLs, so these are all set to gitlab.com.
This change allows self-managed customers to create a copy of the GitLab for Slack app to install into their Slack workspace.
The Slack app they create is functionally identical to the official public one.
The change is behind a feature flag.
Screenshots or screen recordings
QA screen recordings
Creating and configuring | Updating |
---|---|
SlackSM | SlackSMUpdate |
Admin
Before | After |
---|---|
|
How to set up and validate locally
- Start a GitPod instance (docs)
- After the GitPod instance has finished setting up and the GDK configuration steps have completed, change port
3000
to be public:- On the bottom nav, select PORTS.
- On the Port
3000
row, click the lock icon to switch the state toopen (public)
.
- In the GitPod terminal, check out this branch and run
bundle
andyarn
and restart GDK for good measure:cd /workspace/gitlab-development-kit/gitlab && git fetch origin 358872-make-slack-admin-section-visible-for-self-managed && git checkout 358872-make-slack-admin-section-visible-for-self-managed && bundle && yarn && cd /workspace/gitlab-development-kit && gdk restart
- Enable the feature flag:
- Start a Rails console in the GitPod terminal:
cd /workspace/gitlab-development-kit/gitlab && bundle exec rails c
- Enable the flag in the Rails console:
Feature.enable(:slack_app_self_managed) User.first.update!(password_expires_at: nil) # We don't need to do this, but it makes logging in to the instance quicker
- Go to your GitPod GitLab instance (to find the address: on the bottom nav, select PORTS, click the address next to port
3000
) - Visit
/admin/application_settings/general
- Expand the GitLab for Slack app section
- Click Create Slack app and follow the guidance in the Create a GitLab for Slack app section of
doc/user/admin_area/settings/slack_app.md
in this branch. - After creating the app, follow the guidance in the Configure the settings section of
doc/user/admin_area/settings/slack_app.md
in this branch.
Once configured, you can test that it works by entering the /gitlab help
slash command into a channel in your Slack workspace and hitting return. You should see a list of available Slash commands in response. Note: to use any of the other slash commands requires you to configure a GitLab for Slack app integration for a project - which you can do if you like!
To QA updating:
- Visit
/admin/application_settings/general
- Expand the GitLab for Slack app section
- Click Download latest manifest file to download a JSON file
- Follow the guidance in the Updating the GitLab for Slack app section of
doc/user/admin_area/settings/slack_app.md
in this branch.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #358872 (closed)