summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-09-19 18:55:15 +0900
committerShinya Maeda <shinya@gitlab.com>2018-09-19 18:55:15 +0900
commit9acdb28b4cf6bf782ada391f015e936be13ca37c (patch)
tree45f639f333b5cbdd8c5ca9da282b714fad3d5dd6
parent2dac058de25dc6ed03d0ed6f8b099aa17cdc1cab (diff)
downloadgitlab-ce-add-feature-flag-to-drop-support-legacy-artifacts.tar.gz
Add feature flag to drop support of legacy artifactsadd-feature-flag-to-drop-support-legacy-artifacts
-rw-r--r--app/models/concerns/artifact_migratable.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/concerns/artifact_migratable.rb b/app/models/concerns/artifact_migratable.rb
index cbd63ba8876..fe60d1dc39b 100644
--- a/app/models/concerns/artifact_migratable.rb
+++ b/app/models/concerns/artifact_migratable.rb
@@ -5,7 +5,8 @@
# Meant to be prepended so the interface can stay the same
module ArtifactMigratable
def artifacts_file
- job_artifacts_archive&.file || legacy_artifacts_file
+ job_artifacts_archive&.file ||
+ (Feature.disabled?('ci_drop_support_legacy_artifacts') && legacy_artifacts_file)
end
def artifacts_metadata
@@ -21,7 +22,8 @@ module ArtifactMigratable
end
def artifacts_file_changed?
- job_artifacts_archive&.file_changed? || attribute_changed?(:artifacts_file)
+ job_artifacts_archive&.file_changed? ||
+ (Feature.disabled?('ci_drop_support_legacy_artifacts') && attribute_changed?(:artifacts_file))
end
def remove_artifacts_file!