Commit Graph

59 Commits

Author SHA1 Message Date
GitLab Bot 64f7eb2b37 Add latest changes from gitlab-org/gitlab@master 2021-02-05 12:09:31 +00:00
GitLab Bot 7892ed2e23 Add latest changes from gitlab-org/gitlab@master 2020-05-27 09:08:30 +00:00
GitLab Bot 87f286558d Add latest changes from gitlab-org/gitlab@master 2020-05-14 15:08:14 +00:00
GitLab Bot cd52759ee3 Add latest changes from gitlab-org/gitlab@master 2020-03-12 12:09:17 +00:00
GitLab Bot 0f8c2334f0 Add latest changes from gitlab-org/gitlab@master 2020-01-23 06:08:32 +00:00
GitLab Bot ad1e4b8fb8 Add latest changes from gitlab-org/gitlab@master 2019-10-21 15:05:58 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
Zeger-Jan van de Weg 951afba624
Remove hook directory requirement from Shell
It used to be the case that GitLab created symlinks for each repository
to one copy of the Git hooks, so these ran when required. This changed
to set the hooks dynamically on Gitaly when invoking Git.

The side effect is that we didn't need all these symlinks anymore, which
Gitaly doesn't create anymore either. Now that means that the tests in
GitLab-Rails should test for it either.

Related: https://gitlab.com/gitlab-org/gitaly/issues/1392#note_175619926
2019-05-30 20:04:08 +02:00
Patrick Bajao 26dadbc9c4 Integrate Gitlab::Keys with Gitlab::Shell
In this commit, some methods that aren't being used
are removed from `Gitlab::Shell`. They are the ff:
- `#remove_keys_not_found_in_db`
- `#batch_read_key_ids`
- `#list_key_ids`

The corresponding methods in `Gitlab::Keys` have been
removed as well.
2019-03-19 11:16:21 +00:00
Cindy Pallares a7e774566e
Enable write to auth_keys file during restore
Fast lookup of authorized SSH keys in the database was ported to CE in
v10.4. This change adds the option to enable the setting via the restore
rake task and assumes yes if the force env variable is set.
2018-09-25 09:34:14 -05:00
Zeger-Jan van de Weg 77f0906e4c
Change Gitlab::Shell#add_namespace to #create_namespace
Prior to this change, this method was called add_namespace, which broke
the CRUD convention and made it harder to grep for what I was looking
for. Given the change was a find and replace kind of fix, this was
changed without opening an issue and on another feature branch.

If more dynamic calls are made to add_namespace, these could've been
missed which might lead to incorrect bahaviour. However, going through
the commit log it seems thats not the case.
2018-03-14 09:56:22 +01:00
Lin Jen-Shin 8e87ecbf30 Eliminate the warnings from task helpers 2018-01-26 19:42:48 +08:00
Ricketts, M (Mike) 87a36a74ff Remove .ssh/environment file that now breaks the gitlab:check rake task 2017-12-22 13:52:09 +00:00
Jacob Vosmaer e5fecc3a37 Create repositories via Gitaly 2017-09-29 18:27:06 +02:00
Gabriel Mazetto fb06a4d8fe Rename more path_with_namespace -> full_path or disk_path 2017-08-01 07:28:13 +02:00
Jacob Vosmaer 3960d974c3 Compile gitlab-shell go executables 2017-05-04 11:21:51 +02:00
Alejandro Rodríguez e61325ff43 Expand components version specification format to allow branches
Currently we specify versions for Gitlab-Shell, Workhorse and Gitaly
using version strings, to which we prepend 'v' and assume are tags.
These changes allow branches or tags with other name formats to be
specified by prepending '=' to the version string (á la govendor).

We also simplify the process to reset to the given version (now a
branch or tag): Right now there's a check to supposedly try to avoid
fetching from the remote the version if it already exist locally. But
the previous logic already clones if the directory doesn't exist or
fetches if it does, so this check is pointless. We can safely assume the
version exists once we get to the reset stage.
2017-04-13 17:32:00 -03:00
Douwe Maan 87c9df29ce Don’t exclude some file in lib from rubocop 2017-02-23 09:32:42 -06:00
Rémy Coutable fbbf177e3b New `gitlab:workhorse:install` rake task
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-30 10:34:59 +01:00
Drew Blessing af5322e90b Add Rake task to create/repair GitLab Shell hooks symlinks 2016-11-01 14:52:59 -05:00
Justin DiPierro fe46e4eb35 Load Github::Shell's secret token from file on initialization instead of every request. 2016-10-06 11:22:37 -04:00
bogdanvlviv 96ebc8c4f7 Use `File::exist?` instead of `File::exists?`
Since version ruby-2.2.0, method `File::exists?` is deprecated.
2016-08-11 13:54:45 +03:00
Stan Hu 8a62f4e7d4 Update the gitlab-shell version in the tmp/tests directory to the right version
Previously the gitlab-shell version would never be updated if the directory
existed via the `gitlab🐚install` Rake task. This could lead to
incompatibility issues or random errors.
2016-08-03 11:39:19 -07:00
Alejandro Rodríguez 20b9bb2029 Create (if necessary) and link the gitlab-shell secret file on the rake install task 2016-06-29 22:30:33 -04:00
Alejandro Rodríguez 86359ec854 Refactor repository paths handling to allow multiple git mount points 2016-06-29 22:30:31 -04:00
Connor Shea 903946c78a
Replace colorize gem with rainbow.
Colorize is a gem licensed under the GPLv2, so we can’t use it in GitLab without relicensing GitLab under the terms of the GPL. Rainbow is licensed under the MIT license and does the exact same thing as Colorize, so Rainbow was added in place of Colorize.

