diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-06 20:55:50 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-06 20:55:50 +0200 |
commit | e1b88b870f0867a89b834b22246378d1043b7037 (patch) | |
tree | aee4b8cffe231ca9dcf7a3797c5693c58ee13b53 | |
parent | 96aac5e89fd1c9da89e17552dabd9653489f5a0a (diff) | |
download | gitlab-ci-e1b88b870f0867a89b834b22246378d1043b7037.tar.gz |
Up to 1.2.0v1.2.0
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/main.scss | 5 | ||||
-rw-r--r-- | app/models/project.rb | 4 | ||||
-rw-r--r-- | app/views/projects/_form.html.haml | 8 | ||||
-rw-r--r-- | app/views/projects/details.html.haml | 22 | ||||
-rw-r--r-- | app/views/projects/index.html.haml | 1 | ||||
-rw-r--r-- | app/views/projects/show.html.haml | 2 | ||||
-rw-r--r-- | resque.sh | 3 |
9 files changed, 38 insertions, 12 deletions
@@ -1,3 +1,6 @@ +v1.2.0 + - Added Github web hook support + - Added build schedule v1.1.0 - Added JSON response for builds status - Compatible with GitLab v4.0.0 @@ -1 +1 @@ -1.1.0 +1.2.0 diff --git a/app/assets/stylesheets/main.scss b/app/assets/stylesheets/main.scss index 5c24ad5..d979718 100644 --- a/app/assets/stylesheets/main.scss +++ b/app/assets/stylesheets/main.scss @@ -202,3 +202,8 @@ fieldset { .lead { font-size: 18px; } + +h3 { + font-weight: normal; + color: #666; +} diff --git a/app/models/project.rb b/app/models/project.rb index 58bdb43..8384243 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -13,7 +13,7 @@ class Project < ActiveRecord::Base validates_uniqueness_of :name validates :polling_interval, - format: { with: /^[1-9]\d{0,7}[s|m|d]$/ }, + format: { with: /^[1-9]\d{0,7}[m|h|d]$/ }, if: ->(project) { project.polling_interval.present? } before_validation :set_default_values @@ -123,7 +123,7 @@ class Project < ActiveRecord::Base end def set_scheduler - if self.polling_interval.present? + if self.always_build && self.polling_interval.present? Resque.set_schedule(self.schedule_id, { :class => 'SchedulerJob', every: self.polling_interval, diff --git a/app/views/projects/_form.html.haml b/app/views/projects/_form.html.haml index 0ef27b2..08f3616 100644 --- a/app/views/projects/_form.html.haml +++ b/app/views/projects/_form.html.haml @@ -55,8 +55,12 @@ %br .field = f.label :polling_interval, "Build interval" - = f.text_field :polling_interval, placeholder: '30m' - %small Ex. 30m means every 30 minutes and 2d - every two days + = f.text_field :polling_interval, placeholder: '5h' + %ul + %li m - minutes + %li h - hours + %li d - days + %p Ex. 30m means every 30 minutes and 2d - every two days .form-actions = f.submit 'Save', class: 'btn btn-primary' = link_to 'Cancel', projects_path, class: 'btn' diff --git a/app/views/projects/details.html.haml b/app/views/projects/details.html.haml index 15ad9fd..7aee2de 100644 --- a/app/views/projects/details.html.haml +++ b/app/views/projects/details.html.haml @@ -10,16 +10,15 @@ Edit - -%br -%p.lead Copy provided setting to your GitLab instance for close integration +%p.lead Integration with GitLab and other services %form.form-horizontal %fieldset %legend GitLab 3.1+ + %small build on push, integration with Merge Requests, links to GitLab instance .right - Copy to GitLab → Project → Services + %small Copy to GitLab → Project → Services .control-group = label_tag :url, 'Project URL', class: 'control-label' @@ -34,11 +33,24 @@ %fieldset %legend GitLab 3.0 and earlier + %small build on push, links to GitLab commits .right - Copy to GitLab → Project → Web Hooks + %small Copy to GitLab → Project → Web Hooks .control-group = label_tag :hook_url, 'HTTP POST Hook url', class: 'control-label' .controls = text_field_tag :url, build_project_url(@project, token: @project.token), class: 'input-xxlarge', readonly: true %p.hint Copy this link and add to GitLab web hooks + %fieldset + %legend + github + %small build on push + .right + %small Copy to github → Project → Service Hooks → Web Hooks + .control-group + = label_tag :hook_url, 'HTTP POST Hook url', class: 'control-label' + .controls + = text_field_tag :url, build_project_url(@project, token: @project.token), class: 'input-xxlarge', readonly: true + %p.hint Copy this link and add to github web hooks + diff --git a/app/views/projects/index.html.haml b/app/views/projects/index.html.haml index 5615c12..c6df3b5 100644 --- a/app/views/projects/index.html.haml +++ b/app/views/projects/index.html.haml @@ -1,5 +1,4 @@ %h3 Projects -%br - @projects.each do |project| .project_box .title diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 6ca4c0e..0eb0915 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -5,7 +5,7 @@ .right = link_to details_project_path(@project), class: 'btn btn-small' do Details - + = link_to edit_project_path(@project), class: 'btn btn-small' do %i.icon-edit.icon-white Edit diff --git a/resque.sh b/resque.sh new file mode 100644 index 0000000..9fa1f8e --- /dev/null +++ b/resque.sh @@ -0,0 +1,3 @@ +mkdir -p tmp/pids +nohup bundle exec rake environment resque:work QUEUE=runner,scheduler_task RAILS_ENV=production PIDFILE=tmp/pids/resque_worker.pid > ./log/resque.log & +nohup bundle exec rake environment resque:scheduler RAILS_ENV=production PIDFILE=tmp/pids/resque_schedule.pid > ./log/schedule.log & |