Skip to content
Snippets Groups Projects
Commit 90de7004 authored by Balasankar C's avatar Balasankar C
Browse files

Run rubocop over software definitions

parent 27eed579
No related branches found
No related tags found
No related merge requests found
Showing
with 251 additions and 248 deletions
Metrics/LineLength:
Enabled: false
FileName:
Enabled: false
Loading
Loading
@@ -22,30 +22,30 @@ require "#{Omnibus::Config.project_root}/lib/gitlab/version"
ee = system("#{Omnibus::Config.project_root}/support/is_gitlab_ee.sh")
 
if ee
name "gitlab-ee"
description "GitLab Enterprise Edition and GitLab CI "\
"(including NGINX, Postgres, Redis)"
replace "gitlab-ce"
conflict "gitlab-ce"
name 'gitlab-ee'
description 'GitLab Enterprise Edition and GitLab CI '\
'(including NGINX, Postgres, Redis)'
replace 'gitlab-ce'
conflict 'gitlab-ce'
else
name "gitlab-ce"
description "GitLab Community Edition and GitLab CI "\
"(including NGINX, Postgres, Redis)"
replace "gitlab-ee"
conflict "gitlab-ee"
name 'gitlab-ce'
description 'GitLab Community Edition and GitLab CI '\
'(including NGINX, Postgres, Redis)'
replace 'gitlab-ee'
conflict 'gitlab-ee'
end
 
maintainer "GitLab Inc. <support@gitlab.com>"
homepage "https://about.gitlab.com/"
maintainer 'GitLab Inc. <support@gitlab.com>'
homepage 'https://about.gitlab.com/'
 
license "MIT"
license 'MIT'
license_compiled_output true
 
# Replace older omnibus-gitlab packages
replace "gitlab"
conflict "gitlab"
replace 'gitlab'
conflict 'gitlab'
 
install_dir "/opt/gitlab"
install_dir '/opt/gitlab'
 
# This is a hack to make a distinction between nightly versions
# See https://gitlab.com/gitlab-org/omnibus-gitlab/issues/1500
Loading
Loading
@@ -64,45 +64,45 @@ build_iteration Gitlab::BuildIteration.new.build_iteration
# Openssh needs to be installed
 
if suse?
runtime_dependency "openssh"
runtime_dependency 'openssh'
else
runtime_dependency "openssh-server"
runtime_dependency 'openssh-server'
end
 
# creates required build directories
dependency "preparation"
dependency "package-scripts"
dependency "git"
dependency "jemalloc"
dependency "redis"
dependency "nginx"
dependency "mixlib-log"
dependency "chef-zero"
dependency "ohai"
dependency "chef-gem"
dependency "remote-syslog" if ee
dependency "logrotate"
dependency "runit"
dependency "gitlab-rails"
dependency "gitlab-shell"
dependency "gitlab-workhorse"
dependency "gitlab-ctl"
dependency "gitlab-psql"
dependency "gitlab-healthcheck"
dependency "gitlab-cookbooks"
dependency "gitlab-selinux"
dependency "gitlab-scripts"
dependency "gitlab-config-template"
dependency "mattermost"
dependency "node-exporter"
dependency "prometheus"
dependency "redis-exporter"
dependency "postgres-exporter"
dependency "gitlab-monitor"
dependency 'preparation'
dependency 'package-scripts'
dependency 'git'
dependency 'jemalloc'
dependency 'redis'
dependency 'nginx'
dependency 'mixlib-log'
dependency 'chef-zero'
dependency 'ohai'
dependency 'chef-gem'
dependency 'remote-syslog' if ee
dependency 'logrotate'
dependency 'runit'
dependency 'gitlab-rails'
dependency 'gitlab-shell'
dependency 'gitlab-workhorse'
dependency 'gitlab-ctl'
dependency 'gitlab-psql'
dependency 'gitlab-healthcheck'
dependency 'gitlab-cookbooks'
dependency 'gitlab-selinux'
dependency 'gitlab-scripts'
dependency 'gitlab-config-template'
dependency 'mattermost'
dependency 'node-exporter'
dependency 'prometheus'
dependency 'redis-exporter'
dependency 'postgres-exporter'
dependency 'gitlab-monitor'
 
