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'
DOCKER_IMAGE_TAG =
'8.8-project-and-issue'

Instance Attribute Summary

Attributes inherited from Base

#docker, #environment, #network, #ports, #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



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

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

  super
end

#nameObject



10
11
12
# File 'lib/gitlab/qa/component/jira.rb', line 10

def name
  @name ||= "jira"
end

#set_jira_hostnameObject



30
31
32
# File 'lib/gitlab/qa/component/jira.rb', line 30

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

#startObject



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

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