Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6dc0b033
Commit
6dc0b033
authored
Nov 09, 2021
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'ashmckenzie/new-shellcheck-job' into 'master'"
This reverts merge request !73512
parent
89d0caa1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
67 deletions
+22
-67
.gitlab/ci/rules.gitlab-ci.yml
.gitlab/ci/rules.gitlab-ci.yml
+0
-11
.gitlab/ci/static-analysis.gitlab-ci.yml
.gitlab/ci/static-analysis.gitlab-ci.yml
+0
-12
bin/background_jobs
bin/background_jobs
+9
-9
bin/mail_room
bin/mail_room
+5
-4
bin/parallel-rsync-repos
bin/parallel-rsync-repos
+3
-3
bin/web
bin/web
+5
-5
bin/with_env
bin/with_env
+0
-1
tooling/bin/shellcheck
tooling/bin/shellcheck
+0
-22
No files found.
.gitlab/ci/rules.gitlab-ci.yml
View file @
6dc0b033
...
@@ -373,10 +373,6 @@
...
@@ -373,10 +373,6 @@
-
"
.dockerignore"
-
"
.dockerignore"
-
"
qa/**/*"
-
"
qa/**/*"
.code-shell-patterns
:
&code-shell-patterns
-
"
bin/**/*"
-
"
tooling/**/*"
# .code-backstage-qa-patterns + .workhorse-patterns
# .code-backstage-qa-patterns + .workhorse-patterns
.setup-test-env-patterns
:
&setup-test-env-patterns
.setup-test-env-patterns
:
&setup-test-env-patterns
-
"
{package.json,yarn.lock}"
-
"
{package.json,yarn.lock}"
...
@@ -1779,13 +1775,6 @@
...
@@ -1779,13 +1775,6 @@
-
changes
:
*code-backstage-qa-patterns
-
changes
:
*code-backstage-qa-patterns
-
changes
:
*startup-css-patterns
-
changes
:
*startup-css-patterns
###############
# Shell rules #
###############
.shell:rules:
rules
:
-
changes
:
*code-shell-patterns
#######################
#######################
# Test metadata rules #
# Test metadata rules #
#######################
#######################
...
...
.gitlab/ci/static-analysis.gitlab-ci.yml
View file @
6dc0b033
...
@@ -107,15 +107,3 @@ feature-flags-usage:
...
@@ -107,15 +107,3 @@ feature-flags-usage:
when
:
always
when
:
always
paths
:
paths
:
-
tmp/feature_flags/
-
tmp/feature_flags/
shellcheck
:
extends
:
-
.default-retry
-
.shell:rules
stage
:
lint
needs
:
[]
image
:
name
:
koalaman/shellcheck-alpine
entrypoint
:
[
"
"
]
script
:
-
tooling/bin/shellcheck
bin/background_jobs
View file @
6dc0b033
#!/usr/bin/env bash
#!/usr/bin/env bash
cd
"
$(
dirname
"
$0
"
)
/.."
||
exit
cd
$(
dirname
$0
)
/..
app_root
=
$(
pwd
)
app_root
=
$(
pwd
)
sidekiq_workers
=
${
SIDEKIQ_WORKERS
:-
1
}
sidekiq_workers
=
${
SIDEKIQ_WORKERS
:-
1
}
sidekiq_queues
=
${
SIDEKIQ_QUEUES
:-
*
}
# Queues to listen to; default to `*` (all)
sidekiq_queues
=
${
SIDEKIQ_QUEUES
:-
*
}
# Queues to listen to; default to `*` (all)
sidekiq_pidfile
=
"
$app_root
/tmp/pids/sidekiq-cluster.pid"
sidekiq_pidfile
=
"
$app_root
/tmp/pids/sidekiq-cluster.pid"
sidekiq_logfile
=
"
$app_root
/log/sidekiq.log"
sidekiq_logfile
=
"
$app_root
/log/sidekiq.log"
gitlab_user
=
$(
ls
-l
config.ru |
awk
'{print $3}'
)
trap
cleanup EXIT
trap
cleanup EXIT
...
@@ -17,26 +17,26 @@ warn()
...
@@ -17,26 +17,26 @@ warn()
get_sidekiq_pid
()
get_sidekiq_pid
()
{
{
if
[
!
-f
"
$sidekiq_pidfile
"
]
;
then
if
[
!
-f
$sidekiq_pidfile
]
;
then
warn
"No pidfile found at
$sidekiq_pidfile
; is Sidekiq running?"
warn
"No pidfile found at
$sidekiq_pidfile
; is Sidekiq running?"
return
return
fi
fi
cat
"
$sidekiq_pidfile
"
cat
$sidekiq_pidfile
}
}
stop
()
stop
()
{
{
sidekiq_pid
=
$(
get_sidekiq_pid
)
sidekiq_pid
=
$(
get_sidekiq_pid
)
if
[
"
$sidekiq_pid
"
]
;
then
if
[
$sidekiq_pid
]
;
then
kill
-TERM
"
$sidekiq_pid
"
kill
-TERM
$sidekiq_pid
fi
fi
}
}
restart
()
restart
()
{
{
if
[
-f
"
$sidekiq_pidfile
"
]
;
then
if
[
-f
$sidekiq_pidfile
]
;
then
stop
stop
fi
fi
...
@@ -53,12 +53,12 @@ start_sidekiq()
...
@@ -53,12 +53,12 @@ start_sidekiq()
fi
fi
# sidekiq-cluster expects an argument per process.
# sidekiq-cluster expects an argument per process.
for
((
i
=
1
;
i<
=
sidekiq_workers
;
i++
))
for
((
i
=
1
;
i<
=
$
sidekiq_workers
;
i++
))
do
do
processes_args+
=(
"
${
sidekiq_queues
}
"
)
processes_args+
=(
"
${
sidekiq_queues
}
"
)
done
done
${
cmd
}
bin/sidekiq-cluster
"
${
processes_args
[@]
}
"
-P
"
$sidekiq_pidfile
"
-e
"
$RAILS_ENV
"
"
$@
"
2>&1 |
tee
-a
"
$sidekiq_logfile
"
${
cmd
}
bin/sidekiq-cluster
"
${
processes_args
[@]
}
"
-P
$sidekiq_pidfile
-e
$RAILS_ENV
"
$@
"
2>&1 |
tee
-a
$sidekiq_logfile
}
}
cleanup
()
cleanup
()
...
...
bin/mail_room
View file @
6dc0b033
#!/bin/sh
#!/bin/sh
cd
"
$(
dirname
"
$0
"
)
/.."
||
exit
1
cd
$(
dirname
$0
)
/..
||
exit
1
app_root
=
$(
pwd
)
app_root
=
$(
pwd
)
mail_room_pidfile
=
"
$app_root
/tmp/pids/mail_room.pid"
mail_room_pidfile
=
"
$app_root
/tmp/pids/mail_room.pid"
...
@@ -9,7 +9,8 @@ mail_room_config="$app_root/config/mail_room.yml"
...
@@ -9,7 +9,8 @@ mail_room_config="$app_root/config/mail_room.yml"
get_mail_room_pid
()
get_mail_room_pid
()
{
{
pid
=
$(
cat
"
$mail_room_pidfile
"
)
local
pid
pid
=
$(
cat
$mail_room_pidfile
)
if
[
-z
"
$pid
"
]
;
then
if
[
-z
"
$pid
"
]
;
then
echo
"Could not find a PID in
$mail_room_pidfile
"
echo
"Could not find a PID in
$mail_room_pidfile
"
exit
1
exit
1
...
@@ -19,13 +20,13 @@ get_mail_room_pid()
...
@@ -19,13 +20,13 @@ get_mail_room_pid()
start
()
start
()
{
{
bin/daemon_with_pidfile
"
$mail_room_pidfile
"
bundle
exec
mail_room
--log-exit-as
json
-q
-c
"
$mail_room_config
"
>>
"
$mail_room_logfile
"
2>&1
bin/daemon_with_pidfile
$mail_room_pidfile
bundle
exec
mail_room
--log-exit-as
json
-q
-c
$mail_room_config
>>
$mail_room_logfile
2>&1
}
}
stop
()
stop
()
{
{
get_mail_room_pid
get_mail_room_pid
kill
-TERM
"
$mail_room_pid
"
kill
-TERM
$mail_room_pid
}
}
restart
()
restart
()
...
...
bin/parallel-rsync-repos
View file @
6dc0b033
...
@@ -32,20 +32,20 @@ if [ -z "$RSYNC" ] ; then
...
@@ -32,20 +32,20 @@ if [ -z "$RSYNC" ] ; then
RSYNC
=
rsync
RSYNC
=
rsync
fi
fi
if
!
cd
"
$SRC
"
;
then
if
!
cd
$SRC
;
then
echo
"cd
$SRC
failed"
echo
"cd
$SRC
failed"
exit
1
exit
1
fi
fi
rsyncjob
()
{
rsyncjob
()
{
relative_dir
=
"./
${
1
#
"
$SRC
"
}
"
relative_dir
=
"./
${
1
#
$SRC
}
"
if
!
$RSYNC
--delete
--relative
-a
"
$relative_dir
"
"
$DEST
"
;
then
if
!
$RSYNC
--delete
--relative
-a
"
$relative_dir
"
"
$DEST
"
;
then
echo
"rsync
$1
failed"
echo
"rsync
$1
failed"
return
1
return
1
fi
fi
echo
"
$1
"
>>
"
$LOGFILE
"
echo
"
$1
"
>>
$LOGFILE
}
}
export
LOGFILE SRC DEST RSYNC
export
LOGFILE SRC DEST RSYNC
...
...
bin/web
View file @
6dc0b033
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
set
-e
set
-e
cd
"
$(
dirname
"
$0
"
)
/.."
cd
$(
dirname
$0
)
/..
app_root
=
$(
pwd
)
app_root
=
$(
pwd
)
puma_pidfile
=
"
$app_root
/tmp/pids/puma.pid"
puma_pidfile
=
"
$app_root
/tmp/pids/puma.pid"
...
@@ -25,12 +25,12 @@ get_puma_pid()
...
@@ -25,12 +25,12 @@ get_puma_pid()
start
()
start
()
{
{
spawn_puma
"
$@
"
&
spawn_puma &
}
}
start_foreground
()
start_foreground
()
{
{
spawn_puma
"
$@
"
spawn_puma
}
}
stop
()
stop
()
...
@@ -46,10 +46,10 @@ reload()
...
@@ -46,10 +46,10 @@ reload()
case
"
$1
"
in
case
"
$1
"
in
start
)
start
)
start
"
$@
"
start
;;
;;
start_foreground
)
start_foreground
)
start_foreground
"
$@
"
start_foreground
;;
;;
stop
)
stop
)
stop
stop
...
...
bin/with_env
View file @
6dc0b033
...
@@ -10,7 +10,6 @@ shift
...
@@ -10,7 +10,6 @@ shift
# Use set -a to export all variables defined in env_file.
# Use set -a to export all variables defined in env_file.
set
-a
set
-a
# shellcheck disable=SC1090
.
"
${
env_file
}
"
.
"
${
env_file
}
"
set
+a
set
+a
...
...
tooling/bin/shellcheck
deleted
100755 → 0
View file @
89d0caa1
#!/bin/sh
root
=
"
$(
cd
"
$(
dirname
"
$0
"
)
/../.."
||
exit
;
pwd
-P
)
"
if
[
$#
-ne
0
]
;
then
shellcheck
--exclude
=
SC1071
--external-sources
"
$@
"
else
find
\
"
${
root
}
/bin"
\
"
${
root
}
/tooling"
\
-type
f
\
-not
-path
"*.swp"
\
-not
-path
"*.rb"
\
-not
-path
"*.js"
\
-not
-path
"*.md"
\
-not
-path
"*.haml"
\
-not
-path
"*/Gemfile*"
\
-not
-path
'*/.bundle*'
\
-not
-path
'*/Makefile*'
\
-print0
\
| xargs
-0
shellcheck
--exclude
=
SC1071
--external-sources
--
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment