Skip to content
This repository has been archived by the owner on May 5, 2018. It is now read-only.
xprazak2 edited this page Sep 17, 2015 · 19 revisions

Create a Job

Go to main menu, Pipeline > Jobs. Click 'New Job' button on the right. Fill in the form and submit.

Configure a Job

Go to main menu, Pipeline > Jobs. Click on the Job name in the table.

Details - Shows Job overview. Left column shows Job name and how the Job is triggered. Job can be triggered manually, on successful Repository sync and/or Content View promotion. Job requires Hostgroup, Compute Resource, Content View, Jenkins Instance, Jenkins User and Lifecycle Environment to run.

Hostgroup - Specifies the parameters of the host that will be provisioned. A hostgroup should have Puppet Master and Puppet CA configured. Operating systems used during development were Fedora 19 and CentOS 6 (any Foreman supported OS should be fine), both with with Kickstart Default PXELinux and Katello Kickstart default - you may need to modify your provisioning templates and enable repos containing puppet, subscription-manager and katello-agent for some distributions (CentOS, for example). Make sure Puppet gets configured for newly created hosts, they must send a Puppet report to Foreman after their creation, which is signal for Foreman to continue with the workflow. New foreman_pipeline_jenkins_pubkey snippet is available in provisioning templates, you have to modify your provisioning template manually and make it use this snippet. For detail on hostgroups and provisioning see Foreman doc.

Compute Resource - Compute Resource that will be used by Foreman for provisioning. Only those within configured Compute Profile for selected Hostgroup are displayed in 'Resources' tab. If Job has no Hostgroup set, no Compute resources will show in their tab. When Hostgroup is changed, Compute Resource for the Job is removed and must be set again.

Content View - non-composite Content View containing Repositories with yum packages that should be installed on the host once provisioning finishes.

Jenkins Instances - Jenkins Instances are configured here. Choose the desired Jenkins Instance from the list and click 'Set Jenkins Instance'.

Environment - Lifecycle Environment and the 'To Environments'(environments where the Job will be promoted to) are selected here. Select the 'Environments' tab, then a desired environment anc click 'Set environment'.

Click 'To environments' button to proceed to 'To environments' selection. Only a successors of an environment which is already set for the Job are admissible as 'To environments'. If no 'To environments' are selected, Job will not be promoted to the next environment after it has successfully finished.

Jenkins Projects - existing projects in Jenkins that are assigned to this job. All assigned projects are built when job runs. Projects are described in detail here.

Run a Job

There are 3 possible ways to run a Job.

  1. Job is triggered when Repository included in Job through it's Content View is successfully synced.
  2. Job is triggered when Content View included in Job gets successfully promoted/published.
  3. Job is triggered manually.

These options are set when job is created and may be changed in Job's details tab.

Because jobs can start automatically, it is presumed they run mostly without user supervision. Even when a job is triggered manually, there is only a notification message providing information whether job started successfully or not. If you want to see what is going on with your job, go to Monitor > Tasks. Tasks page provide users with overview about running and executed tasks and points you to the source of the problem if something went wrong.

Promote a Content view

When Job finishes and all Jenkins projects assigned to him are built with success on Jenkins server, Content View assigned to the Job may be promoted to the next Environment. Whether or not the Content View gets promoted depends on the number of 'To Environments' the Job is configured with.