diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 19af40eacb4..6d5f02a1011 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -310,7 +310,7 @@ class ApplicationSetting < ActiveRecord::Base if ChronicDuration.parse(default_artifacts_expire_in).nil? errors.add(:default_artifacts_expire_in, - "can't be 0. Leave it blank for unlimited") + "can't be 0. Leave it blank for no expiration") false else true diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml index f96ddc38af1..3004f32f1f2 100644 --- a/app/views/admin/application_settings/_form.html.haml +++ b/app/views/admin/application_settings/_form.html.haml @@ -220,7 +220,9 @@ = f.text_field :default_artifacts_expire_in, class: 'form-control' .help-block Set the default expiration time for each job's artifacts - = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'default-artifacts-expiration') + = surround '(', ')' do + = link_to 'syntax', help_page_path('ci/yaml/README', anchor: 'artifactsexpire_in') + = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'default-artifacts-expiration-time') - if Gitlab.config.registry.enabled %fieldset diff --git a/doc/user/admin_area/settings/continuous_integration.md b/doc/user/admin_area/settings/continuous_integration.md index 0455881ebf2..295e0adec45 100644 --- a/doc/user/admin_area/settings/continuous_integration.md +++ b/doc/user/admin_area/settings/continuous_integration.md @@ -16,14 +16,14 @@ Note that this setting is set for each job. 1. Hit **Save** for the changes to take effect. -[art-yml]: ../../../administration/build_artifacts.md +[art-yml]: ../../../administration/build_artifacts ## Default artifacts expiration time The default expiration time of the [build artifacts][art-yml] can be set in -the Admin area of your GitLab instance. The value is in *days* and the -default is 30 days. Note that this setting is set for each job. Set it to -0 as never expired by default. +the Admin area of your GitLab instance. The syntax of duration is described +in [artifacts:expire_in][duration-syntax]. The default is `30 days`. Note that +this setting is set for each job. Leave it blank for no default expiration. 1. Go to **Admin area > Settings** (`/admin/application_settings`). @@ -35,4 +35,5 @@ default is 30 days. Note that this setting is set for each job. Set it to 1. Hit **Save** for the changes to take effect. -[art-yml]: ../../../administration/build_artifacts.md +[art-yml]: ../../../administration/build_artifacts +[duration-syntax]: ../../../ci/yaml/README#artifactsexpire_in