use of org.jenkinsci.test.acceptance.plugins.openstack.OpenstackBuildWrapper in project acceptance-test-harness by jenkinsci.
the class OpenstackCloudPluginTest method usePerBuildInstance.
@Test
@WithCredentials(credentialType = WithCredentials.SSH_USERNAME_PRIVATE_KEY, values = { MACHINE_USERNAME, "/openstack_plugin/unsafe" })
@TestActivation({ "HARDWARE_ID", "IMAGE_ID", "KEY_PAIR_NAME", "NETWORK_ID" })
public void usePerBuildInstance() {
configureCloudInit("cloud-init");
configureProvisioning("SSH", "unused");
FreeStyleJob job = jenkins.jobs.create();
job.configure();
OpenstackBuildWrapper bw = job.addBuildWrapper(OpenstackBuildWrapper.class);
bw.cloud(CLOUD_NAME);
bw.template(CLOUD_DEFAULT_TEMPLATE);
bw.count(1);
// Wait a little for the other machine to start responding
job.addShellStep("while ! ping -c 1 \"$JCLOUDS_IPS\"; do :; done");
job.save();
job.scheduleBuild().waitUntilFinished(PROVISIONING_TIMEOUT).shouldSucceed();
}
Aggregations