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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
007ac501
Commit
007ac501
authored
Jul 04, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use current_head to avoid missing branch.
See:
https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/79125195
parent
7dbdc0ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
scripts/ee_specific_check/ee_specific_check.rb
scripts/ee_specific_check/ee_specific_check.rb
+7
-2
No files found.
scripts/ee_specific_check/ee_specific_check.rb
View file @
007ac501
...
...
@@ -193,8 +193,9 @@ module EESpecificCheck
end
def
with_detached_head
(
target_head
)
# So that we could switch back
head
=
current_branch
# So that we could switch back. CI sometimes doesn't have the branch,
# so we don't use current_branch here
head
=
current_head
# Use detached HEAD so that we don't update HEAD
run_git_command
(
"checkout -f
#{
target_head
}
"
)
...
...
@@ -263,6 +264,10 @@ module EESpecificCheck
@ce_repo_url
||=
ENV
.
fetch
(
'CI_REPOSITORY_URL'
,
'https://gitlab.com/gitlab-org/gitlab-ce.git'
).
sub
(
'gitlab-ee'
,
'gitlab-ce'
)
end
def
current_head
@current_head
||=
ENV
.
fetch
(
'CI_COMMIT_SHA'
,
current_branch
)
end
def
current_branch
@current_branch
||=
ENV
.
fetch
(
'CI_COMMIT_REF_NAME'
,
`git rev-parse --abbrev-ref HEAD`
).
strip
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