Skip to content

A pattern for using Centos CI with JJB and python-cicoclient

License

Notifications You must be signed in to change notification settings

nigelbabu/centos-ci-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CentOS CI Sample

This sample attempts to establish a pattern to use Centos CI with JJB and python-cicoclient in a clean manner avoiding curl calls. This is from an actual example we're using in Gluster.

How it works

CICO environment variables

This leverages python-cicoclient which provides an ansible module and CLI client to consume the ephemeral bare metal provisioning infrastructure.

You need to set your ci.centos.org API key when connecting to the nodes as environment variables on your slave node(s).

This is done in Managed Jenkins -> Managed Nodes -> <node> -> Configure -> Node properties -> Environment variables -> Add:

name: CICO_API_KEY
value: <api key>

Builder

To get the node, you include the get-node.sh script as a shell builder. This will use the python-cicoclient on the commandline to get you nodes for your test. The hosts will be written to $WORKSPACE/hosts and the ssid to $WORKSPACE/cico-ssid by default.

If you have more than one host, you may want to add an extra shell script to convert the host file into an ansible host file.

Publisher

To release the node, you need to use a post-task publisher. This way even when the job fails, the nodes are released back into the pool. We match the line "Building remotely" which should happen on every single job. This will catch all failures and soft abort (clicking the x button in the UI once). This will not run in a hard abort (clicking the x button in the UI twice).

Credits

The scripts and patterns are extracted from dmsimard's work for the RDO Project.

About

A pattern for using Centos CI with JJB and python-cicoclient

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages