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
9b874a3b
Commit
9b874a3b
authored
May 18, 2020
by
Harish Ramachandran
Committed by
Marcel Amirault
May 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed a duplicate script from the docs
parent
941621b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
23 deletions
+1
-23
doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
...dministration/troubleshooting/gitlab_rails_cheat_sheet.md
+1
-23
No files found.
doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
View file @
9b874a3b
...
...
@@ -572,29 +572,7 @@ Ci::Pipeline.where(project_id: p.id).where(status: 'pending').count
### Remove artifacts more than a week old
The Latest version of these steps can be found in the
[
job artifacts documentation
](
../job_artifacts.md
)
```
ruby
### SELECTING THE BUILDS TO CLEAR
# For a single project:
project
=
Project
.
find_by_full_path
(
''
)
builds_with_artifacts
=
project
.
builds
.
with_downloadable_artifacts
# Instance-wide:
builds_with_artifacts
=
Ci
::
Build
.
with_downloadable_artifacts
# 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
# 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
.
each
do
|
build
|
build
.
artifacts_expire_at
=
Time
.
now
build
.
erase_erasable_artifacts!
end
```
This section has been moved to the
[
job artifacts troubleshooting documentation
](
../job_artifacts.md#delete-job-artifacts-from-jobs-completed-before-a-specific-date
)
.
### Find reason failure (for when build trace is empty) (Introduced in 10.3.0)
...
...
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