diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-07-10 14:56:09 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-07-10 16:04:35 +0200 |
commit | efdf54f25a83462a750cacd4ea7919c7d38e67d1 (patch) | |
tree | e1823788941ac74352446c065a26b79eb22f985d /app/views | |
parent | d841ed56d39db1b33947b9b9c0291beaa7dcdd43 (diff) | |
download | gitlab-ci-efdf54f25a83462a750cacd4ea7919c7d38e67d1.tar.gz |
Allow to specify flexible list of types in yaml
```
types:
- test
- deploy
- notify
rspec:
script: "rspec"
rubocop:
script: "rubocop"
staging:
type: deploy
script: "echo deploy"
only:
- master
production:
type: deploy
script: "echo production"
only:
- tags
dockerhub:
type: notify
script: "curl http://docker/hub/web/hook"
downstream:
type: notify
script: "curl http://build/downstream/jobs"
```
This will trigger two test jobs in parallel, when finished it will trigged either staging or production, when finished it will trigger dockerhub and downstream in parallel.
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/builds/_build.html.haml | 10 | ||||
-rw-r--r-- | app/views/commits/_commit.html.haml | 4 | ||||
-rw-r--r-- | app/views/commits/show.html.haml | 4 | ||||
-rw-r--r-- | app/views/lints/_create.html.haml | 48 |
4 files changed, 25 insertions, 41 deletions
diff --git a/app/views/builds/_build.html.haml b/app/views/builds/_build.html.haml index f2a340d..598f734 100644 --- a/app/views/builds/_build.html.haml +++ b/app/views/builds/_build.html.haml @@ -7,14 +7,8 @@ %strong Build ##{build.id} %td - - if build.commit.tag? - Tag - · - #{build.ref} - - else - Commit - · - #{build.short_sha} + = build.job_type + %td = build.name .pull-right diff --git a/app/views/commits/_commit.html.haml b/app/views/commits/_commit.html.haml index e5068d2..7fae74e 100644 --- a/app/views/commits/_commit.html.haml +++ b/app/views/commits/_commit.html.haml @@ -1,6 +1,10 @@ %tr.build.alert{class: commit_status_alert_class(commit)} %td.status = commit.status + - if commit.running? + · + = commit.job_type + %td.build-link = link_to project_ref_commit_path(commit.project, commit.ref, commit.sha) do diff --git a/app/views/commits/show.html.haml b/app/views/commits/show.html.haml index b1b586c..5925b9d 100644 --- a/app/views/commits/show.html.haml +++ b/app/views/commits/show.html.haml @@ -68,7 +68,7 @@ %tr %th Status %th Build ID - %th Trigger + %th Type %th Name %th Duration %th Finished at @@ -86,7 +86,7 @@ %tr %th Status %th Build ID - %th Trigger + %th Type %th Name %th Duration %th Finished at diff --git a/app/views/lints/_create.html.haml b/app/views/lints/_create.html.haml index 70b6f8c..f82b406 100644 --- a/app/views/lints/_create.html.haml +++ b/app/views/lints/_create.html.haml @@ -10,37 +10,23 @@ %th Parameter %th Value %tbody - - @builds.each do |build| - %tr - %td Job - #{build[:name]} - %td - %pre - = simple_format build[:script] - - %b Tag list: - = build[:tags] - %br - %b Refs only: - = build[:only] && build[:only].join(", ") - %br - %b Refs except: - = build[:except] && build[:except].join(", ") + - @types.each do |type| + - @builds.select { |build| build[:type] == type }.each do |build| + %tr + %td #{type.capitalize} Job - #{build[:name]} + %td + %pre + = simple_format build[:script] - - @deploy_builds.each do |build| - %tr - %td Deploy Job - #{build[:name]} - %td - %pre - = simple_format build[:script] - - %b Tag list: - = build[:tags] - %br - %b Refs only: - = build[:only] && build[:only].join(", ") - %br - %b Refs except: - = build[:except] && build[:except].join(", ") + %br + %b Tag list: + = build[:tags] + %br + %b Refs only: + = build[:only] && build[:only].join(", ") + %br + %b Refs except: + = build[:except] && build[:except].join(", ") -else %p @@ -49,5 +35,5 @@ %i.icon-remove.incorrect-syntax %b Error: = @error - +
\ No newline at end of file |