# version manifest file
dependency "version-manifest"
dependency 'version-manifest'
 
exclude "\.git*"
exclude "bundler\/git"
Loading
Loading
Loading
Loading
@@ -14,22 +14,22 @@
# limitations under the License.
#
 
name "bundler"
name 'bundler'
# Pin the bundler version to avoid breaking changes in later versions
default_version "1.13.7"
default_version '1.13.7'
 
license "MIT"
license_file "https://raw.githubusercontent.com/bundler/bundler/master/LICENSE.md"
license 'MIT'
license_file 'https://raw.githubusercontent.com/bundler/bundler/master/LICENSE.md'
 
dependency "rubygems"
dependency 'rubygems'
 
build do
env = with_standard_compiler_flags(with_embedded_path)
 
v_opts = "--version '#{version}'" unless version.nil?
gem [
"install bundler",
'install bundler',
v_opts,
"--no-ri --no-rdoc",
].compact.join(" "), env: env
'--no-ri --no-rdoc'
].compact.join(' '), env: env
end
Loading
Loading
@@ -17,17 +17,17 @@
# This library object is required for building Python with the bz2 module,
# and should be picked up automatically when building Python.
 
name "bzip2"
default_version "1.0.6"
name 'bzip2'
default_version '1.0.6'
 
license "BSD-2-Clause"
license_file "LICENSE"
license 'BSD-2-Clause'
license_file 'LICENSE'
 
dependency "zlib"
dependency "openssl"
dependency 'zlib'
dependency 'openssl'
 
version "1.0.6" do
source md5: "00b516f4704d4a7cb50a1d97e6e8e15b"
version '1.0.6' do
source md5: '00b516f4704d4a7cb50a1d97e6e8e15b'
end
source url: "http://www.bzip.org/#{version}/#{name}-#{version}.tar.gz"
 
Loading
Loading
@@ -37,15 +37,15 @@ build do
env = with_standard_compiler_flags(with_embedded_path)
 
# Avoid warning where .rodata cannot be used when making a shared object
env["CFLAGS"] << " -fPIC"
env['CFLAGS'] << ' -fPIC'
 
# The list of arguments to pass to make
args = "PREFIX='#{install_dir}/embedded' VERSION='#{version}'"
 
patch source: "makefile_take_env_vars.patch", env: env
patch source: "soname_install_dir.patch", env: env if mac_os_x?
patch source: 'makefile_take_env_vars.patch', env: env
patch source: 'soname_install_dir.patch', env: env if mac_os_x?
 
make "#{args}", env: env
make args.to_s, env: env
make "#{args} -f Makefile-libbz2_so", env: env
make "#{args} install", env: env
end
Loading
Loading
@@ -14,33 +14,33 @@
# limitations under the License.
#
 
name "cacerts"
name 'cacerts'
 
license "MPL-2.0"
license_file "https://www.mozilla.org/media/MPL/2.0/index.815ca599c9df.txt"
license 'MPL-2.0'
license_file 'https://www.mozilla.org/media/MPL/2.0/index.815ca599c9df.txt'
 
# Date of the file is in a comment at the start, or in the changelog
default_version "2017.01.18"
default_version '2017.01.18'
 
version "2017.01.18" do
source md5: "38cd779c9429ab6e2e5ae3437b763238"
version '2017.01.18' do
source md5: '38cd779c9429ab6e2e5ae3437b763238'
end
 
# Source URL looks like https://curl.haxx.se/ca/cacert-2017-01-18.pem. The
# version part has periods replaced with dashes.
source url: "https://curl.haxx.se/ca/cacert-#{version.gsub('.', '-')}.pem"
source url: "https://curl.haxx.se/ca/cacert-#{version.tr('.', '-')}.pem"
 
build do
mkdir "#{install_dir}/embedded/ssl/certs"
 
# Append the 1024bit Verisign certs so that S3 continues to work
block do
unless File.foreach("#{project_dir}/cacert-#{version.gsub('.', '-')}.pem").grep(/^Verisign Class 3 Public Primary Certification Authority$/).any?
File.open("#{project_dir}/cacert-#{version.gsub('.', '-')}.pem", "a") { |fd| fd.write(VERISIGN_CERTS) }
unless File.foreach("#{project_dir}/cacert-#{version.tr('.', '-')}.pem").grep(/^Verisign Class 3 Public Primary Certification Authority$/).any?
File.open("#{project_dir}/cacert-#{version.tr('.', '-')}.pem", 'a') { |fd| fd.write(VERISIGN_CERTS) }
end
end
 
copy "#{project_dir}/cacert-#{version.gsub('.', '-')}.pem", "#{install_dir}/embedded/ssl/certs/cacert.pem"
copy "#{project_dir}/cacert-#{version.tr('.', '-')}.pem", "#{install_dir}/embedded/ssl/certs/cacert.pem"
 
# Windows does not support symlinks
unless windows?
Loading
Loading
@@ -50,7 +50,7 @@ build do
end
end
 
VERISIGN_CERTS = <<-EOH
VERISIGN_CERTS = <<-EOH.freeze
 
Verisign Class 3 Public Primary Certification Authority
=======================================================
Loading
Loading
Loading
Loading
@@ -14,22 +14,22 @@
# limitations under the License.
#
 
name "chef-gem"
default_version "12.12.15"
name 'chef-gem'
default_version '12.12.15'
 
license "Apache-2.0"
license_file "https://github.com/chef/chef/blob/master/LICENSE"
license 'Apache-2.0'
license_file 'https://github.com/chef/chef/blob/master/LICENSE'
 
dependency "ruby"
dependency "rubygems"
dependency "libffi"
dependency "rb-readline"
dependency 'ruby'
dependency 'rubygems'
dependency 'libffi'
dependency 'rb-readline'
 
build do
env = with_standard_compiler_flags(with_embedded_path)
 
gem "install chef" \
gem 'install chef' \
" --version '#{version}'" \
" --bindir '#{install_dir}/embedded/bin'" \
" --no-ri --no-rdoc", env: env
' --no-ri --no-rdoc', env: env
end
Loading
Loading
@@ -19,20 +19,20 @@
# Introduced by https://github.com/chef/chef-zero/pull/199
# When changing this version, make sure that the verbosity went down.
 
name "chef-zero"
default_version "4.8.0"
name 'chef-zero'
default_version '4.8.0'
 
license "Apache-2.0"
license 'Apache-2.0'
license_file "https://raw.githubusercontent.com/chef/chef-zero/v#{version}/LICENSE"
 
dependency "ruby"
dependency "rubygems"
dependency 'ruby'
dependency 'rubygems'
 
build do
env = with_standard_compiler_flags(with_embedded_path)
 
gem "install chef-zero" \
gem 'install chef-zero' \
" --version '#{version}'" \
" --bindir '#{install_dir}/embedded/bin'" \
" --no-ri --no-rdoc", env: env
' --no-ri --no-rdoc', env: env
end
Loading
Loading
@@ -16,17 +16,17 @@
 
require "#{Omnibus::Config.project_root}/lib/gitlab/version"
 
name "config_guess"
version = Gitlab::Version.new('config_guess', "master")
default_version "master"
name 'config_guess'
version = Gitlab::Version.new('config_guess', 'master')
default_version 'master'
 
# occasionally http protocol downloads get 500s, so we use git://
source git: version.remote
 
# http://savannah.gnu.org/projects/config
license "GPL-3.0 (with exception)"
license_file "config.guess"
license_file "config.sub"
license 'GPL-3.0 (with exception)'
license_file 'config.guess'
license_file 'config.sub'
 
relative_path "config_guess-#{version.print}"
 
