Skip to content
This repository has been archived by the owner on Apr 1, 2019. It is now read-only.

Commit

Permalink
concourse: adding more rubies to the pr pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed Jan 19, 2019
1 parent 5a5f727 commit cdad799
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 7 deletions.
45 changes: 41 additions & 4 deletions concourse/chromedriver-helper-pr.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
anchors:
notify_failure_to_pr: &notify_failure_to_pr
put: chromedriver-helper-pr
params: {path: chromedriver-helper-pr, status: FAILURE}

resource_types:
- name: pull-request
type: docker-image
Expand Down Expand Up @@ -26,7 +31,6 @@ resources:
ignore_paths:
- concourse/

% ruby_version = RUBIES[:mri].last
jobs:
- name: pr-pending
public: true
Expand All @@ -38,6 +42,7 @@ jobs:
- put: chromedriver-helper-pr
params: {path: chromedriver-helper-pr, status: PENDING}

% RUBIES[:mri].last(2).each do |ruby_version|
- name: ruby-<%= ruby_version %>
public: true
max_in_flight: 1
Expand All @@ -59,9 +64,36 @@ jobs:
path: chromedriver-helper
run:
path: ci/concourse/tasks/rake-test/run.sh
on_failure:
put: chromedriver-helper-pr
params: {path: chromedriver-helper-pr, status: FAILURE}
on_failure: *notify_failure_to_pr
% end

% RUBIES[:jruby].last(1).each do |ruby_version|
- name: jruby-<%= ruby_version %>
public: true
max_in_flight: 1
plan:
- get: ci
- get: chromedriver-helper-pr
trigger: true
version: every
passed: [pr-pending]
- task: rake-test
attempts: 3
config:
platform: linux
image_resource:
type: docker-image
source: {repository: jruby, tag: "<%= ruby_version %>-jdk"}
inputs:
- name: ci
- name: chromedriver-helper-pr
path: chromedriver-helper
params:
JAVA_OPTS: "-Dfile.encoding=UTF8" # https://github.com/docker-library/openjdk/issues/32
run:
path: ci/concourse/tasks/rake-test/run.sh
on_failure: *notify_failure_to_pr
% end

- name: pr-success
public: true
Expand All @@ -71,6 +103,11 @@ jobs:
trigger: true
version: every
passed:
% RUBIES[:mri].last(2).each do |ruby_version|
- ruby-<%= ruby_version %>
% end
% RUBIES[:jruby].last(1).each do |ruby_version|
- jruby-<%= ruby_version %>
% end
- put: chromedriver-helper-pr
params: {path: chromedriver-helper-pr, status: SUCCESS}
59 changes: 56 additions & 3 deletions concourse/chromedriver-helper-pr.yml.generated
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
anchors:
notify_failure_to_pr: &notify_failure_to_pr
put: chromedriver-helper-pr
params: {path: chromedriver-helper-pr, status: FAILURE}

resource_types:
- name: pull-request
type: docker-image
Expand Down Expand Up @@ -37,6 +42,28 @@ jobs:
- put: chromedriver-helper-pr
params: {path: chromedriver-helper-pr, status: PENDING}

- name: ruby-2.5
public: true
max_in_flight: 1
plan:
- get: ci
- get: chromedriver-helper-pr
trigger: true
version: every
passed: [pr-pending]
- task: rake-test
config:
platform: linux
image_resource:
type: docker-image
source: {repository: ruby, tag: "2.5"}
inputs:
- name: ci
- name: chromedriver-helper-pr
path: chromedriver-helper
run:
path: ci/concourse/tasks/rake-test/run.sh
on_failure: *notify_failure_to_pr
- name: ruby-2.6
public: true
max_in_flight: 1
Expand All @@ -58,9 +85,33 @@ jobs:
path: chromedriver-helper
run:
path: ci/concourse/tasks/rake-test/run.sh
on_failure:
put: chromedriver-helper-pr
params: {path: chromedriver-helper-pr, status: FAILURE}
on_failure: *notify_failure_to_pr

- name: jruby-9.2
public: true
max_in_flight: 1
plan:
- get: ci
- get: chromedriver-helper-pr
trigger: true
version: every
passed: [pr-pending]
- task: rake-test
attempts: 3
config:
platform: linux
image_resource:
type: docker-image
source: {repository: jruby, tag: "9.2-jdk"}
inputs:
- name: ci
- name: chromedriver-helper-pr
path: chromedriver-helper
params:
JAVA_OPTS: "-Dfile.encoding=UTF8" # https://github.com/docker-library/openjdk/issues/32
run:
path: ci/concourse/tasks/rake-test/run.sh
on_failure: *notify_failure_to_pr

- name: pr-success
public: true
Expand All @@ -70,6 +121,8 @@ jobs:
trigger: true
version: every
passed:
- ruby-2.5
- ruby-2.6
- jruby-9.2
- put: chromedriver-helper-pr
params: {path: chromedriver-helper-pr, status: SUCCESS}

0 comments on commit cdad799

Please sign in to comment.