Sha256: 35a7e787db7fdafbe3999b8fd0349102497a2ad03488a2d623e024fcdf4ba3a0
Contents?: true
Size: 817 Bytes
Versions: 58
Compression:
Stored size: 817 Bytes
Contents
# frozen_string_literal: true module Buildkite module Pipelines module Helpers module SoftFail def soft_fail(*value) # soft_fail can be an array of exit_statuses or true # https://buildkite.com/docs/pipelines/command-step#soft-fail-attributes if value.first == true current = get('soft_fail') if current.is_a?(Array) raise ArgumentError, "Cannot set soft_fail to true when it's already an array.\nsoft_fail: #{current}" else set('soft_fail', true) end else super end end def soft_fail_on_status(*statuses) statuses.each do |status| soft_fail(exit_status: status) end end end end end end
Version data entries
58 entries across 58 versions & 1 rubygems