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
36f16a05
Commit
36f16a05
authored
Jul 11, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
dca33d56
6ce54084
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
91 additions
and
60 deletions
+91
-60
app/models/concerns/ci/contextable.rb
app/models/concerns/ci/contextable.rb
+1
-0
bin/web
bin/web
+13
-55
bin/web_unicorn
bin/web_unicorn
+58
-0
changelogs/unreleased/64161-gitlab-fqdn.yml
changelogs/unreleased/64161-gitlab-fqdn.yml
+5
-0
config/initializers/rack_timeout.rb
config/initializers/rack_timeout.rb
+2
-2
doc/administration/integration/plantuml.md
doc/administration/integration/plantuml.md
+3
-2
doc/ci/variables/README.md
doc/ci/variables/README.md
+5
-0
doc/ci/variables/predefined_variables.md
doc/ci/variables/predefined_variables.md
+1
-0
doc/raketasks/backup_restore.md
doc/raketasks/backup_restore.md
+2
-1
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+1
-0
No files found.
app/models/concerns/ci/contextable.rb
View file @
36f16a05
...
...
@@ -59,6 +59,7 @@ module Ci
variables
.
append
(
key:
'CI'
,
value:
'true'
)
variables
.
append
(
key:
'GITLAB_CI'
,
value:
'true'
)
variables
.
append
(
key:
'GITLAB_FEATURES'
,
value:
project
.
licensed_features
.
join
(
','
))
variables
.
append
(
key:
'CI_SERVER_HOST'
,
value:
Gitlab
.
config
.
gitlab
.
host
)
variables
.
append
(
key:
'CI_SERVER_NAME'
,
value:
'GitLab'
)
variables
.
append
(
key:
'CI_SERVER_VERSION'
,
value:
Gitlab
::
VERSION
)
variables
.
append
(
key:
'CI_SERVER_VERSION_MAJOR'
,
value:
Gitlab
.
version_info
.
major
.
to_s
)
...
...
bin/web
View file @
36f16a05
#!/bin/sh
set
-e
cd
$(
dirname
$0
)
/..
app_root
=
$(
pwd
)
# Switch to experimental PUMA configuration
if
[
-n
"
${
EXPERIMENTAL_PUMA
}
"
]
;
then
exec
bin/web_puma
"
$@
"
fi
unicorn_pidfile
=
"
$app_root
/tmp/pids/unicorn.pid"
unicorn_config
=
"
$app_root
/config/unicorn.rb"
unicorn_cmd
=
"bundle exec unicorn_rails -c
$unicorn_config
-E
$RAILS_ENV
"
get_unicorn_pid
()
{
local
pid
=
$(
cat
$unicorn_pidfile
)
if
[
-z
"
$pid
"
]
;
then
echo
"Could not find a PID in
$unicorn_pidfile
"
exit
1
fi
unicorn_pid
=
$pid
}
start
()
{
exec
$unicorn_cmd
-D
}
start_foreground
()
{
exec
$unicorn_cmd
}
stop
()
{
get_unicorn_pid
kill
-QUIT
$unicorn_pid
}
case
"
$USE_WEB_SERVER
"
in
puma|
""
)
# and the "" defines default
exec
bin/web_puma
"
$@
"
;;
reload
()
{
get_unicorn_pid
kill
-USR2
$unicorn_pid
}
unicorn
)
exec
bin/web_unicorn
"
$@
"
;;
case
"
$1
"
in
start
)
start
;;
start_foreground
)
start_foreground
;;
stop
)
stop
;;
reload
)
reload
;;
*
)
echo
"Usage: RAILS_ENV=your_env
$0
{start|stop|reload}"
;;
*
)
echo
"Unkown web server used by USE_WEB_SERVER:
$USE_WEB_SERVER
."
exit
1
;;
esac
bin/web_unicorn
0 → 100755
View file @
36f16a05
#!/bin/sh
cd
$(
dirname
$0
)
/..
app_root
=
$(
pwd
)
unicorn_pidfile
=
"
$app_root
/tmp/pids/unicorn.pid"
unicorn_config
=
"
$app_root
/config/unicorn.rb"
unicorn_cmd
=
"bundle exec unicorn_rails -c
$unicorn_config
-E
$RAILS_ENV
"
get_unicorn_pid
()
{
local
pid
=
$(
cat
$unicorn_pidfile
)
if
[
-z
"
$pid
"
]
;
then
echo
"Could not find a PID in
$unicorn_pidfile
"
exit
1
fi
unicorn_pid
=
$pid
}
start
()
{
exec
$unicorn_cmd
-D
}
start_foreground
()
{
exec
$unicorn_cmd
}
stop
()
{
get_unicorn_pid
kill
-QUIT
$unicorn_pid
}
reload
()
{
get_unicorn_pid
kill
-USR2
$unicorn_pid
}
case
"
$1
"
in
start
)
start
;;
start_foreground
)
start_foreground
;;
stop
)
stop
;;
reload
)
reload
;;
*
)
echo
"Usage: RAILS_ENV=your_env
$0
{start|stop|reload}"
;;
esac
changelogs/unreleased/64161-gitlab-fqdn.yml
0 → 100644
View file @
36f16a05
---
title
:
Add CI variable to provide GitLab HOST
merge_request
:
30417
author
:
type
:
added
config/initializers/rack_timeout.rb
View file @
36f16a05
...
...
@@ -14,8 +14,8 @@ if defined?(::Puma) && !Rails.env.test?
Gitlab
::
Application
.
configure
do
|
config
|
config
.
middleware
.
insert_before
(
Rack
::
Runtime
,
Rack
::
Timeout
,
service_timeout:
60
,
wait_timeout:
90
)
service_timeout:
ENV
.
fetch
(
'GITLAB_RAILS_RACK_TIMEOUT'
,
60
).
to_i
,
wait_timeout:
ENV
.
fetch
(
'GITLAB_RAILS_WAIT_TIMEOUT'
,
90
).
to_i
)
end
observer
=
Gitlab
::
Cluster
::
RackTimeoutObserver
.
new
...
...
doc/administration/integration/plantuml.md
View file @
36f16a05
...
...
@@ -69,11 +69,12 @@ our AsciiDoc snippets, wikis and repos using delimited blocks:
-
**Markdown**
<pre>
````
markdown
```
plantuml
Bob -> Alice : hello
Alice -> Bob : Go Away
```
</pre>
```
````
-
**AsciiDoc**
...
...
doc/ci/variables/README.md
View file @
36f16a05
...
...
@@ -273,6 +273,7 @@ export CI_RUNNER_ID="10"
export
CI_RUNNER_DESCRIPTION
=
"my runner"
export
CI_RUNNER_TAGS
=
"docker, linux"
export
CI_SERVER
=
"yes"
export
CI_SERVER_HOST
=
"example.com"
export
CI_SERVER_NAME
=
"GitLab"
export
CI_SERVER_REVISION
=
"70606bf"
export
CI_SERVER_VERSION
=
"8.9.0"
...
...
@@ -644,6 +645,8 @@ Running on runner-8a2f473d-project-1796893-concurrent-0 via runner-8a2f473d-mach
++
CI_PROJECT_DIR
=
/builds/gitlab-examples/ci-debug-trace
++
export
CI_SERVER
=
yes
++
CI_SERVER
=
yes
++
export
'CI_SERVER_HOST=example.com'
++
CI_SERVER_HOST
=
'example.com'
++
export
'CI_SERVER_NAME=GitLab CI'
++
CI_SERVER_NAME
=
'GitLab CI'
++
export
CI_SERVER_VERSION
=
...
...
@@ -678,6 +681,8 @@ Running on runner-8a2f473d-project-1796893-concurrent-0 via runner-8a2f473d-mach
++
CI_JOB_NAME
=
debug_trace
++
export
CI_JOB_STAGE
=
test
++
CI_JOB_STAGE
=
test
++
export
CI_SERVER_HOST
=
example.com
++
CI_SERVER_HOST
=
example.com
++
export
CI_SERVER_NAME
=
GitLab
++
CI_SERVER_NAME
=
GitLab
++
export
CI_SERVER_VERSION
=
8.14.3-ee
...
...
doc/ci/variables/predefined_variables.md
View file @
36f16a05
...
...
@@ -101,6 +101,7 @@ future GitLab releases.**
|
`CI_RUNNER_TAGS`
| 8.10 | 0.5 | The defined runner tags |
|
`CI_RUNNER_VERSION`
| all | 10.6 | GitLab Runner version that is executing the current job |
|
`CI_SERVER`
| all | all | Mark that job is executed in CI environment |
|
`CI_SERVER_HOST`
| 12.1 | all | Host component of the GitLab instance URL, without protocol and port (like gitlab.example.com) |
|
`CI_SERVER_NAME`
| all | all | The name of CI server that is used to coordinate jobs |
|
`CI_SERVER_REVISION`
| all | all | GitLab revision that is used to schedule jobs |
|
`CI_SERVER_VERSION`
| all | all | GitLab version that is used to schedule jobs |
...
...
doc/raketasks/backup_restore.md
View file @
36f16a05
...
...
@@ -741,9 +741,10 @@ sudo gitlab-rake gitlab:backup:restore BACKUP=1493107454_2018_04_25_10.6.4-ce
Next, restore
`/etc/gitlab/gitlab-secrets.json`
if necessary as mentioned above.
Restart and check GitLab:
Re
configure, re
start and check GitLab:
```
shell
sudo
gitlab-ctl reconfigure
sudo
gitlab-ctl restart
sudo
gitlab-rake gitlab:check
SANITIZE
=
true
```
...
...
spec/models/ci/build_spec.rb
View file @
36f16a05
...
...
@@ -2013,6 +2013,7 @@ describe Ci::Build do
{
key:
'CI'
,
value:
'true'
,
public:
true
,
masked:
false
},
{
key:
'GITLAB_CI'
,
value:
'true'
,
public:
true
,
masked:
false
},
{
key:
'GITLAB_FEATURES'
,
value:
project
.
licensed_features
.
join
(
','
),
public:
true
,
masked:
false
},
{
key:
'CI_SERVER_HOST'
,
value:
Gitlab
.
config
.
gitlab
.
host
,
public:
true
,
masked:
false
},
{
key:
'CI_SERVER_NAME'
,
value:
'GitLab'
,
public:
true
,
masked:
false
},
{
key:
'CI_SERVER_VERSION'
,
value:
Gitlab
::
VERSION
,
public:
true
,
masked:
false
},
{
key:
'CI_SERVER_VERSION_MAJOR'
,
value:
Gitlab
.
version_info
.
major
.
to_s
,
public:
true
,
masked:
false
},
...
...
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