File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 112
112
)
113
113
end
114
114
115
+ # How to install git? RHEL 7 can use End Point.
116
+ default [ 'gitlab' ] [ 'git_recipe' ] = value_for_platform (
117
+ %w( redhat centos scientific oracle ) => { '< 7' => 'source' } ,
118
+ 'amazon' => { '>= 0' => 'source' } ,
119
+ 'fedora' => { '< 24' => 'source' } ,
120
+ 'debian' => { '< 9' => 'source' } ,
121
+ 'ubuntu' => { '< 16.04' => 'source' } ,
122
+ 'default' => 'package'
123
+ )
124
+
115
125
default [ 'gitlab' ] [ 'trust_local_sshkeys' ] = 'yes'
116
126
117
127
default [ 'gitlab' ] [ 'https' ] = false
Original file line number Diff line number Diff line change 25
25
include_recipe 'yum-epel'
26
26
end
27
27
28
+ # Install new enough git version
29
+ include_recipe 'gitlab::git'
30
+
28
31
# Setup the database connection
29
32
case node [ 'gitlab' ] [ 'database' ] [ 'type' ]
30
33
when 'mysql'
Original file line number Diff line number Diff line change
1
+ #
2
+ # Cookbook Name:: gitlab
3
+ # Recipe:: git
4
+ #
5
+ # Copyright 2016, Yakara Ltd
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ #
19
+
20
+ git_recipe = node [ 'gitlab' ] [ 'git_recipe' ]
21
+
22
+ yum_repository 'endpoint-git' do
23
+ description 'git from End Point repository'
24
+ includepkgs 'git git-core* perl-Git'
25
+ el = node [ 'platform_version' ] . to_i
26
+ baseurl "https://packages.endpoint.com/rhel/#{ el } /os/$basearch/"
27
+ gpgkey "https://packages.endpoint.com/endpoint-rpmsign-#{ el } .pub"
28
+ only_if { git_recipe == 'package' && platform_family? ( 'rhel' ) }
29
+ end
30
+
31
+ include_recipe "git::#{ git_recipe } "
You can’t perform that action at this time.
0 commit comments