diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-09-28 10:14:53 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-09-28 10:14:53 +0200 |
commit | 92f8e0fd7e1d39fb14b5a1849971ad74abf1280d (patch) | |
tree | ae4bc524f707a95df9cadb7c1f07cb9f2f9b1726 | |
parent | b328c76c063cfe3082316e4273cfd318bbbfe69b (diff) | |
download | gitlab-ce-92f8e0fd7e1d39fb14b5a1849971ad74abf1280d.tar.gz |
Finish move of runners page to project settings
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/views/ci/projects/show.html.haml | 2 | ||||
-rw-r--r-- | app/views/ci/shared/_guide.html.haml | 2 | ||||
-rw-r--r-- | spec/features/ci/runners_spec.rb | 96 |
4 files changed, 3 insertions, 98 deletions
diff --git a/CHANGELOG b/CHANGELOG index 8ff61cd6e9f..7c7e41db163 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -12,6 +12,7 @@ v 8.1.0 (unreleased) - Show CI status on Your projects page and Starred projects page - Remove "Continuous Integration" page from dashboard - Add notes and SSL verification entries to hook APIs (Ben Boeckel) + - Move CI runners page to project settings area v 8.0.2 (unreleased) - Fix default avatar not rendering in network graph (Stan Hu) diff --git a/app/views/ci/projects/show.html.haml b/app/views/ci/projects/show.html.haml index 6443378af99..73e60795ba6 100644 --- a/app/views/ci/projects/show.html.haml +++ b/app/views/ci/projects/show.html.haml @@ -3,7 +3,7 @@ - if current_user && can?(current_user, :manage_project, gl_project) && !@project.any_runners? .alert.alert-danger Builds for this project wont be served unless you configure runners on - = link_to "Runners page", ci_project_runners_path(@project) + = link_to "Runners page", runners_path(@project.gl_project) %ul.nav.nav-tabs.append-bottom-20 %li{class: ref_tab_class} diff --git a/app/views/ci/shared/_guide.html.haml b/app/views/ci/shared/_guide.html.haml index 8a42f29b77c..db2d7f2f4b6 100644 --- a/app/views/ci/shared/_guide.html.haml +++ b/app/views/ci/shared/_guide.html.haml @@ -4,7 +4,7 @@ %ol %li Add at least one runner to the project. - Go to #{link_to 'Runners page', ci_project_runners_path(@project), target: :blank} for instructions. + Go to #{link_to 'Runners page', runners_path(@project.gl_project), target: :blank} for instructions. %li Put the .gitlab-ci.yml in the root of your repository. Examples can be found in #{link_to "Configuring project (.gitlab-ci.yml)", "http://doc.gitlab.com/ci/yaml/README.html", target: :blank}. You can also test your .gitlab-ci.yml in the #{link_to "Lint", ci_lint_path} diff --git a/spec/features/ci/runners_spec.rb b/spec/features/ci/runners_spec.rb deleted file mode 100644 index 15147f15eb3..00000000000 --- a/spec/features/ci/runners_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -require 'spec_helper' - -describe "Runners" do - let(:user) { create(:user) } - - before do - login_as(user) - end - - describe "specific runners" do - before do - @project = FactoryGirl.create :ci_project - @project.gl_project.team << [user, :master] - - @project2 = FactoryGirl.create :ci_project - @project2.gl_project.team << [user, :master] - - @shared_runner = FactoryGirl.create :ci_shared_runner - @specific_runner = FactoryGirl.create :ci_specific_runner - @specific_runner2 = FactoryGirl.create :ci_specific_runner - @project.runners << @specific_runner - @project2.runners << @specific_runner2 - end - - it "places runners in right places" do - visit ci_project_runners_path(@project) - expect(page.find(".available-specific-runners")).to have_content(@specific_runner2.display_name) - expect(page.find(".activated-specific-runners")).to have_content(@specific_runner.display_name) - expect(page.find(".available-shared-runners")).to have_content(@shared_runner.display_name) - end - - it "enables specific runner for project" do - visit ci_project_runners_path(@project) - - within ".available-specific-runners" do - click_on "Enable for this project" - end - - expect(page.find(".activated-specific-runners")).to have_content(@specific_runner2.display_name) - end - - it "disables specific runner for project" do - @project2.runners << @specific_runner - - visit ci_project_runners_path(@project) - - within ".activated-specific-runners" do - click_on "Disable for this project" - end - - expect(page.find(".available-specific-runners")).to have_content(@specific_runner.display_name) - end - - it "removes specific runner for project if this is last project for that runners" do - visit ci_project_runners_path(@project) - - within ".activated-specific-runners" do - click_on "Remove runner" - end - - expect(Ci::Runner.exists?(id: @specific_runner)).to be_falsey - end - end - - describe "shared runners" do - before do - @project = FactoryGirl.create :ci_project - @project.gl_project.team << [user, :master] - end - - it "enables shared runners" do - visit ci_project_runners_path(@project) - - click_on "Enable shared runners" - - expect(@project.reload.shared_runners_enabled).to be_truthy - end - end - - describe "show page" do - before do - @project = FactoryGirl.create :ci_project - @project.gl_project.team << [user, :master] - @specific_runner = FactoryGirl.create :ci_specific_runner - @project.runners << @specific_runner - end - - it "shows runner information" do - visit ci_project_runners_path(@project) - - click_on @specific_runner.short_sha - - expect(page).to have_content(@specific_runner.platform) - end - end -end |