diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-05-05 00:02:51 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-06-01 15:39:48 +0300 |
commit | e61f38d79eb85a7c601bd146d5b8e48a8b4418e5 (patch) | |
tree | 08abc6cb3f4ef57de157167fca8189a162298ae1 /lib | |
parent | c72abcefe79dd906cbbf0088b442a8979e9fc746 (diff) |
Fix data inconsistency issue for old artifacts by moving them to a currently used path
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/jobs.rb | 2 | ||||
-rw-r--r-- | lib/api/runner.rb | 2 | ||||
-rw-r--r-- | lib/api/v3/builds.rb | 2 | ||||
-rw-r--r-- | lib/backup/artifacts.rb | 2 | ||||
-rw-r--r-- | lib/ci/api/builds.rb | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/jobs.rb b/lib/api/jobs.rb index 0223957fde1..7f94b1afdc4 100644 --- a/lib/api/jobs.rb +++ b/lib/api/jobs.rb @@ -225,7 +225,7 @@ module API end def present_artifacts!(artifacts_file) - if !artifacts_file.file_storage? + if !artifacts_file.local_file? redirect_to(build.artifacts_file.url) elsif artifacts_file.exists? present_file!(artifacts_file.path, artifacts_file.filename) diff --git a/lib/api/runner.rb b/lib/api/runner.rb index 6fbb02cb3aa..ddcc0429de0 100644 --- a/lib/api/runner.rb +++ b/lib/api/runner.rb @@ -242,7 +242,7 @@ module API job = authenticate_job! artifacts_file = job.artifacts_file - unless artifacts_file.file_storage? + unless artifacts_file.local_file? return redirect_to job.artifacts_file.url end diff --git a/lib/api/v3/builds.rb b/lib/api/v3/builds.rb index 21935922414..7ce7b43e3bd 100644 --- a/lib/api/v3/builds.rb +++ b/lib/api/v3/builds.rb @@ -226,7 +226,7 @@ module API end def present_artifacts!(artifacts_file) - if !artifacts_file.file_storage? + if !artifacts_file.local_file? redirect_to(build.artifacts_file.url) elsif artifacts_file.exists? present_file!(artifacts_file.path, artifacts_file.filename) diff --git a/lib/backup/artifacts.rb b/lib/backup/artifacts.rb index 51fa3867e67..1f4bda6f588 100644 --- a/lib/backup/artifacts.rb +++ b/lib/backup/artifacts.rb @@ -3,7 +3,7 @@ require 'backup/files' module Backup class Artifacts < Files def initialize - super('artifacts', ArtifactUploader.artifacts_path) + super('artifacts', ArtifactUploader.local_artifacts_store) end def create_files_dir diff --git a/lib/ci/api/builds.rb b/lib/ci/api/builds.rb index 67b269b330c..0f2044a54b4 100644 --- a/lib/ci/api/builds.rb +++ b/lib/ci/api/builds.rb @@ -187,7 +187,7 @@ module Ci build = authenticate_build! artifacts_file = build.artifacts_file - unless artifacts_file.file_storage? + unless artifacts_file.local_file? return redirect_to build.artifacts_file.url end |