Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
omnibus-heptapod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
heptapod
omnibus-heptapod
Commits
5e7ef007
Commit
5e7ef007
authored
4 years ago
by
Robert Speicher
Browse files
Options
Downloads
Patches
Plain Diff
Add section, section_start and section_end helpers
parent
1b542f8f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!24
Bumping heptapod-stable for 0.19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/gitlab/util.rb
+21
-0
21 additions, 0 deletions
lib/gitlab/util.rb
with
21 additions
and
0 deletions
lib/gitlab/util.rb
+
21
−
0
View file @
5e7ef007
...
...
@@ -12,6 +12,27 @@
def
set_env_if_missing
(
key
,
value
)
ENV
[
key
]
||=
value
&
.
strip
end
def
section
(
name
,
description
=
name
,
&
block
)
section_start
(
name
,
description
)
yield
section_end
(
name
)
end
def
section_start
(
name
,
description
=
name
)
return
unless
ENV
[
'CI'
]
@section_name
=
name
$stdout
.
puts
"section_start:
#{
Time
.
now
.
to_i
}
:
#{
name
}
\r\e
[0K
#{
description
}
"
end
def
section_end
(
name
=
@section_name
)
return
unless
ENV
[
'CI'
]
$stdout
.
puts
"section_end:
#{
Time
.
now
.
to_i
}
:
#{
name
}
\r\e
[0K"
end
end
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment