Sha256: 8c1897912e961305f71988b493fe83f1c5b2bd961e8a979d8d63a7663b4ee3c6
Contents?: true
Size: 746 Bytes
Versions: 19
Compression:
Stored size: 746 Bytes
Contents
module KnapsackPro module Config module CI class SnapCI < Base def node_total ENV['SNAP_WORKER_TOTAL'] end def node_index index = ENV['SNAP_WORKER_INDEX'] index.to_i - 1 if index end def commit_hash ENV['SNAP_COMMIT'] end # https://docs.snap-ci.com/environment-variables/ # SNAP_BRANCH - the name of the git branch (not present on pull requests) # SNAP_UPSTREAM_BRANCH - the upstream branch for which the pull request was opened def branch ENV['SNAP_BRANCH'] || ENV['SNAP_UPSTREAM_BRANCH'] end def project_dir ENV['SNAP_WORKING_DIR'] end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems