summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 11:18:50 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 11:18:50 +0000
commit8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch)
treea77e7fe7a93de11213032ed4ab1f33a3db51b738 /bin
parent00b35af3db1abfe813a778f643dad221aad51fca (diff)
downloadgitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'bin')
-rwxr-xr-xbin/background_jobs_sk2
-rwxr-xr-xbin/background_jobs_sk_cluster2
-rwxr-xr-xbin/secpick26
-rwxr-xr-xbin/web21
4 files changed, 18 insertions, 33 deletions
diff --git a/bin/background_jobs_sk b/bin/background_jobs_sk
index fb7de0a6180..0aab69126b2 100755
--- a/bin/background_jobs_sk
+++ b/bin/background_jobs_sk
@@ -36,7 +36,7 @@ start_silent()
start_sidekiq()
{
cmd="exec"
- chpst=$(which chpst)
+ chpst=$(command -v chpst)
if [ -n "$chpst" ]; then
cmd="${cmd} ${chpst} -P"
diff --git a/bin/background_jobs_sk_cluster b/bin/background_jobs_sk_cluster
index b1d5fce204e..6188ec51420 100755
--- a/bin/background_jobs_sk_cluster
+++ b/bin/background_jobs_sk_cluster
@@ -43,7 +43,7 @@ restart()
start_sidekiq()
{
cmd="exec"
- chpst=$(which chpst)
+ chpst=$(command -v chpst)
if [ -n "$chpst" ]; then
cmd="${cmd} ${chpst} -P"
diff --git a/bin/secpick b/bin/secpick
index a68dabc8c47..517465d3f5d 100755
--- a/bin/secpick
+++ b/bin/secpick
@@ -21,28 +21,18 @@ module Secpick
@options = self.class.options
end
- def ee?
- File.exist?(File.expand_path('../ee/app/models/license.rb', __dir__))
- end
-
def dry_run?
@options[:try] == true
end
- def original_branch
- @options[:branch].strip
- end
-
def source_branch
- branch = "#{original_branch}-#{@options[:version]}"
+ branch = "#{@options[:branch]}-#{@options[:version]}"
branch.prepend("#{BRANCH_PREFIX}-") unless branch.start_with?("#{BRANCH_PREFIX}-")
branch.freeze
end
def stable_branch
- "#{@options[:version]}-#{STABLE_SUFFIX}".tap do |name|
- name << "-ee" if ee?
- end.freeze
+ "#{@options[:version]}-#{STABLE_SUFFIX}-ee".freeze
end
def git_commands
@@ -50,7 +40,7 @@ module Secpick
"git checkout -B #{source_branch} #{@options[:remote]}/#{stable_branch} --no-track",
"git cherry-pick #{@options[:sha]}",
"git push #{@options[:remote]} #{source_branch}",
- "git checkout #{original_branch}"]
+ "git checkout #{@options[:branch]}"]
end
def gitlab_params
@@ -64,11 +54,7 @@ module Secpick
end
def new_mr_url
- if ee?
- SECURITY_MR_URL
- else
- SECURITY_MR_URL.sub('/gitlab/', '/gitlab-foss/')
- end
+ SECURITY_MR_URL
end
def create!
@@ -131,8 +117,8 @@ module Secpick
parser.parse!
- options[:sha] ||= `git rev-parse HEAD`
- options[:branch] ||= `git rev-parse --abbrev-ref HEAD`
+ options[:sha] ||= `git rev-parse HEAD`.strip
+ options[:branch] ||= `git rev-parse --abbrev-ref HEAD`.strip
options[:remote] ||= DEFAULT_REMOTE
nil_options = options.select {|_, v| v.nil? }
diff --git a/bin/web b/bin/web
index f640abf0fbc..b714ad1e1bb 100755
--- a/bin/web
+++ b/bin/web
@@ -3,19 +3,18 @@
set -e
cd $(dirname $0)/..
-app_root=$(pwd)
case "$USE_WEB_SERVER" in
- puma|"") # and the "" defines default
- exec bin/web_puma "$@"
- ;;
+ puma|"") # and the "" defines default
+ exec bin/web_puma "$@"
+ ;;
- unicorn)
- exec bin/web_unicorn "$@"
- ;;
+ unicorn)
+ exec bin/web_unicorn "$@"
+ ;;
- *)
- echo "Unkown web server used by USE_WEB_SERVER: $USE_WEB_SERVER."
- exit 1
- ;;
+ *)
+ echo "Unkown web server used by USE_WEB_SERVER: $USE_WEB_SERVER."
+ exit 1
+ ;;
esac