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
54c5f4a5
Commit
54c5f4a5
authored
Sep 24, 2019
by
Harish Ramachandran
Committed by
Achilleas Pipinellis
Sep 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get the latest rails cheat sheet
Shorten the commit message Use the original explanation
parent
1a7bfa76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
...dministration/troubleshooting/gitlab_rails_cheat_sheet.md
+6
-4
No files found.
doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
View file @
54c5f4a5
...
@@ -715,13 +715,15 @@ Namespace.find_by_full_path("user/proj").namespace_statistics.update(shared_runn
...
@@ -715,13 +715,15 @@ Namespace.find_by_full_path("user/proj").namespace_statistics.update(shared_runn
project
=
Project
.
find_by_full_path
(
''
)
project
=
Project
.
find_by_full_path
(
''
)
builds_with_artifacts
=
project
.
builds
.
with_artifacts_archive
builds_with_artifacts
=
project
.
builds
.
with_artifacts_archive
# Prior to 10.6 the above line would be:
# builds_with_artifacts = project.builds.with_artifacts
# Instance-wide:
# Instance-wide:
builds_with_artifacts
=
Ci
::
Build
.
with_artifacts
builds_with_artifacts
=
Ci
::
Build
.
with_artifacts_archive
# Prior to 10.6 the above lines would be:
# builds_with_artifacts = project.builds.with_artifacts
# builds_with_artifacts = Ci::Build.with_artifacts
### CLEAR THEM OUT
### CLEAR THEM OUT
# Note that this will also erase artifacts that developers marked to "Keep"
builds_to_clear
=
builds_with_artifacts
.
where
(
"finished_at < ?"
,
1
.
week
.
ago
)
builds_to_clear
=
builds_with_artifacts
.
where
(
"finished_at < ?"
,
1
.
week
.
ago
)
builds_to_clear
.
each
do
|
build
|
builds_to_clear
.
each
do
|
build
|
build
.
artifacts_expire_at
=
Time
.
now
build
.
artifacts_expire_at
=
Time
.
now
...
...
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