mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-18 13:58:25 +00:00
Merge branch 'feature/third-party-trackers', Refer #107
This commit is contained in:
commit
596debd151
@ -1,6 +1,8 @@
|
||||
# Changelog
|
||||
|
||||
**latest**
|
||||
- added support for jira issue tracker
|
||||
- added support for redmine issue tracker
|
||||
- update to gitlab-shell 1.9.7
|
||||
- update to the sameersbn/ubuntu:14.04.20140812 baseimage
|
||||
|
||||
|
||||
20
README.md
20
README.md
@ -35,6 +35,9 @@
|
||||
- [Installing Trusted SSL Server Certificates](#installing-trusted-ssl-server-certificates)
|
||||
- [Putting it all together](#putting-it-all-together)
|
||||
- [Run under sub URI](#run-under-sub-uri)
|
||||
- [External Issue Trackers](#external-issue-trackers)
|
||||
- [Redmine](#redmine)
|
||||
- [Jira](#jira)
|
||||
- [Available Configuration Parameters](#available-configuration-parameters)
|
||||
- [Maintenance](#maintenance)
|
||||
- [Creating Backups](#creating-backups)
|
||||
@ -624,6 +627,22 @@ docker run --name=gitlab -d \
|
||||
|
||||
When you change the sub URI path, you need to recompile all precompiled assets. This can be done with either deleting tmp/cache/VERSION file under data store, or just `rm -Rf /PATH/TO/DATA_STORE/tmp`. After cleaning up cache files, restart the container.
|
||||
|
||||
### External Issue Trackers
|
||||
|
||||
GitLab can be configured to use third party issue trackers such as Redmine and Atlassian Jira. Use of third party issue trackers have to be configured on a per project basis from the project settings page. This means that the GitLab's issue tracker is always the default tracker unless specified otherwise.
|
||||
|
||||
#### Redmine
|
||||
|
||||
Support for issue tracking using Redmine can be added by specifying the complete URL of the Redmine web server in the `REDMINE_URL` configuration option.
|
||||
|
||||
For example, if your Redmine server is accessible at `https://redmine.example.com`, then adding `-e 'REDMINE_URL=https://redmine.example.com'` to the docker run command enables Redmine support in GitLab
|
||||
|
||||
#### Jira
|
||||
|
||||
Support for issue tracking using Jira can be added by specifying the complete URL of the Jira web server in the `JIRA_URL` configuration option.
|
||||
|
||||
For example, if your Jira server is accessible at `https://jira.example.com`, then adding `-e 'JIRA_URL=https://jira.example.com'` to the docker run command enables Jira support in GitLab
|
||||
|
||||
### Available Configuration Parameters
|
||||
|
||||
*Please refer the docker run command options for the `--env-file` flag where you can specify all required environment variables in a single file. This will save you from writing a potentially long docker run command.*
|
||||
@ -679,6 +698,7 @@ Below is the complete list of available options that can be used to customize yo
|
||||
- **LDAP_ALLOW_USERNAME_OR_EMAIL_LOGIN**: If enabled, GitLab will ignore everything after the first '@' in the LDAP username submitted by the user on login. Defaults to false if LDAP_UID is userPrincipalName, else true.
|
||||
- **LDAP_BASE**: Base where we can search for users. No default.
|
||||
- **LDAP_USER_FILTER**: Filter LDAP users. No default.
|
||||
- **REDMINE_URL**: Location of the redmine server, e.g. `-e 'REDMINE_URL=https://redmine.example.com'`. No defaults.
|
||||
|
||||
# Maintenance
|
||||
|
||||
|
||||
@ -84,32 +84,32 @@ production: &base
|
||||
|
||||
## External issues trackers
|
||||
issues_tracker:
|
||||
# redmine:
|
||||
# title: "Redmine"
|
||||
redmine:
|
||||
title: "Redmine"
|
||||
# ## If not nil, link 'Issues' on project page will be replaced with this
|
||||
# ## Use placeholders:
|
||||
# ## :project_id - GitLab project identifier
|
||||
# ## :issues_tracker_id - Project Name or Id in external issue tracker
|
||||
# project_url: "http://redmine.sample/projects/:issues_tracker_id"
|
||||
project_url: "{{REDMINE_URL}}/projects/:issues_tracker_id"
|
||||
#
|
||||
# ## If not nil, links from /#\d/ entities from commit messages will replaced with this
|
||||
# ## Use placeholders:
|
||||
# ## :project_id - GitLab project identifier
|
||||
# ## :issues_tracker_id - Project Name or Id in external issue tracker
|
||||
# ## :id - Issue id (from commit messages)
|
||||
# issues_url: "http://redmine.sample/issues/:id"
|
||||
issues_url: "{{REDMINE_URL}}/issues/:id"
|
||||
#
|
||||
# ## If not nil, links to creating new issues will be replaced with this
|
||||
# ## Use placeholders:
|
||||
# ## :project_id - GitLab project identifier
|
||||
# ## :issues_tracker_id - Project Name or Id in external issue tracker
|
||||
# new_issue_url: "http://redmine.sample/projects/:issues_tracker_id/issues/new"
|
||||
new_issue_url: "{{REDMINE_URL}}/projects/:issues_tracker_id/issues/new"
|
||||
#
|
||||
# jira:
|
||||
# title: "Atlassian Jira"
|
||||
# project_url: "http://jira.sample/issues/?jql=project=:issues_tracker_id"
|
||||
# issues_url: "http://jira.sample/browse/:id"
|
||||
# new_issue_url: "http://jira.sample/secure/CreateIssue.jspa"
|
||||
jira:
|
||||
title: "Atlassian Jira"
|
||||
project_url: "{{JIRA_URL}}/issues/?jql=project=:issues_tracker_id"
|
||||
issues_url: "{{JIRA_URL}}/browse/:id"
|
||||
new_issue_url: "{{JIRA_URL}}/secure/CreateIssue.jspa"
|
||||
|
||||
## Gravatar
|
||||
gravatar:
|
||||
|
||||
27
assets/init
27
assets/init
@ -69,6 +69,9 @@ LDAP_ALLOW_USERNAME_OR_EMAIL_LOGIN=${LDAP_ALLOW_USERNAME_OR_EMAIL_LOGIN:-}
|
||||
LDAP_BASE=${LDAP_BASE:-}
|
||||
LDAP_USER_FILTER=${LDAP_USER_FILTER:-}
|
||||
|
||||
REDMINE_URL=${REDMINE_URL:-}
|
||||
JIRA_URL=${JIRA_URL:-}
|
||||
|
||||
# is a redis container linked?
|
||||
if [ -n "${REDISIO_PORT_6379_TCP_ADDR}" ]; then
|
||||
REDIS_HOST=${REDIS_HOST:-${REDISIO_PORT_6379_TCP_ADDR}}
|
||||
@ -389,6 +392,30 @@ sudo -u git -H sed 's/{{LDAP_ALLOW_USERNAME_OR_EMAIL_LOGIN}}/'"${LDAP_ALLOW_USER
|
||||
sudo -u git -H sed 's/{{LDAP_BASE}}/'"${LDAP_BASE}"'/' -i /home/git/gitlab/config/gitlab.yml
|
||||
sudo -u git -H sed 's/{{LDAP_USER_FILTER}}/'"${LDAP_USER_FILTER}"'/' -i /home/git/gitlab/config/gitlab.yml
|
||||
|
||||
# apply redmine configuration
|
||||
if [ -n "${REDMINE_URL}" ]; then
|
||||
sudo -u git -H sed 's,{{REDMINE_URL}},'"${REDMINE_URL}"',g' -i /home/git/gitlab/config/gitlab.yml
|
||||
else
|
||||
# remove the redmine configuration block
|
||||
sudo -u git -H sed '/redmine:/d' -i /home/git/gitlab/config/gitlab.yml
|
||||
sudo -u git -H sed '/title: "Redmine"/d' -i /home/git/gitlab/config/gitlab.yml
|
||||
sudo -u git -H sed '/project_url: "{{REDMINE_URL}}/d' -i /home/git/gitlab/config/gitlab.yml
|
||||
sudo -u git -H sed '/issues_url: "{{REDMINE_URL}}/d' -i /home/git/gitlab/config/gitlab.yml
|
||||
sudo -u git -H sed '/new_issue_url: "{{REDMINE_URL}}/d' -i /home/git/gitlab/config/gitlab.yml
|
||||
fi
|
||||
|
||||
# apply jira configuration
|
||||
if [ -n "${JIRA_URL}" ]; then
|
||||
sudo -u git -H sed 's,{{JIRA_URL}},'"${JIRA_URL}"',g' -i /home/git/gitlab/config/gitlab.yml
|
||||
else
|
||||
# remove the jira configuration block
|
||||
sudo -u git -H sed '/jira:/d' -i /home/git/gitlab/config/gitlab.yml
|
||||
sudo -u git -H sed '/title: "Atlassian Jira"/d' -i /home/git/gitlab/config/gitlab.yml
|
||||
sudo -u git -H sed '/project_url: "{{JIRA_URL}}/d' -i /home/git/gitlab/config/gitlab.yml
|
||||
sudo -u git -H sed '/issues_url: "{{JIRA_URL}}/d' -i /home/git/gitlab/config/gitlab.yml
|
||||
sudo -u git -H sed '/new_issue_url: "{{JIRA_URL}}/d' -i /home/git/gitlab/config/gitlab.yml
|
||||
fi
|
||||
|
||||
# configure relative_url_root
|
||||
if [ ${GITLAB_RELATIVE_URL_ROOT} ]; then
|
||||
sudo -u git -H sed 's,# config.relative_url_root = "/gitlab",config.relative_url_root = "'${GITLAB_RELATIVE_URL_ROOT}'",' -i /home/git/gitlab/config/application.rb
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user