Sha256: ed02edf49bc000231c8cb9fc8cea34fa6708697c78956e6f31fb8f1509af587c

Contents?: true

Size: 673 Bytes

Versions: 10

Compression:

Stored size: 673 Bytes

Contents

# https://docs.semaphoreci.com/article/12-environment-variables
module KnapsackPro
  module Config
    module CI
      class Semaphore2 < Base
        def node_total
          # not provided
        end

        def node_index
          # not provided
        end

        def node_build_id
          ENV['SEMAPHORE_WORKFLOW_ID']
        end

        def commit_hash
          ENV['SEMAPHORE_GIT_SHA']
        end

        def branch
          ENV['SEMAPHORE_GIT_BRANCH']
        end

        def project_dir
          if ENV['HOME'] && ENV['SEMAPHORE_GIT_DIR']
            "#{ENV['HOME']}/#{ENV['SEMAPHORE_GIT_DIR']}"
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
knapsack_pro-1.12.1 lib/knapsack_pro/config/ci/semaphore2.rb
knapsack_pro-1.12.0 lib/knapsack_pro/config/ci/semaphore2.rb
knapsack_pro-1.11.0 lib/knapsack_pro/config/ci/semaphore2.rb
knapsack_pro-1.10.1 lib/knapsack_pro/config/ci/semaphore2.rb
knapsack_pro-1.10.0 lib/knapsack_pro/config/ci/semaphore2.rb
knapsack_pro-1.9.0 lib/knapsack_pro/config/ci/semaphore2.rb
knapsack_pro-1.8.0 lib/knapsack_pro/config/ci/semaphore2.rb
knapsack_pro-1.7.0 lib/knapsack_pro/config/ci/semaphore2.rb
knapsack_pro-1.6.0 lib/knapsack_pro/config/ci/semaphore2.rb
knapsack_pro-1.5.0 lib/knapsack_pro/config/ci/semaphore2.rb