As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Commit 4f9deeba authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Allow update.local hook after update.gitlab

parent 4fc02372
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env ruby
#!/bin/bash
# GitLab update hook -- do not modify!
# To add your own update hook, create an update.local executable
# This file was placed here by GitLab. It makes sure that your pushed commits
# will be processed properly.
# You can add your own hooks to this file, but be careful when updating gitlab-shell!
hooks_dir="$(cd `dirname $0` && pwd)"
update_gitlab="$hooks_dir/update.gitlab"
update_local="$hooks_dir/update.local"
refname = ARGV[0]
key_id = ENV['GL_ID']
repo_path = `pwd`
$update_gitlab "$@" || exit 1
require_relative '../lib/gitlab_update'
GitlabUpdate.new(repo_path, key_id, refname).exec
if [ -x $update_local ]; then
$update_local "$@" || exit 1
fi
#!/usr/bin/env ruby
# This file was placed here by GitLab. It makes sure that your pushed commits
# will be processed properly. See the `update` script for instructions on how
# to add your own update hooks.
refname = ARGV[0]
key_id = ENV['GL_ID']
repo_path = `pwd`
require_relative '../lib/gitlab_update'
GitlabUpdate.new(repo_path, key_id, refname).exec
Loading
Loading
@@ -102,6 +102,7 @@ describe GitlabProjects do
it "should receive valid cmd" do
valid_cmd = "cd #{tmp_repo_path} && git init --bare"
valid_cmd << " && ln -s #{ROOT_PATH}/hooks/update #{tmp_repo_path}/hooks/"
valid_cmd << " && ln -s #{ROOT_PATH}/hooks/update.gitlab #{tmp_repo_path}/hooks/"
gl_projects.should_receive(:system).with(valid_cmd)
gl_projects.exec
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment