[
https://ovirt-jira.atlassian.net/browse/OVIRT-2254?page=com.atlassian.jir...
]
Barak Korren updated OVIRT-2254:
--------------------------------
Description: "Create a set of jobs and groovy functions that will enable one
Jenkins master to borrow slaves from another Jenkins master.\r\n\r\nh3. Acceptance
criteria\r\n# Create a job that allows another Jenkins instance to borrow a slave from the
instance the job runs on. The job will:\r\n#* Take the following parameters:\r\n#** The IP
and JNLP port of the Jenkins that is borrowing the slave\r\n#** The JNLP secret to
register to the Jenkins that is borrowing the slave\r\n#** A YAML/JSON structure with node
requirements that includes:\r\n#*** A *kind* field set to
\"{{stdci_node_req}}\"\r\n#*** An *apiVersion* field set to
\"{{1}}\".\r\n#*** The project *name*.\r\n#*** The project *clone_ur*, *branch*
and *refspec*.\r\n#*** The STDCI thread *stage*, *substage*, *distro* and *arch*.\r\n#***
The STDCI *runtime_requirements*.\r\n#* Attempt to find a slave meeting the specified
requirements\r\n#* If slave found:\r\n#** Set it to be used only with matching label
expressions\r\n#** Label it with \"borrowed\"\r\n#** Start the JNLP client on
the slave to make it connect to the borrowing Jenkins\r\n#** Archive an artifact
containing the name on the slave.\r\n#** Finish successfully\r\n#* If slave not found -
finish with an error.\r\n# Create a groovy function to be used from STDCI to borrow a
slave. The function will:\r\n#* Allocate a JNLP node record for the new slave witha
random temporary name starting with \"borrowed_\" to get a JNLP secret.\r\n#*
Set a random label to the node record\r\n#* Launch the borrow slave job on a remote
Jenkins instance that can be configured in JJB YAML by using the \"Parametrized
Remote Trigger\" plugin\r\n#* If the job is successful:\r\n#** Rename the node record
to the name of the slave we get from the artifact created by the borrow slave job with the
'borrowed_' prefix added.\r\n#** Return the random label allocated to it\r\n#
Create a job that makes a jenkins instance release slaves it borrowed " (was: Create
a set of jobs and groovy functions that will enable one Jenkins master to borrow slaves
from another jenkins master.
h3. Acceptance criteria
)
Create slave borrowing flow
---------------------------
Key: OVIRT-2254
URL:
https://ovirt-jira.atlassian.net/browse/OVIRT-2254
Project: oVirt - virtualization made easy
Issue Type: New Feature
Components: Jenkins Master, Jenkins Slaves
Reporter: Barak Korren
Assignee: infra
Create a set of jobs and groovy functions that will enable one Jenkins master to borrow
slaves from another Jenkins master.
h3. Acceptance criteria
# Create a job that allows another Jenkins instance to borrow a slave from the instance
the job runs on. The job will:
#* Take the following parameters:
#** The IP and JNLP port of the Jenkins that is borrowing the slave
#** The JNLP secret to register to the Jenkins that is borrowing the slave
#** A YAML/JSON structure with node requirements that includes:
#*** A *kind* field set to "{{stdci_node_req}}"
#*** An *apiVersion* field set to "{{1}}".
#*** The project *name*.
#*** The project *clone_ur*, *branch* and *refspec*.
#*** The STDCI thread *stage*, *substage*, *distro* and *arch*.
#*** The STDCI *runtime_requirements*.
#* Attempt to find a slave meeting the specified requirements
#* If slave found:
#** Set it to be used only with matching label expressions
#** Label it with "borrowed"
#** Start the JNLP client on the slave to make it connect to the borrowing Jenkins
#** Archive an artifact containing the name on the slave.
#** Finish successfully
#* If slave not found - finish with an error.
# Create a groovy function to be used from STDCI to borrow a slave. The function will:
#* Allocate a JNLP node record for the new slave witha random temporary name starting
with "borrowed_" to get a JNLP secret.
#* Set a random label to the node record
#* Launch the borrow slave job on a remote Jenkins instance that can be configured in JJB
YAML by using the "Parametrized Remote Trigger" plugin
#* If the job is successful:
#** Rename the node record to the name of the slave we get from the artifact created by
the borrow slave job with the 'borrowed_' prefix added.
#** Return the random label allocated to it
# Create a job that makes a jenkins instance release slaves it borrowed
--
This message was sent by Atlassian Jira
(v1001.0.0-SNAPSHOT#100087)