Commit Graph

44 Commits

Author SHA1 Message Date
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
Dmitriy Zaporozhets dd47f9532f
Fix gitlab-shell setup rake task
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-05-02 13:46:32 +03:00
Cyril Rohr 301c4068e1 Add rake task to install or upgrade gitlab-shell installation. 2014-04-08 15:12:18 +01:00
Jacob Vosmaer 779fa4a7b7 Use batch_add_keys in `rake gitlab🐚setup` 2014-03-14 15:49:11 +01:00
Dmitriy Zaporozhets 475f607a22 Use gitlab-shell authorized_keys truncation. Fix issue with authorized_keys stored in different location 2013-07-18 13:55:01 +03:00
Angus MacArthur 9c82bca5ee fixes for gitlab restore with non-standard backup and repo dirs
These fixes will allow a restore of gitlab when the backups and
repositories directories are in non-standard locations (ie sub-dirs
of gitlabhq).  Also allows the restore to be run from script
overriding the need of a user to confirm the rebuild of the
authorized_keys file.
2013-05-30 09:58:36 -04:00
Bhagavan Das 4bc7d98d65 Remove hardcoded refernce to gitlab-shell home. so that gitlab can be installed on any unix account other than git 2013-02-14 23:10:18 +00:00
Dmitriy Zaporozhets d64090b8a9 No gitolite in project any more 2013-02-11 19:16:59 +02:00
Dmitriy Zaporozhets 433f2dbcef task to build missing projects with gitlab-shell 2013-02-09 12:30:49 +02:00
Dmitriy Zaporozhets cdcf69d0d9 gitlab;shell init script 2013-02-07 10:06:39 +02:00