summaryrefslogtreecommitdiff
path: root/app/services/projects
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-04-27 18:30:52 +0100
committerNick Thomas <nick@gitlab.com>2018-04-27 18:37:49 +0100
commitad113a3cf803f95950be1a2af12eb3ad6f512ecd (patch)
tree4e484d0ecd110c6f2fa98cc6bedc9853aa4743ed /app/services/projects
parent4de3bc5f93e016f1d84f43c0e27d8d2c6d82ddb0 (diff)
downloadgitlab-ce-ad113a3cf803f95950be1a2af12eb3ad6f512ecd.tar.gz
Don't automatically remove artifacts for pages jobs after pages:deploy has run
Diffstat (limited to 'app/services/projects')
-rw-r--r--app/services/projects/update_pages_service.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/app/services/projects/update_pages_service.rb b/app/services/projects/update_pages_service.rb
index de77f6bf585..bc3eae36574 100644
--- a/app/services/projects/update_pages_service.rb
+++ b/app/services/projects/update_pages_service.rb
@@ -40,7 +40,7 @@ module Projects
rescue InvaildStateError => e
error(e.message)
rescue => e
- error(e.message, false)
+ error(e.message)
raise e
end
@@ -48,17 +48,15 @@ module Projects
def success
@status.success
- delete_artifact!
super
end
- def error(message, allow_delete_artifact = true)
+ def error(message)
register_failure
log_error("Projects::UpdatePagesService: #{message}")
@status.allow_failure = !latest?
@status.description = message
@status.drop(:script_failure)
- delete_artifact! if allow_delete_artifact
super
end
@@ -162,11 +160,6 @@ module Projects
build.artifacts_file.path
end
- def delete_artifact!
- build.reload # Reload stable object to prevent erase artifacts with old state
- build.erase_artifacts! unless build.has_expiring_artifacts?
- end
-
def latest_sha
project.commit(build.ref).try(:sha).to_s
ensure