Loading
Loading
Loading
Loading
@@ -14,18 +14,18 @@
# limitations under the License.
#
 
name "curl"
default_version "7.52.0"
name 'curl'
default_version '7.52.0'
 
# Runtime dependency
dependency "zlib"
dependency "openssl"
dependency 'zlib'
dependency 'openssl'
 
license "MIT"
license_file "COPYING"
license 'MIT'
license_file 'COPYING'
 
version "7.52.0" do
source sha256: "7ee327ca55e95ea16b27929449ba290c3881cbb24901c57dd571849741c8f2d0"
version '7.52.0' do
source sha256: '7ee327ca55e95ea16b27929449ba290c3881cbb24901c57dd571849741c8f2d0'
end
 
source url: "http://curl.haxx.se/download/curl-#{version}.tar.gz"
Loading
Loading
@@ -37,7 +37,7 @@ build do
 
if freebsd?
# from freebsd ports - IPv6 Hostcheck patch
patch source: "curl-freebsd-hostcheck.patch", plevel: 1
patch source: 'curl-freebsd-hostcheck.patch', plevel: 1
end
 
delete "#{project_dir}/src/tool_hugehelp.c"
Loading
Loading
@@ -45,31 +45,31 @@ build do
if aix?
# otherwise gawk will die during ./configure with variations on the theme of:
# "/opt/omnibus-toolchain/embedded/lib/libiconv.a(shr4.o) could not be loaded"
env["LIBPATH"] = "/usr/lib:/lib"
env['LIBPATH'] = '/usr/lib:/lib'
end
 
configure_command = [
"./configure",
'./configure',
"--prefix=#{install_dir}/embedded",
"--disable-manual",
"--disable-debug",
"--enable-optimize",
"--disable-ldap",
"--disable-ldaps",
"--disable-rtsp",
"--enable-proxy",
"--disable-dependency-tracking",
"--enable-ipv6",
"--without-libidn",
"--without-gnutls",
"--without-librtmp",
"--without-libssh2",
'--disable-manual',
'--disable-debug',
'--enable-optimize',
'--disable-ldap',
'--disable-ldaps',
'--disable-rtsp',
'--enable-proxy',
'--disable-dependency-tracking',
'--enable-ipv6',
'--without-libidn',
'--without-gnutls',
'--without-librtmp',
'--without-libssh2',
"--with-ssl=#{install_dir}/embedded",
"--with-zlib=#{install_dir}/embedded",
"--with-zlib=#{install_dir}/embedded"
]
 
command configure_command.join(" "), env: env
command configure_command.join(' '), env: env
 
make "-j #{workers}", env: env
make "install", env: env
make 'install', env: env
end
Loading
Loading
@@ -14,27 +14,27 @@
# limitations under the License.
#
 
name "expat"
default_version "2.2.0"
name 'expat'
default_version '2.2.0'
 
relative_path "expat-#{version}"
dependency "config_guess"
dependency 'config_guess'
 
license "MIT"
license_file "COPYING"
license 'MIT'
license_file 'COPYING'
skip_transitive_dependency_licensing true
 
source url: "http://downloads.sourceforge.net/project/expat/expat/#{version}/expat-#{version}.tar.bz2",
md5: "2f47841c829facb346eb6e3fab5212e2"
md5: '2f47841c829facb346eb6e3fab5212e2'
 
build do
env = with_standard_compiler_flags(with_embedded_path)
 
update_config_guess(target: "conftools")
update_config_guess(target: 'conftools')
 
command "./configure" \
command './configure' \
" --prefix=#{install_dir}/embedded", env: env
 
make "-j #{workers}", env: env
make "install", env: env
make 'install', env: env
end
Loading
Loading
@@ -16,34 +16,34 @@
##
#
 
name "git"
default_version "2.10.2"
name 'git'
default_version '2.10.2'
 
license "GPL-2.0"
license_file "COPYING"
license 'GPL-2.0'
license_file 'COPYING'
 
