Commit 442efb7a authored by Rémy Coutable's avatar Rémy Coutable

Resolve conflicts

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 6dee8b41
...@@ -77,17 +77,15 @@ class ApplicationSetting < ActiveRecord::Base ...@@ -77,17 +77,15 @@ class ApplicationSetting < ActiveRecord::Base
presence: true, presence: true,
numericality: { only_integer: true, greater_than: 0 } numericality: { only_integer: true, greater_than: 0 }
<<<<<<< HEAD
validates :repository_size_limit, validates :repository_size_limit,
presence: true, presence: true,
numericality: { only_integer: true, greater_than_or_equal_to: 0 } numericality: { only_integer: true, greater_than_or_equal_to: 0 }
=======
validates :max_artifacts_size, validates :max_artifacts_size,
presence: true, presence: true,
numericality: { only_integer: true, greater_than: 0 } numericality: { only_integer: true, greater_than: 0 }
validates :default_artifacts_expire_in, presence: true, duration: true validates :default_artifacts_expire_in, presence: true, duration: true
>>>>>>> ce/master
validates :container_registry_token_expire_delay, validates :container_registry_token_expire_delay,
presence: true, presence: true,
...@@ -252,7 +250,14 @@ class ApplicationSetting < ActiveRecord::Base ...@@ -252,7 +250,14 @@ class ApplicationSetting < ActiveRecord::Base
create(defaults) create(defaults)
end end
<<<<<<< HEAD def self.human_attribute_name(attr, _options = {})
if attr == :default_artifacts_expire_in
'Default artifacts expiration'
else
super
end
end
def update_mirror_cron_jobs def update_mirror_cron_jobs
Project.mirror.where('sync_time < ?', minimum_mirror_sync_time) Project.mirror.where('sync_time < ?', minimum_mirror_sync_time)
.update_all(sync_time: minimum_mirror_sync_time) .update_all(sync_time: minimum_mirror_sync_time)
...@@ -264,14 +269,6 @@ class ApplicationSetting < ActiveRecord::Base ...@@ -264,14 +269,6 @@ class ApplicationSetting < ActiveRecord::Base
def elasticsearch_host def elasticsearch_host
read_attribute(:elasticsearch_host).split(',').map(&:strip) read_attribute(:elasticsearch_host).split(',').map(&:strip)
=======
def self.human_attribute_name(attr, _options = {})
if attr == :default_artifacts_expire_in
'Default artifacts expiration'
else
super
end
>>>>>>> ce/master
end end
def home_page_url_column_exist def home_page_url_column_exist
......
...@@ -120,11 +120,8 @@ ActiveRecord::Schema.define(version: 20170216141440) do ...@@ -120,11 +120,8 @@ ActiveRecord::Schema.define(version: 20170216141440) do
t.integer "shared_runners_minutes", default: 0, null: false t.integer "shared_runners_minutes", default: 0, null: false
t.integer "repository_size_limit", limit: 8, default: 0 t.integer "repository_size_limit", limit: 8, default: 0
t.integer "terminal_max_session_time", default: 0, null: false t.integer "terminal_max_session_time", default: 0, null: false
<<<<<<< HEAD
t.integer "minimum_mirror_sync_time", default: 15, null: false t.integer "minimum_mirror_sync_time", default: 15, null: false
=======
t.string "default_artifacts_expire_in", default: '0', null: false t.string "default_artifacts_expire_in", default: '0', null: false
>>>>>>> ce/master
end end
create_table "approvals", force: :cascade do |t| create_table "approvals", force: :cascade do |t|
......
...@@ -16,7 +16,27 @@ that this setting is set for each job. ...@@ -16,7 +16,27 @@ that this setting is set for each job.
1. Hit **Save** for the changes to take effect. 1. Hit **Save** for the changes to take effect.
<<<<<<< HEAD ## Default artifacts expiration
The default expiration time of the [job artifacts][art-yml] can be set in
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. Set it to 0 if you don't want default
expiration.
1. Go to **Admin area > Settings** (`/admin/application_settings`).
![Admin area settings button](img/admin_area_settings_button.png)
1. Change the value of default expiration time ([syntax][duration-syntax]):
![Admin area default artifacts expiration](img/admin_area_default_artifacts_expiration.png)
1. Hit **Save** for the changes to take effect.
[art-yml]: ../../../administration/job_artifacts.md
[duration-syntax]: ../../../ci/yaml/README.md#artifactsexpire_in
## Shared Runners build minutes quota ## Shared Runners build minutes quota
> [Introduced][ee-1078] in GitLab Enterprise Edition 8.16. > [Introduced][ee-1078] in GitLab Enterprise Edition 8.16.
...@@ -73,25 +93,3 @@ the group. ...@@ -73,25 +93,3 @@ the group.
[art-yml]: ../../../administration/job_artifacts.md [art-yml]: ../../../administration/job_artifacts.md
[ee-1078]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1078 [ee-1078]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1078
=======
## Default artifacts expiration
The default expiration time of the [job artifacts][art-yml] can be set in
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. Set it to 0 if you don't want default
expiration.
1. Go to **Admin area > Settings** (`/admin/application_settings`).
![Admin area settings button](img/admin_area_settings_button.png)
1. Change the value of default expiration time ([syntax][duration-syntax]):
![Admin area default artifacts expiration](img/admin_area_default_artifacts_expiration.png)
1. Hit **Save** for the changes to take effect.
[art-yml]: ../../../administration/job_artifacts.md
[duration-syntax]: ../../../ci/yaml/README.md#artifactsexpire_in
>>>>>>> ce/master
...@@ -386,17 +386,7 @@ describe Projects::MergeRequestsController do ...@@ -386,17 +386,7 @@ describe Projects::MergeRequestsController do
end end
it 'closes MR without errors' do it 'closes MR without errors' do
<<<<<<< HEAD
update_merge_request(state_event: 'close') update_merge_request(state_event: 'close')
=======
post :update,
namespace_id: project.namespace,
project_id: project,
id: merge_request.iid,
merge_request: {
state_event: 'close'
}
>>>>>>> ce/master
expect(response).to redirect_to([merge_request.target_project.namespace.becomes(Namespace), merge_request.target_project, merge_request]) expect(response).to redirect_to([merge_request.target_project.namespace.becomes(Namespace), merge_request.target_project, merge_request])
expect(merge_request.reload.closed?).to be_truthy expect(merge_request.reload.closed?).to be_truthy
......
...@@ -210,15 +210,12 @@ describe User, models: true do ...@@ -210,15 +210,12 @@ describe User, models: true do
end end
end end
<<<<<<< HEAD
it 'does not allow a user to be both an auditor and an admin' do it 'does not allow a user to be both an auditor and an admin' do
user = build(:user, :admin, :auditor) user = build(:user, :admin, :auditor)
expect(user).to be_invalid expect(user).to be_invalid
end end
=======
>>>>>>> ce/master
describe 'ghost users' do describe 'ghost users' do
it 'does not allow a non-blocked ghost user' do it 'does not allow a non-blocked ghost user' do
user = build(:user, :ghost) user = build(:user, :ghost)
...@@ -234,7 +231,6 @@ describe User, models: true do ...@@ -234,7 +231,6 @@ describe User, models: true do
expect(user).to be_valid expect(user).to be_valid
end end
end end
<<<<<<< HEAD
end end
describe "non_ldap" do describe "non_ldap" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment