Sha256: 099b61140cdef1f90ff632a8ddd34d7a4cd2bd58a68bce884dfc7f8c091e6b2c

Contents?: true

Size: 1.36 KB

Versions: 1

Compression:

Stored size: 1.36 KB

Contents

token "token"

target "jenkins" do
  hook_type [:push, :pull_request]
  url "http://targethost.dev/job/JobName"
  http_method :post

  parameter_type :query
  params key1: "value1", key2: "value2"

  match ->(event) {
    event.ref =~ /master/
  }
end

target "jenkins2" do
  hook_type [:push, :pull_request]
  url "http://targethost.dev/job/JobName"
  http_method :post

  parameter_type :json
  params key1: "value1", key2: "value2"

  match ->(event) {
    event.ref =~ /json_params/
  }
end

target "block params" do

  hook_type [:push, :pull_request]
  url "http://targethost.dev/job/JobName"
  http_method :post

  parameter_type :query
  params ->(event) { {ref: event.ref, head_commit_id: event.head_commit.id} }

  match ->(event) {
    event.ref =~ /block_parameters/
  }
end

target "basic auth" do
  hook_type [:push, :pull_request]
  url "http://targethost.dev/job/JobName"
  http_method :post

  username "username_sample"
  password "password_sample"

  parameter_type :query
  params key1: "value1", key2: "value2"

  match ->(event) {
    event.ref =~ /basic_auth/
  }
end

target "always" do
  hook_type [:push, :pull_request]
  url "http://targethost.dev/job/JobName"
  http_method :post

  params always: "true"
end

target "never" do
  hook_type [:push, :pull_request]
  url "http://targethost.dev/job/JobName"
  http_method :post

  params never: "true"
  match false
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
octogate-0.1.0 spec/config_sample.rb