diff --git a/Changelog.md b/Changelog.md index 878eeb35..4da94146 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,7 @@ **latest** - init: added GOOGLE_ANALYTICS_ID configuration option +- added support for mantis issue tracker **7.6.2** - gitlab: upgrade to CE v.7.6.2 diff --git a/README.md b/README.md index 608671d7..7402ebbc 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ - [External Issue Trackers](#external-issue-trackers) - [Redmine](#redmine) - [Jira](#jira) + - [Mantis](#mantis) - [Mapping host user and group](#mapping-host-user-and-group) - [Piwik](#piwik) - [Available Configuration Parameters](#available-configuration-parameters) @@ -671,6 +672,12 @@ Support for issue tracking using Jira can be added by specifying the complete UR 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 +#### Mantis + +Support for issue tracking using [mantis](https://www.mantisbt.org/) can be added by specifying the complete URL of the mantis web server in the `MANTIS_URL` configuration option. + +For example, if your mantis server is accessible at `https://mantis.example.com`, then adding `-e 'MANTIS_URL=https://mantis.example.com'` to the docker run command enables mantis support in GitLab. + ### Host UID / GID Mapping Per default the container is configured to run gitlab as user and group `git` with `uid` and `gid` `1000`. The host possibly uses this ids for different purposes leading to unfavorable effects. From the host it appears as if the mounted data volumes are owned by the host's user/group `1000`. diff --git a/assets/config/gitlabhq/gitlab.yml b/assets/config/gitlabhq/gitlab.yml index 9ec7798e..bb9054b6 100644 --- a/assets/config/gitlabhq/gitlab.yml +++ b/assets/config/gitlabhq/gitlab.yml @@ -125,6 +125,12 @@ production: &base issues_url: "{{JIRA_URL}}/browse/:id" new_issue_url: "{{JIRA_URL}}/secure/CreateIssue.jspa" + mantis: + title: "Mantis" + project_url: "{{MANTIS_URL}}/set_project.php?project_id=:issues_tracker_id&ref=view_all_bug_page.php" + issues_url: "{{MANTIS_URL}}/view.php?id=:id" + new_issue_url: "{{MANTIS_URL}}/set_project.php?project_id=:issues_tracker_id&ref=bug_report_page.php" + ## Gravatar ## For Libravatar see: http://doc.gitlab.com/ce/customization/libravatar.html gravatar: diff --git a/assets/init b/assets/init index 9b2c495c..5cd044dc 100755 --- a/assets/init +++ b/assets/init @@ -98,6 +98,7 @@ GITLAB_HTTPS_HSTS_MAXAGE=${GITLAB_HTTPS_HSTS_MAXAGE:-31536000} REDMINE_URL=${REDMINE_URL:-} JIRA_URL=${JIRA_URL:-} +MANTIS_URL=${MANTIS_URL:-} OAUTH_ALLOW_SSO=${OAUTH_ALLOW_SSO:-false} OAUTH_BLOCK_AUTO_CREATED_USERS=${OAUTH_BLOCK_AUTO_CREATED_USERS:-true} @@ -515,6 +516,18 @@ else sudo -u git -H sed '/new_issue_url: "{{JIRA_URL}}/d' -i config/gitlab.yml fi +# apply mantis configuration +if [ -n "${MANTIS_URL}" ]; then + sudo -u git -H sed 's,{{MANTIS_URL}},'"${MANTIS_URL}"',g' -i config/gitlab.yml +else + # remove the jira configuration block + sudo -u git -H sed '/mantis:/d' -i config/gitlab.yml + sudo -u git -H sed '/title: "Mantis"/d' -i config/gitlab.yml + sudo -u git -H sed '/project_url: "{{MANTIS_URL}}/d' -i config/gitlab.yml + sudo -u git -H sed '/issues_url: "{{MANTIS_URL}}/d' -i config/gitlab.yml + sudo -u git -H sed '/new_issue_url: "{{MANTIS_URL}}/d' -i config/gitlab.yml +fi + # apply oauth configuration # google