# Runtime dependency
dependency "zlib"
dependency "openssl"
dependency "curl"
dependency 'zlib'
dependency 'openssl'
dependency 'curl'
 
source url: "https://www.kernel.org/pub/software/scm/git/git-#{version}.tar.gz",
sha256: "3d7ef275d80b97aaa61f3b6be9d3dc516202e6f6f5d885f2c09b59eba592dcc4"
sha256: '3d7ef275d80b97aaa61f3b6be9d3dc516202e6f6f5d885f2c09b59eba592dcc4'
 
relative_path "git-#{version}"
 
build do
env = with_standard_compiler_flags(with_embedded_path)
 
command ["./configure",
command ['./configure',
"--prefix=#{install_dir}/embedded",
"--with-curl=#{install_dir}/embedded",
"--with-ssl=#{install_dir}/embedded",
"--with-zlib=#{install_dir}/embedded"].join(" "), :env => env
"--with-zlib=#{install_dir}/embedded"].join(' '), env: env
 
# Ugly hack because ./configure does not pick these up from the env
block do
open(File.join(project_dir, "config.mak.autogen"), "a") do |file|
open(File.join(project_dir, 'config.mak.autogen'), 'a') do |file|
file.print <<-EOH
# Added by Omnibus git software definition git.rb
NO_PERL=YesPlease
Loading
Loading
@@ -59,6 +59,6 @@ NO_INSTALL_HARDLINKS=YesPlease
# Patch for git vulnerabilities
patch source: 'git-dec-2016-security.patch'
 
command "make -j #{workers}", :env => env
command "make install"
command "make -j #{workers}", env: env
command 'make install'
end
Loading
Loading
@@ -15,14 +15,14 @@
# limitations under the License.
#
 
name "gitlab-config-template"
name 'gitlab-config-template'
 
license "Apache-2.0"
license_file File.expand_path("LICENSE", Omnibus::Config.project_root)
license 'Apache-2.0'
license_file File.expand_path('LICENSE', Omnibus::Config.project_root)
 
source :path => File.expand_path("files/gitlab-config-template", Omnibus::Config.project_root)
source path: File.expand_path('files/gitlab-config-template', Omnibus::Config.project_root)
 
build do
command "mkdir -p #{install_dir}/etc"
sync "./", "#{install_dir}/etc/"
sync './', "#{install_dir}/etc/"
end
Loading
Loading
@@ -16,20 +16,20 @@
# limitations under the License.
#
 
name "gitlab-cookbooks"
name 'gitlab-cookbooks'
 
license "Apache-2.0"
license_file File.expand_path("LICENSE", Omnibus::Config.project_root)
license 'Apache-2.0'
license_file File.expand_path('LICENSE', Omnibus::Config.project_root)
 
EE = system("#{Omnibus::Config.project_root}/support/is_gitlab_ee.sh")
 
source path: File.expand_path("files/gitlab-cookbooks", Omnibus::Config.project_root)
source path: File.expand_path('files/gitlab-cookbooks', Omnibus::Config.project_root)
 
build do
cookbook_name = 'gitlab'
 
command "mkdir -p #{install_dir}/embedded/cookbooks"
sync "./", "#{install_dir}/embedded/cookbooks/"
sync './', "#{install_dir}/embedded/cookbooks/"
 
# If EE package, use a different master cookbook
if EE
Loading
Loading
@@ -40,13 +40,13 @@ build do
 
# Create a package cookbook.
command "mkdir -p #{install_dir}/embedded/cookbooks/package/attributes"
erb :dest => "#{install_dir}/embedded/cookbooks/package/attributes/default.rb",
:source => "cookbook_packages_default.erb",
:mode => 0755,
:vars => { :install_dir => project.install_dir }
erb :dest => "#{install_dir}/embedded/cookbooks/dna.json",
:source => "dna.json.erb",
:mode => 0644,
:vars => { :master_cookbook => cookbook_name }
erb dest: "#{install_dir}/embedded/cookbooks/package/attributes/default.rb",
source: 'cookbook_packages_default.erb',
mode: 0755,
vars: { install_dir: project.install_dir }
erb dest: "#{install_dir}/embedded/cookbooks/dna.json",
source: 'dna.json.erb',
mode: 0644,
vars: { master_cookbook: cookbook_name }
end
Loading
Loading
@@ -16,18 +16,18 @@
# limitations under the License.
#
 
