Skip to content

Commit

Permalink
Improve setup CI instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
dzaporozhets committed Jan 24, 2015
1 parent e2dff01 commit 23eb274
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
7 changes: 7 additions & 0 deletions app/assets/stylesheets/generic/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,10 @@
font-weight: normal;
line-height: 1.4;
}

.help-callout {
li {
font-size: 15px;
line-height: 1.6;
}
}
4 changes: 4 additions & 0 deletions app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,8 @@ def execute_services(data)
end
end
end

def setup_finished?
commits.any?
end
end
3 changes: 1 addition & 2 deletions app/views/projects/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
= render 'shared/guide' if params[:show_guide].present?

= render 'shared/guide' unless @project.setup_finished?

%ul.nav.nav-tabs.append-bottom-20
%li{class: ref_tab_class}
Expand Down
19 changes: 12 additions & 7 deletions app/views/shared/_guide.html.haml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
.alert.alert-success
%h4
Project sucessfully added to GitLab CI!
%br
%p Its only 2 steps left:
.bs-callout.help-callout
%h4 How to setup CI for this project

%ol
%li
Visit #{link_to 'GitLab project settings', @project.gitlab_url + "/services/gitlab_ci/edit", target: :blank} and press "Test settings" button to confirm everything is working.
Add at least one runner to the project.
Go to #{link_to 'Runners page', project_runners_path(@project), target: :blank} for instructions.
%li
Customize script section to run own test command #{link_to 'here', edit_project_path(@project), target: :blank}
Setup at least one Job with a build script.
Go to #{link_to 'Jobs page', project_jobs_path(@project), target: :blank} for instructions.
%li
Visit #{link_to 'GitLab project settings', @project.gitlab_url + "/services/gitlab_ci/edit", target: :blank}
and press the "Test settings" button.
%li
Return to this page and refresh it, it should show a new build.

0 comments on commit 23eb274

Please sign in to comment.