The syntax is slightly different for Rainbow vs. Colorize, and was updated in accordance.

The gem is still a dependency of Spinach, so it’s included in the development/test environments, but won’t be packaged with the actual product, and therefore doesn’t require we relicense the product.

An attempt at relicensing Colorize was made, but didn’t succeed as the library owner never responded.

Rainbow library: https://github.com/sickill/rainbow
Relevant issue regarding licensing in GitLab's gems: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3775
2016-06-03 10:37:09 -06:00
Robert Speicher d09d62b6b8 Replace all usages of `git` command with configurable binary path
Closes #3311
2015-11-03 17:11:09 -05:00
Dmitriy Zaporozhets b8f12d1917 Replace GITLAB with GitLab in rake task descriptions 2015-06-23 16:52:40 +02:00
Marin Jankovski a1be236c87 Trigger hooks-create on gitlab backup restore. 2015-06-03 16:24:37 +02:00
Andrew Tomaka 6c8b119263 Fix newline spacing after authorized_keys rebuild 2015-03-20 13:43:52 -04:00
Marin Jankovski e5951cf4ae Don't forget to splat. 2014-12-12 10:42:55 +01:00
Marin Jankovski bd43cf0653 Use system where only return result is needed. 2014-12-12 10:17:07 +01:00
Marin Jankovski cd4c65c159 Use shell invocation according to the shell commands guidelines. 2014-12-11 13:17:43 +01:00
Dmitriy Zaporozhets f7bf892cca Revert "gitlab shell works if multiple rubies installed"
This reverts commit 533f4cdf30.
2014-11-18 17:14:36 +02:00
Ciro Santilli 533f4cdf30 gitlab shell works if multiple rubies installed
Before this it would fail because git hooks automatically prepend
things to the path, which can lead the wrong Ruby version to be called
in which dependencies are not installed.

To make sure that this is correct, the forked_merge_requests commented
out test that depends on this change was uncommented.

For that test to pass, it is also necessary to setup the mock server
on port 3001 under test_env.rb.
2014-11-18 11:38:23 +01:00
Dmitriy Zaporozhets 6641341b65 Merge pull request #8254 from cirosantilli/factor-get-shell-version
Factor GITLAB_SHELL_VERSION get method
2014-11-08 11:04:56 +02:00
Ciro Santilli e4a38e4471 Factor using Repository#path_to_repo 2014-11-05 17:51:49 +01:00
Ciro Santilli f36db59d97 Factor GITLAB_SHELL_VERSION get method 2014-11-05 17:16:04 +01:00
Dmitriy Zaporozhets f4178f9601 Merge pull request #8005 from cirosantilli/settings-to-gitlab-config
Use Gitlab.config instead of Settings everywhere
2014-10-27 19:18:48 +02:00
Jacob Vosmaer 90e960f4ce Merge pull request #8088 from cirosantilli/sh-str-to-args
Use argument list for sh instead of string
2014-10-23 12:23:40 +02:00
Ciro Santilli a3623a9691 Use argument list for sh instead of string
Faster, more portable and less error prone since no shell expansion.
2014-10-18 22:49:56 +02:00
Ciro Santilli 2901042196 Replace match with end_with: more readable, faster 2014-10-18 22:41:39 +02:00
Ciro Santilli 39c66c822e Use Gitlab.config instead of Settings everywhere 2014-10-15 23:01:31 +02:00
Dmitriy Zaporozhets 28b6f09fcc Merge pull request #7823 from cirosantilli/test-fetch-shell
Only clone GitLab Shell on tests if necessary.
2014-09-24 12:58:10 +03:00
Ciro Santilli 065ab3e5f3 Only clone GitLab Shell on tests if necessary. 2014-09-22 21:37:52 +02:00
Jacob Vosmaer 4f61061cfb Support sockets in 'rake gitlab🐚install' 2014-09-22 15:02:46 +02:00
Jacob Vosmaer 37d6293842 Write authorized_keys in tmp/tests during tests
This should reduce the number of gitlab-shell error messages while the
tests run.
2014-08-26 11:33:26 +02:00
Dmitriy Zaporozhets 394ac378f8
Fix markdown tests. Use new repo for testing. Fixed gitlab-shell test setup
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-31 23:05:30 +03:00
Dmitriy Zaporozhets 3a017a4e3c
Get gitlab-shell verion from file for install rake task
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-31 22:34:25 +03:00
Dmitriy Zaporozhets 87c397f577
More fixes to gitlab🐚install
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-05-02 14:13:45 +03:00