-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Once the libraries have been installed, you can access the TestUtils
object to call into the automated scripts. There are three basic functions: getProvisioningConfig
, runTest
, and runParallelMultiArchTest
.
In your Jenkinsfile, you'll want to add the following block
library(
changelog: false,
identifier: "multiarch-ci-libraries@${params.LIBRARIES_REF}",
retriever: modernSCM([$class: 'GitSCMSource',remote: "${params.LIBRARIES_REPO}"])
)
This assumes you'll be supplying the repository name and URL via the job parameters.
Now that you've installed the libraries, the first thing you'll want to do is fetch the ProvioningConfig object. This object and its options are described in the Provisioning Configuration page.
If you're looking to run a test on a single architecture, you can use the TestUtils.runTest function.
This function has 5 parameters.
-
Description: Usually this is just the "this" object of your test. It gives the library access to pipeline steps such as
sh
. -
Type:
WorkflowScript
- Description: Specifies the arch to run the test on.
-
Type:
String
-
Valid Values:
x86_64
,ppc64le
,aarch64
,s390x
- Description: The ProvisioningConfig object. See Provisioning Configuration
-
Type:
ProvisioningConfig
-
Description: Closure that takes a single parameter of type
com.redhat.multiarch.ci.provisioner.Host
and wraps your test. -
Type:
Closure
-
Description: Closure that takes a two parameters. The first is of type
com.redhat.multiarch.ci.provisioner.Host
, and the second is of typeException
. This is called in the situation that your test closure fails. -
Type:
Closure
If you're looking to run a test on a multiple architectures in parallel, you can use the TestUtils.runParallelMultiArchTest function.
This function has 5 parameters.
-
Description: Usually this is just the "this" object of your test. It gives the library access to pipeline steps such as
sh
. -
Type:
WorkflowScript
- Description: Specifies a comma separated list of arches to run the test on.
-
Type:
List<String>
-
Valid Values:
A non-empty subset of ['x86_64', 'ppc64le', 'aarch64', 's390x']
- Description: The ProvisioningConfig object. See Provisioning Configuration
-
Type:
ProvisioningConfig
-
Description: Closure that takes a single parameter of type
com.redhat.multiarch.ci.provisioner.Host
and wraps your test. -
Type:
Closure
-
Description: Closure that takes a two parameters. The first is of type
com.redhat.multiarch.ci.provisioner.Host
, and the second is of typeException
. This is called in the situation that your test closure fails. -
Type:
Closure