Passing correct ZUUL_URL in zuul.conf

* When zuul triggers job, it passes some zuul-related
   parameters to this job including ZUUL_URL parameter.
   Jenkins should use this parameter to clone project
   repo from zuul.

Change-Id: I1a9a7516f03484870517eeda367c2df8738878da
This commit is contained in:
Nikolay Mahotkin 2016-06-20 14:01:02 +03:00
parent 539613ce4f
commit 33a9945760
2 changed files with 14 additions and 8 deletions

View File

@ -50,13 +50,21 @@ Methods:
- $this.systemConfig: new(puppet:SystemConfig)
- $this.systemConfig.installOnTheNode($this.instance)
- $._environment.reporter.report($this, 'Zuul is waiting while Gerrit is being deployed...')
- $.gerrit.deploy()
- If: $.instance.assignFloatingIp
Then:
- $host: $.instance.floatingIpAddress
Else:
- $host: $.instance.ipAddresses[0]
- $.createConfiguration()
- $.instance.setHieraValue('zuul_host', $host)
- $resources: new(sys:Resources)
- $template: $resources.yaml('DeployZuul.template')
- $._environment.reporter.report($this, 'Zuul is deploying')
- $._environment.reporter.report($this, 'Zuul is deploying...')
- $.instance.agent.call($template, $resources)
- $._environment.reporter.report($this, 'Creating Zuul user in Gerrit')
@ -66,11 +74,6 @@ Methods:
- $linux: new(conf:Linux)
- $linux.runCommand($.instance.agent, 'service zuul start')
- If: $.instance.assignFloatingIp
Then:
- $host: $.instance.floatingIpAddress
Else:
- $host: $.instance.ipAddresses[0]
- $._environment.reporter.report($this, 'Zuul is available at http://{0}:80'.format($host))
- $.setAttr(deployed, true)

View File

@ -1,7 +1,8 @@
node default {
$gerrit_server=hiera('gerrit_server')
$gerrit_ssh_host_key=hiera('gerrit_ssh_host_key')
$gerrit_server = hiera('gerrit_server')
$gerrit_ssh_host_key = hiera('gerrit_ssh_host_key')
$zuul_host = hiera('zuul_host')
class { 'openstackci::zuul_scheduler':
gearman_server => '127.0.0.1',
@ -11,6 +12,8 @@ node default {
zuul_ssh_private_key => hiera('zuul_ssh_private_key_contents'),
job_name_in_report => true,
project_config_repo => hiera('project_config_repo'),
zuul_url => "http://${zuul_host}/p",
status_url => "http://${zuul_host}",
git_email => 'jenkins@openstack.org',
git_name => 'OpenStack Jenkins',
}