Class: Gitlab::QA::Component::Jira

Inherits:
Base
  • Object
show all
Defined in:
lib/gitlab/qa/component/jira.rb

Constant Summary collapse

DOCKER_IMAGE =
'registry.gitlab.com/gitlab-org/gitlab-qa/jira-gitlab'.freeze
DOCKER_IMAGE_TAG =
'8.8-project-and-issue'.freeze

Instance Attribute Summary

Attributes inherited from Base

#docker, #environment, #network, #runner_network, #volumes

Instance Method Summary collapse

Methods inherited from Base

#add_network_alias, #hostname, #image, #initialize, #prepare, #prepare_docker_container, #prepare_docker_image, #prepare_network, #process_exec_commands, #pull, #restart, #tag, #teardown, #teardown!

Methods included from Scenario::Actable

#act, included

Constructor Details

This class inherits a constructor from Gitlab::QA::Component::Base

Instance Method Details

#instanceObject



12
13
14
15
16
# File 'lib/gitlab/qa/component/jira.rb', line 12

def instance
  raise 'Please provide a block!' unless block_given?

  super
end

#nameObject



8
9
10
# File 'lib/gitlab/qa/component/jira.rb', line 8

def name
  @name ||= "jira"
end

#set_jira_hostnameObject



28
29
30
# File 'lib/gitlab/qa/component/jira.rb', line 28

def set_jira_hostname
  ::Gitlab::QA::Runtime::Env.jira_hostname = hostname
end

#startObject



18
19
20
21
22
23
24
25
26
# File 'lib/gitlab/qa/component/jira.rb', line 18

def start
  docker.run(image, tag) do |command|
    command << '-d '
    command << "--name #{name}"
    command << "--net #{network}"
    command << "--hostname #{hostname}"
    command << "--publish 8080:8080"
  end
end