diff --git a/Changelog.md b/Changelog.md index 021f29b3..9f98fe65 100644 --- a/Changelog.md +++ b/Changelog.md @@ -6,6 +6,7 @@ - init: set default value of `UNICORN_WORKERS` to `3` - init: set default value of `SMTP_OPENSSL_VERIFY_MODE` to `peer` - init: removed `GITLAB_RESTRICTED_VISIBILITY` configuration option, can be set from the UI +- init: added BitBucket OAuth configuration support **7.8.4** - gitlab: upgrade to CE v.7.8.4 diff --git a/README.md b/README.md index 977996ac..01200e24 100644 --- a/README.md +++ b/README.md @@ -791,6 +791,8 @@ Below is the complete list of available options that can be used to customize yo - **OAUTH_GITHUB_APP_SECRET**: GitHub App Client secret. No defaults. - **OAUTH_GITLAB_API_KEY**: GitLab App Client ID. No defaults. - **OAUTH_GITLAB_APP_SECRET**: GitLab App Client secret. No defaults. +- **OAUTH_BITBUCKET_API_KEY**: BitBucket App Client ID. No defaults. +- **OAUTH_BITBUCKET_APP_SECRET**: BitBucket App Client secret. No defaults. - **REDMINE_URL**: Location of the redmine server, e.g. `-e 'REDMINE_URL=https://redmine.example.com'`. No defaults. - **JIRA_URL**: Location of the jira server, e.g. `-e 'JIRA_URL=https://jira.example.com'`. No defaults. - **USERMAP_UID**: Sets the uid for user `git` to the specified uid. Defaults to `1000`. diff --git a/assets/config/gitlabhq/gitlab.yml b/assets/config/gitlabhq/gitlab.yml index b10e01f2..023dc5bd 100644 --- a/assets/config/gitlabhq/gitlab.yml +++ b/assets/config/gitlabhq/gitlab.yml @@ -220,9 +220,9 @@ production: &base args: { scope: '{{OAUTH_GITHUB_SCOPE}}' } } - { name: 'gitlab', app_id: '{{OAUTH_GITLAB_API_KEY}}', app_secret: '{{OAUTH_GITLAB_APP_SECRET}}', - args: { scope: '{{OAUTH_GITLAB_SCOPE}}' } } - # - { name: 'bitbucket', app_id: 'YOUR_APP_ID', - # app_secret: 'YOUR_APP_SECRET'} + args: { scope: '{{OAUTH_GITLAB_SCOPE}}' } }, + - { name: 'bitbucket', app_id: '{{OAUTH_BITBUCKET_API_KEY}}', + app_secret: '{{OAUTH_BITBUCKET_APP_SECRET}}'} diff --git a/assets/init b/assets/init index 04f7231e..06ca7d01 100755 --- a/assets/init +++ b/assets/init @@ -114,6 +114,9 @@ OAUTH_GITHUB_APP_SECRET=${OAUTH_GITHUB_APP_SECRET:-} OAUTH_GITLAB_API_KEY=${OAUTH_GITLAB_API_KEY:-} OAUTH_GITLAB_APP_SECRET=${OAUTH_GITLAB_APP_SECRET:-} +OAUTH_BITBUCKET_API_KEY=${OAUTH_BITBUCKET_API_KEY:-} +OAUTH_BITBUCKET_APP_SECRET=${OAUTH_BITBUCKET_APP_SECRET:-} + GOOGLE_ANALYTICS_ID=${GOOGLE_ANALYTICS_ID:-} PIWIK_URL=${PIWIK_URL:-} @@ -579,6 +582,16 @@ else sudo -u git -H sed '/{{OAUTH_GITLAB_SCOPE}}/d' -i config/gitlab.yml fi +# bitbucket +if [ -n "${OAUTH_BITBUCKET_API_KEY}" -a -n "${OAUTH_BITBUCKET_APP_SECRET}" ]; then + OAUTH_ENABLED=true + sudo -u git -H sed 's/{{OAUTH_BITBUCKET_API_KEY}}/'"${OAUTH_BITBUCKET_API_KEY}"'/' -i config/gitlab.yml + sudo -u git -H sed 's/{{OAUTH_BITBUCKET_APP_SECRET}}/'"${OAUTH_BITBUCKET_APP_SECRET}"'/' -i config/gitlab.yml +else + sudo -u git -H sed '/{{OAUTH_BITBUCKET_API_KEY}}/d' -i config/gitlab.yml + sudo -u git -H sed '/{{OAUTH_BITBUCKET_APP_SECRET}}/d' -i config/gitlab.yml +fi + # google analytics if [ -n "${GOOGLE_ANALYTICS_ID}" ]; then sudo -u git -H sed 's/{{GOOGLE_ANALYTICS_ID}}/'"${GOOGLE_ANALYTICS_ID}"'/' -i config/gitlab.yml