name "gitlab-ctl"
name 'gitlab-ctl'
 
license "Apache-2.0"
license_file File.expand_path("LICENSE", Omnibus::Config.project_root)
license 'Apache-2.0'
license_file File.expand_path('LICENSE', Omnibus::Config.project_root)
 
dependency "omnibus-ctl"
dependency 'omnibus-ctl'
 
source :path => File.expand_path("files/gitlab-ctl-commands", Omnibus::Config.project_root)
source path: File.expand_path('files/gitlab-ctl-commands', Omnibus::Config.project_root)
 
build do
block do
open("#{install_dir}/bin/gitlab-ctl", "w") do |file|
open("#{install_dir}/bin/gitlab-ctl", 'w') do |file|
file.print <<-EOH
#!/bin/bash
#
Loading
Loading
@@ -71,5 +71,5 @@ export SVWAIT=30
command "chmod 755 #{install_dir}/bin/gitlab-ctl"
 
# additional omnibus-ctl commands
sync "./", "#{install_dir}/embedded/service/omnibus-ctl/"
sync './', "#{install_dir}/embedded/service/omnibus-ctl/"
end
Loading
Loading
@@ -15,17 +15,17 @@
# limitations under the License.
#
 
name "gitlab-healthcheck"
name 'gitlab-healthcheck'
 
license "Apache-2.0"
license_file File.expand_path("LICENSE", Omnibus::Config.project_root)
license 'Apache-2.0'
license_file File.expand_path('LICENSE', Omnibus::Config.project_root)
# This 'software' is self-contained in this file. Use the file contents
# to generate a version string.
default_version Digest::MD5.file(__FILE__).hexdigest
 
build do
block do
open("#{install_dir}/bin/gitlab-healthcheck", "w") do |file|
open("#{install_dir}/bin/gitlab-healthcheck", 'w') do |file|
file.print <<-EOH
#!/bin/sh
 
Loading
Loading
Loading
Loading
@@ -19,7 +19,7 @@
# Introduced by https://github.com/chef/gitlab-monitor/pull/199
# When changing this version, make sure that the verbosity went down.
 
version = Gitlab::Version.new("gitlab-monitor", "0.0.16")
version = Gitlab::Version.new('gitlab-monitor', '0.0.16')
 
default_version version.print
 
Loading
Loading
@@ -35,7 +35,7 @@ build do
env = with_standard_compiler_flags(with_embedded_path)
 
gem 'build gitlab-monitor.gemspec', env: env
gem "install gitlab-monitor" \
gem 'install gitlab-monitor' \
" --bindir '#{install_dir}/embedded/bin'" \
" --no-ri --no-rdoc", env: env
' --no-ri --no-rdoc', env: env
end
Loading
Loading
@@ -15,20 +15,20 @@
# limitations under the License.
#
require "#{Omnibus::Config.project_root}/lib/gitlab/version"
version = Gitlab::Version.new("gitlab-pages")
version = Gitlab::Version.new('gitlab-pages')
 
name "gitlab-pages"
name 'gitlab-pages'
default_version version.print
 
license "MIT"
license 'MIT'
 
source :git => version.remote
source git: version.remote
 
build do
# We use the `base_dir`, because the sources are put in `src/gitlab-pages`
# This is required for GO15VENDOREXPERIMENT=1 to work properly,
# since it requires the package to be in $GOPATH/src/package
env = { 'GOPATH' => "#{Omnibus::Config.base_dir}"}
make "gitlab-pages", env: env
move "gitlab-pages", "#{install_dir}/embedded/bin/gitlab-pages"
env = { 'GOPATH' => Omnibus::Config.base_dir }
make 'gitlab-pages', env: env
move 'gitlab-pages', "#{install_dir}/embedded/bin/gitlab-pages"
end
Loading
Loading
@@ -17,17 +17,17 @@
 
