Sha256: b1a6e36f82efa8169b7e730243fa88b47dfed7aa08b990e7cc40d4ad02ba9748

Contents?: true

Size: 762 Bytes

Versions: 12

Compression:

Stored size: 762 Bytes

Contents

class KuberKit::Core::Artifacts::Git < KuberKit::Core::Artifacts::AbstractArtifact
  attr_reader :remote_url, :remote_name, :email, :password, :branch, :ssh_key

  DEFAULT_SSH_KEY = "id_rsa"
  DEFAULT_REMOTE_NAME = "origin"
  DEFAULT_BRANCH = "master"

  def setup(remote_url:, remote_name: DEFAULT_REMOTE_NAME, branch: DEFAULT_BRANCH, clone_path: nil, ssh_key: DEFAULT_SSH_KEY)
    @remote_name = remote_name
    @remote_url = remote_url
    @branch = branch
    @clone_path = clone_path
    @ssh_key = ssh_key
    self
  end

  def cloned_path
    # TODO: We should refactor to not call container here
    configs = KuberKit::Container['configs']
    "#{configs.artifact_clone_dir}/#{name}"
  end

  def sync_description
    "#{remote_url}:#{branch}"
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
kuber_kit-1.3.2 lib/kuber_kit/core/artifacts/git.rb
kuber_kit-1.1.5 lib/kuber_kit/core/artifacts/git.rb
kuber_kit-1.3.1 lib/kuber_kit/core/artifacts/git.rb
kuber_kit-1.3.0 lib/kuber_kit/core/artifacts/git.rb
kuber_kit-1.1.4 lib/kuber_kit/core/artifacts/git.rb
kuber_kit-1.2.7 lib/kuber_kit/core/artifacts/git.rb
kuber_kit-1.2.6 lib/kuber_kit/core/artifacts/git.rb
kuber_kit-1.2.5 lib/kuber_kit/core/artifacts/git.rb
kuber_kit-1.2.4 lib/kuber_kit/core/artifacts/git.rb
kuber_kit-1.2.2 lib/kuber_kit/core/artifacts/git.rb
kuber_kit-1.1.2 lib/kuber_kit/core/artifacts/git.rb
kuber_kit-1.2.1 lib/kuber_kit/core/artifacts/git.rb