| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Starting version 2.11, git changed the way the pre-receive flow works.
- Previously, the new potential objects would be added to the main repo. If the
pre-receive passes, the new objects stay in the repo but are linked up. If
the pre-receive fails, the new objects stay orphaned in the repo, and are
cleaned up during the next `git gc`.
- In 2.11, the new potential objects are added to a temporary "alternate object
directory", that git creates for this purpose. If the pre-receive passes, the
objects from the alternate object directory are migrated to the main repo. If
the pre-receive fails the alternate object directory is simply deleted.
2. In our workflow, the pre-recieve script calls the `/allowed` endpoint on the
rails server. This `/allowed` endpoint calls out directly to git to perform
various checks. These direct calls to git do _not_ have the necessary
environment variables set which allow access to the "alternate object
directory" (explained above). Therefore these calls to git are not able to
access any of the new potential objects to be added during this push.
3. We fix this by passing the relevant environment variables
(GIT_ALTERNATE_OBJECT_DIRECTORIES, GIT_OBJECT_DIRECTORY, and
GIT_QUARANTINE_PATH) to the `/allowed` endpoint, which will then include
these environment variables while calling out to git.
|
|
|
|
|
|
|
|
| |
Add a new configuration option, custom_hooks_dir. When this is set, we
will look for global custom hooks in:
<custom_hooks_dir>/{pre-receive,update,post-receive}.d/*
When this is not set, default to <REPO_PATH>/hooks.
|
|
|
|
|
|
| |
Add changelog entry
Editing changelog entry version
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
update hooks lookup to use <hook>.d/* from repository hooks dir
the order would be:
1. <repository>.git/custom_hooks/<hook_name> - per project hook
2. <repository>.git/custom_hooks/<hook_name>.d/* - per project hooks
3. <repository>.git/hooks/<hook_name>.d/* - global hooks
only executable files are matched and backup files excluded (*~)
and the resulting list is sorted per each lookup
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds the option of having another set of global custom hooks
along with the already supported repository local custom hooks.
The repository local custom hook is executed first (if available). If
successful, execution continues with the global custom hook (if available).
This way, local custom hooks get priority over global custom hooks.
Global custom hooks can be enabled by placing an executable file into the
"custom_hooks" directory within gitlab-shell (create if it does not exist,
yet).
|
|
|
|
|
|
| |
This commit takes the GitlabCustomHook a bit clother to the other hook
handling classes by receiving the repo_path as argument to initialize()
instead of passing it to each method.
|
|
|
|
|
| |
This commit fixes an issue where an existing but unexecutable hook would
cause an uncaught execption.
|
|
|
|
| |
This will allow us to not recreate branches that has been deleted on the upstream and the mirror.
|
| |
|
|
|
|
| |
Related to #22053
|
|
|
|
| |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|
|
|
|
|
|
| |
This removes the need for configuring anything extra. To make scraping
easier each line is prefixed by "metrics:".
Fixes #64
|
| |
|
| |
|
|
|
|
| |
storage migrations
|
| |
|
|
|
|
|
|
| |
git_trace_log_file config key
The value of the variable if present must be a writable absolute path. If it’s
not the case we log a proper message and not enable tracing to not throw output to the users.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
- Required changes to GitLab Shell include the actual handling of the `git-lfs-authenticate` command and the retrieval of the correct credentials.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
In order to use chomp! on the input later, we need to dup the ARGV input string for keys
Also updated the gitlab_key tests to freeze the ARGV variables.
Fixes https://gitlab.com/gitlab-org/gitlab-shell/issues/56
See merge request !84
|
| |
| |
| |
| |
| |
| | |
string for keys
Also updated the gitlab_key tests to freeze the ARGV variables.
|
|\ \
| |/
|/|
| |
| |
| |
| | |
Show Merge request link after pushing if new brach
This is part of implementation for issue https://gitlab.com/gitlab-org/gitlab-ce/issues/18266
See merge request !77
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
update spec
different text for new and existing merge request
update spec
fix style
switch order of messages
enhance message appearance
remove extra spaces
|
| |
| |
| |
| | |
That way the file is created if it does not exist.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
It is not nice to have both 'GitlabKeys' and 'GitlabKey'. We also do
not need GitlabKey to be a class when it has no state.
|
| | |
|
| |
| |
| |
| |
| |
| | |
The old check only looked if authorized_keys exists. With this change, we look
whether we can actually open the file for reading and writing. When this fails
we try to print useful diagnostic information.
|
|/
|
|
|
|
| |
We can lazily create authorized_keys and set its permissions. This
adds negligible overhead and it allows us to remove a setup step from
GitLab both on source and in omnibus-gitlab.
|
|
|
|
| |
running (after waiting some time)
|
| |
|
|
|
|
| |
different repository storages
|
| |
|
| |
|
|
|
|
| |
fallback value
|
|
|
|
| |
hooks via SSH
|
| |
|
| |
|
| |
|
| |
|