require 'digest'
 
name "gitlab-psql"
name 'gitlab-psql'
 
license "Apache-2.0"
license_file File.expand_path("LICENSE", Omnibus::Config.project_root)
license 'Apache-2.0'
license_file File.expand_path('LICENSE', Omnibus::Config.project_root)
# This 'software' is self-contained in this file. Use the file contents
# to generate a version string.
default_version Digest::MD5.file(__FILE__).hexdigest
 
build do
block do
open("#{install_dir}/bin/gitlab-psql", "w") do |file|
open("#{install_dir}/bin/gitlab-psql", 'w') do |file|
file.print <<-EOH
#!/bin/sh
 
Loading
Loading
Loading
Loading
@@ -19,10 +19,10 @@ require "#{Omnibus::Config.project_root}/lib/gitlab/version"
 
EE = system("#{Omnibus::Config.project_root}/support/is_gitlab_ee.sh")
 
software_name = EE ? "gitlab-rails-ee":"gitlab-rails"
software_name = EE ? 'gitlab-rails-ee' : 'gitlab-rails'
version = Gitlab::Version.new(software_name)
 
name "gitlab-rails"
name 'gitlab-rails'
 
default_version version.print
source git: version.remote
Loading
Loading
@@ -30,30 +30,29 @@ source git: version.remote
combined_licenses_file = "#{install_dir}/embedded/lib/ruby/gems/gitlab-gem-licenses"
gemdir_cmd = "#{install_dir}/embedded/bin/gem environment gemdir"
 
license "MIT"
license_file "LICENSE"
license 'MIT'
license_file 'LICENSE'
license_file combined_licenses_file
 
dependency "ruby"
dependency "bundler"
dependency "libxml2"
dependency "libxslt"
dependency "curl"
dependency "rsync"
dependency "libicu"
dependency "postgresql"
dependency "postgresql_new"
dependency "python-docutils"
dependency "krb5"
dependency "registry"
dependency "gitlab-pages"
dependency 'ruby'
dependency 'bundler'
dependency 'libxml2'
dependency 'libxslt'
dependency 'curl'
dependency 'rsync'
dependency 'libicu'
dependency 'postgresql'
dependency 'postgresql_new'
dependency 'python-docutils'
dependency 'krb5'
dependency 'registry'
dependency 'gitlab-pages'
 
if EE
dependency "mysql-client"
dependency "unzip"
dependency 'mysql-client'
dependency 'unzip'
end
 
build do
env = with_standard_compiler_flags(with_embedded_path)
 
Loading
Loading
@@ -65,19 +64,19 @@ build do
command "sed -i \"s/.*REVISION.*/REVISION = '$(git log --pretty=format:'%h' -n 1)'/\" config/initializers/2_app.rb"
command "echo $(git log --pretty=format:'%h' -n 1) > REVISION"
 
bundle_without = %w{development test}
bundle_without << "mysql" unless EE
bundle "config build.rugged --no-use-system-libraries", env: env
bundle "install --without #{bundle_without.join(" ")} --jobs #{workers} --retry 5", env: env
bundle_without = %w(development test)
bundle_without << 'mysql' unless EE
bundle 'config build.rugged --no-use-system-libraries', env: env
bundle "install --without #{bundle_without.join(' ')} --jobs #{workers} --retry 5", env: env
 
# This patch makes the github-markup gem use and be compatible with Python3
# We've sent part of the changes upstream: https://github.com/github/markup/pull/919
patch_file_path = File.join(
Omnibus::Config.project_root,
"config",
"patches",
"gitlab-rails",
"gitlab-markup_gem-markups.patch"
'config',
'patches',
'gitlab-rails',
'gitlab-markup_gem-markups.patch'
)
# Not using the patch DSL as we need the path to the gems directory
command "cat #{patch_file_path} | patch -p1 \"$(#{gemdir_cmd})/gems/gitlab-markup-1.5.1/lib/github/markups.rb\""
Loading
Loading
@@ -89,14 +88,14 @@ build do
copy 'config/secrets.yml.example', 'config/secrets.yml'
 
