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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
dcdced81
Commit
dcdced81
authored
May 04, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gitlab-shell-compile' into 'master'
Compile gitlab-shell go executables See merge request !11039
parents
2d43f8a2
3960d974
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
2 deletions
+16
-2
doc/update/9.0-to-9.1.md
doc/update/9.0-to-9.1.md
+1
-0
doc/update/patch_versions.md
doc/update/patch_versions.md
+1
-0
doc/update/upgrader.md
doc/update/upgrader.md
+2
-0
lib/tasks/gitlab/shell.rake
lib/tasks/gitlab/shell.rake
+8
-2
spec/tasks/gitlab/shell_rake_spec.rb
spec/tasks/gitlab/shell_rake_spec.rb
+4
-0
No files found.
doc/update/9.0-to-9.1.md
View file @
dcdced81
...
@@ -104,6 +104,7 @@ cd /home/git/gitlab-shell
...
@@ -104,6 +104,7 @@ cd /home/git/gitlab-shell
sudo
-u
git
-H
git fetch
--all
--tags
sudo
-u
git
-H
git fetch
--all
--tags
sudo
-u
git
-H
git checkout v
$(
</home/git/gitlab/GITLAB_SHELL_VERSION
)
sudo
-u
git
-H
git checkout v
$(
</home/git/gitlab/GITLAB_SHELL_VERSION
)
sudo
-u
git
-H
bin/compile
```
```
### 7. Update gitlab-workhorse
### 7. Update gitlab-workhorse
...
...
doc/update/patch_versions.md
View file @
dcdced81
...
@@ -75,6 +75,7 @@ cd /home/git/gitlab-shell
...
@@ -75,6 +75,7 @@ cd /home/git/gitlab-shell
sudo
-u
git
-H
git fetch
--all
--tags
sudo
-u
git
-H
git fetch
--all
--tags
sudo
-u
git
-H
git checkout v
`
cat
/home/git/gitlab/GITLAB_SHELL_VERSION
`
-b
v
`
cat
/home/git/gitlab/GITLAB_SHELL_VERSION
`
sudo
-u
git
-H
git checkout v
`
cat
/home/git/gitlab/GITLAB_SHELL_VERSION
`
-b
v
`
cat
/home/git/gitlab/GITLAB_SHELL_VERSION
`
sudo
-u
git
-H
sh
-c
'if [ -x bin/compile ]; then bin/compile; fi'
```
```
### 6. Start application
### 6. Start application
...
...
doc/update/upgrader.md
View file @
dcdced81
...
@@ -60,6 +60,7 @@ GitLab Shell might be outdated, running the commands below ensures you're using
...
@@ -60,6 +60,7 @@ GitLab Shell might be outdated, running the commands below ensures you're using
cd /home/git/gitlab-shell
cd /home/git/gitlab-shell
sudo -u git -H git fetch
sudo -u git -H git fetch
sudo -u git -H git checkout v`cat /home/git/gitlab/GITLAB_SHELL_VERSION`
sudo -u git -H git checkout v`cat /home/git/gitlab/GITLAB_SHELL_VERSION`
sudo -u git -H sh -c 'if [ -x bin/compile ] ; then bin/compile ; fi'
```
```
## One line upgrade command
## One line upgrade command
...
@@ -78,6 +79,7 @@ cd /home/git/gitlab; \
...
@@ -78,6 +79,7 @@ cd /home/git/gitlab; \
cd
/home/git/gitlab-shell
;
\
cd
/home/git/gitlab-shell
;
\
sudo
-u
git
-H
git fetch
;
\
sudo
-u
git
-H
git fetch
;
\
sudo
-u
git
-H
git checkout v
`
cat
/home/git/gitlab/GITLAB_SHELL_VERSION
`
;
\
sudo
-u
git
-H
git checkout v
`
cat
/home/git/gitlab/GITLAB_SHELL_VERSION
`
;
\
sudo
-u
git
-H
sh
-c
'if [ -x bin/compile ] ; then bin/compile ; fi'
;
\
cd
/home/git/gitlab
;
\
cd
/home/git/gitlab
;
\
sudo
service gitlab start
;
\
sudo
service gitlab start
;
\
sudo
service nginx restart
;
\
sudo
service nginx restart
;
\
...
...
lib/tasks/gitlab/shell.rake
View file @
dcdced81
...
@@ -41,8 +41,14 @@ namespace :gitlab do
...
@@ -41,8 +41,14 @@ namespace :gitlab do
# Generate config.yml based on existing gitlab settings
# Generate config.yml based on existing gitlab settings
File
.
open
(
"config.yml"
,
"w+"
)
{
|
f
|
f
.
puts
config
.
to_yaml
}
File
.
open
(
"config.yml"
,
"w+"
)
{
|
f
|
f
.
puts
config
.
to_yaml
}
# Launch installation process
[
system
(
*
%w(bin/install)
+
repository_storage_paths_args
)
%w(bin/install)
+
repository_storage_paths_args
,
%w(bin/compile)
].
each
do
|
cmd
|
unless
Kernel
.
system
(
*
cmd
)
raise
"command failed:
#{
cmd
.
join
(
' '
)
}
"
end
end
end
end
# (Re)create hooks
# (Re)create hooks
...
...
spec/tasks/gitlab/shell_rake_spec.rb
View file @
dcdced81
...
@@ -11,6 +11,10 @@ describe 'gitlab:shell rake tasks' do
...
@@ -11,6 +11,10 @@ describe 'gitlab:shell rake tasks' do
it
'invokes create_hooks task'
do
it
'invokes create_hooks task'
do
expect
(
Rake
::
Task
[
'gitlab:shell:create_hooks'
]).
to
receive
(
:invoke
)
expect
(
Rake
::
Task
[
'gitlab:shell:create_hooks'
]).
to
receive
(
:invoke
)
storages
=
Gitlab
.
config
.
repositories
.
storages
.
values
.
map
{
|
rs
|
rs
[
'path'
]
}
expect
(
Kernel
).
to
receive
(
:system
).
with
(
'bin/install'
,
*
storages
).
and_call_original
expect
(
Kernel
).
to
receive
(
:system
).
with
(
'bin/compile'
).
and_call_original
run_rake_task
(
'gitlab:shell:install'
)
run_rake_task
(
'gitlab:shell:install'
)
end
end
end
end
...
...
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