Commit 0dc0d0b4f0c53007a243cdffaf21af1c6a6b0837

Authored by Jacob Vosmaer
2 parents dc8f51ad f6ca8991
Exists in 6-6-stable-ee

Merge branch 'master' of gitlab.com:gitlab-org/omnibus-gitlab into 6-6-stable-ee

1 # GitLab Omnibus project 1 # GitLab Omnibus project
2 2
3 -This project creates full-stack platform-specific packages for  
4 -GitLab. You can download omnibus-gitlab packages [here][downloads].  
5 -For other installation options, see the  
6 -[main project README][CE README]. 3 +This project creates full-stack platform-specific [downloadable packages for GitLab][downloads].
  4 +For other installation options please see the
  5 +[GitLab project README][CE README].
7 6
8 ## Installation 7 ## Installation
9 8
files/gitlab-cookbooks/gitlab/attributes/default.rb
@@ -86,6 +86,8 @@ default['gitlab']['gitlab-rails']['ldap_method'] = "ssl" @@ -86,6 +86,8 @@ default['gitlab']['gitlab-rails']['ldap_method'] = "ssl"
86 default['gitlab']['gitlab-rails']['ldap_bind_dn'] = "_the_full_dn_of_the_user_you_will_bind_with" 86 default['gitlab']['gitlab-rails']['ldap_bind_dn'] = "_the_full_dn_of_the_user_you_will_bind_with"
87 default['gitlab']['gitlab-rails']['ldap_password'] = "_the_password_of_the_bind_user" 87 default['gitlab']['gitlab-rails']['ldap_password'] = "_the_password_of_the_bind_user"
88 default['gitlab']['gitlab-rails']['ldap_allow_username_or_email_login'] = true 88 default['gitlab']['gitlab-rails']['ldap_allow_username_or_email_login'] = true
  89 +default['gitlab']['gitlab-rails']['ldap_user_filter'] = ""
  90 +default['gitlab']['gitlab-rails']['ldap_group_base'] = ""
89 default['gitlab']['gitlab-rails']['satellites_path'] = "/var/opt/gitlab/git-data/gitlab-satellites" 91 default['gitlab']['gitlab-rails']['satellites_path'] = "/var/opt/gitlab/git-data/gitlab-satellites"
90 default['gitlab']['gitlab-rails']['backup_path'] = "/var/opt/gitlab/backups" 92 default['gitlab']['gitlab-rails']['backup_path'] = "/var/opt/gitlab/backups"
91 default['gitlab']['gitlab-rails']['gitlab_shell_path'] = "/opt/gitlab/embedded/service/gitlab-shell/" 93 default['gitlab']['gitlab-rails']['gitlab_shell_path'] = "/opt/gitlab/embedded/service/gitlab-shell/"
files/gitlab-cookbooks/gitlab/templates/default/gitlab.yml.erb
@@ -142,6 +142,19 @@ production: &base @@ -142,6 +142,19 @@ production: &base
142 # disable this setting, because the userPrincipalName contains an '@'. 142 # disable this setting, because the userPrincipalName contains an '@'.
143 allow_username_or_email_login: <%= @ldap_allow_username_or_email_login %> 143 allow_username_or_email_login: <%= @ldap_allow_username_or_email_login %>
144 144
  145 + # Filter LDAP users
  146 + #
  147 + # Format: RFC 4515
  148 + # Ex. (employeeType=developer)
  149 + #
  150 + user_filter: '<%= @ldap_user_filter %>'
  151 +
  152 + # Base where we can search for groups
  153 + #
  154 + # Ex. ou=Groups,dc=gitlab,dc=example
  155 + #
  156 + group_base: '<%= @ldap_group_base %>'
  157 +
145 ## OmniAuth settings 158 ## OmniAuth settings
146 omniauth: 159 omniauth:
147 # Allow login via Twitter, Google, etc. using OmniAuth providers 160 # Allow login via Twitter, Google, etc. using OmniAuth providers
@@ -34,12 +34,22 @@ if [[ -z ${release_package} ]]; then @@ -34,12 +34,22 @@ if [[ -z ${release_package} ]]; then
34 error_exit 'could not find the release package' 34 error_exit 'could not find the release package'
35 fi 35 fi
36 36
  37 +if (git describe | grep -w ee); then
  38 + release_dir="$(openssl rand -hex 20)"
  39 + if [[ $? -ne 0 ]]; then
  40 + error_exit 'failed to generate release directory name'
  41 + fi
  42 + remote_package_path="s3://${RELEASE_BUCKET}/${release_dir}/${release_package#pkg/}"
  43 +else
  44 + remote_package_path="s3://${RELEASE_BUCKET}/${release_package#pkg/}"
  45 +fi
  46 +
37 echo 47 echo
38 echo 'Package MD5:' 48 echo 'Package MD5:'
39 md5sum ${release_package} 49 md5sum ${release_package}
40 50
41 echo 51 echo
42 echo 'Starting upload' 52 echo 'Starting upload'
43 -if !(aws s3 cp ${release_package} s3://${RELEASE_BUCKET} --acl public-read --region ${RELEASE_BUCKET_REGION}); then 53 +if !(aws s3 cp ${release_package} ${remote_package_path} --acl public-read --region ${RELEASE_BUCKET_REGION}); then
44 error_exit 'release upload failed' 54 error_exit 'release upload failed'
45 fi 55 fi