assets_compile_env = {
"NODE_ENV" => "production",
"RAILS_ENV" => "production",
"PATH" => "#{install_dir}/embedded/bin:#{ENV['PATH']}",
"USE_DB" => "false",
"SKIP_STORAGE_VALIDATION" => "true"
'NODE_ENV' => 'production',
'RAILS_ENV' => 'production',
'PATH' => "#{install_dir}/embedded/bin:#{ENV['PATH']}",
'USE_DB' => 'false',
'SKIP_STORAGE_VALIDATION' => 'true'
}
command "npm install --production"
bundle "exec rake gitlab:assets:compile", :env => assets_compile_env
command 'npm install --production'
bundle 'exec rake gitlab:assets:compile', env: assets_compile_env
 
# Tear down now that gitlab:assets:compile is done.
delete 'node_modules'
Loading
Loading
@@ -126,25 +125,25 @@ build do
copy 'db/schema.rb', 'db/schema.rb.bundled'
 
command "mkdir -p #{install_dir}/embedded/service/gitlab-rails"
sync "./", "#{install_dir}/embedded/service/gitlab-rails/", { exclude: [".git", ".gitignore", "spec", "features"] }
sync './', "#{install_dir}/embedded/service/gitlab-rails/", exclude: ['.git', '.gitignore', 'spec', 'features']
 
# Create a wrapper for the rake tasks of the Rails app
erb :dest => "#{install_dir}/bin/gitlab-rake",
:source => "bundle_exec_wrapper.erb",
:mode => 0755,
:vars => {:command => 'rake "$@"', :install_dir => install_dir}
erb dest: "#{install_dir}/bin/gitlab-rake",
source: 'bundle_exec_wrapper.erb',
mode: 0755,
vars: { command: 'rake "$@"', install_dir: install_dir }
 
# Create a wrapper for the rails command, useful for e.g. `rails console`
erb :dest => "#{install_dir}/bin/gitlab-rails",
:source => "bundle_exec_wrapper.erb",
:mode => 0755,
:vars => {:command => 'rails "$@"', :install_dir => install_dir}
erb dest: "#{install_dir}/bin/gitlab-rails",
source: 'bundle_exec_wrapper.erb',
mode: 0755,
vars: { command: 'rails "$@"', install_dir: install_dir }
 
# Generate the combined license file for all gems GitLab is using
erb dest: "#{install_dir}/embedded/bin/gitlab-gem-license-generator",
source: "gem_license_generator.erb",
mode: 0755,
vars: {install_dir: install_dir, license_file: combined_licenses_file}
source: 'gem_license_generator.erb',
mode: 0755,
vars: { install_dir: install_dir, license_file: combined_licenses_file }
 
command "#{install_dir}/embedded/bin/ruby #{install_dir}/embedded/bin/gitlab-gem-license-generator"
delete "#{install_dir}/embedded/bin/gitlab-gem-license-generator"
Loading
Loading
Loading
Loading
@@ -15,12 +15,12 @@
# limitations under the License.
#
 
name "gitlab-scripts"
name 'gitlab-scripts'
 
license "Apache-2.0"
license_file File.expand_path("LICENSE", Omnibus::Config.project_root)
source :path => File.expand_path("files/gitlab-scripts", Omnibus::Config.project_root)
license 'Apache-2.0'
license_file File.expand_path('LICENSE', Omnibus::Config.project_root)
source path: File.expand_path('files/gitlab-scripts', Omnibus::Config.project_root)
 
build do
copy "*", "#{install_dir}/embedded/bin/"
copy '*', "#{install_dir}/embedded/bin/"
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment