-
Notifications
You must be signed in to change notification settings - Fork 26
Home
I'm going to give this example where you want a write a job called glusterd2-smoke
. The standard is put your yaml in glusterd2-smoke.yml
and the scripts that you write into scripts/glusterd2-smoke
folder. You need at least one script to perform actions on your worker nodes.
The workflow for Centos CI is different from a regular Jenkins job. There are two flows on how to do this based on whether you're going to test on one node or whether you're going to test on multiple nodes.
-
You call
get-node.sh
inbuilders.yml
in your job. This will get you a node to work with. The IP address will be placed in thehosts
and the SSID will be placed incico-ssid
. This is required for clean up.:builders:
- shell: !include-raw: scripts/common/get-node.sh
-
If you already have a script that can do the setup for you inside this clean VM, you call that script next as a parameter to
bootstrap.sh
. Any environment variable your script needs should be passed on this line or it will not be in the environment of the node.builders:
- shell: !include-raw: scripts/common/get-node.sh
- shell: scripts/common/bootstrap.sh $WORKSPACE/scripts/my-job/my-job.sh "ENV_VAR=$ENV_VAR ENV_VAR2=$ENV_VAR2"
-
Remember to add a
publisher
that callsreturn-node.sh
.- post-tasks:
- matches:
- log-text: Building remotely script: !include-raw: scripts/common/return-node.sh
- matches:
- post-tasks: