Search in sources :

Example 1 with QuayService

use of io.syndesis.qe.marketplace.quay.QuayService in project syndesis-qe by syndesisio.

the class CommonSteps method deployOperatorHub.

public static void deployOperatorHub() {
    Syndesis syndesis = ResourceFactory.get(Syndesis.class);
    QuayUser quayUser = TestConfiguration.getQuayUser();
    QuayService quayService = new QuayService(quayUser, TestConfiguration.syndesisOperatorImage(), syndesis.generateImageEnvVars());
    String quayProject;
    try {
        quayProject = quayService.createQuayProject();
    } catch (Exception e) {
        InfraFail.fail("Creating project on quay failed", e);
        return;
    }
    OpenShiftService openShiftService = TestConfiguration.getOpenShiftService(quayProject);
    try {
        openShiftService.deployOperator();
    } catch (IOException e) {
        InfraFail.fail("Deploying operator with marketplace failed", e);
    }
    // at this point we don't really need operator source anymore
    // and we doon't need project on quay either, because all the necessary stuff
    // has already been deployed, we can delete those
    log.info("Cleaning all unnecessary resorces");
    openShiftService.deleteOpsrcToken();
    try {
        openShiftService.deleteOperatorSource();
        quayService.deleteQuayProject();
    } catch (IOException e) {
        InfraFail.fail("Fail during cleanup of quay project", e);
    }
    syndesis.deployCrAndRoutes();
    CommonSteps.waitForSyndesis();
}
Also used : OpenShiftService(io.syndesis.qe.marketplace.openshift.OpenShiftService) QuayUser(io.syndesis.qe.marketplace.quay.QuayUser) IOException(java.io.IOException) QuayService(io.syndesis.qe.marketplace.quay.QuayService) Syndesis(io.syndesis.qe.resource.impl.Syndesis) TimeoutException(java.util.concurrent.TimeoutException) WaiterException(cz.xtf.core.waiting.WaiterException) KubernetesClientException(io.fabric8.kubernetes.client.KubernetesClientException) IOException(java.io.IOException) InvocationTargetException(java.lang.reflect.InvocationTargetException)

Aggregations

WaiterException (cz.xtf.core.waiting.WaiterException)1 KubernetesClientException (io.fabric8.kubernetes.client.KubernetesClientException)1 OpenShiftService (io.syndesis.qe.marketplace.openshift.OpenShiftService)1 QuayService (io.syndesis.qe.marketplace.quay.QuayService)1 QuayUser (io.syndesis.qe.marketplace.quay.QuayUser)1 Syndesis (io.syndesis.qe.resource.impl.Syndesis)1 IOException (java.io.IOException)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 TimeoutException (java.util.concurrent.TimeoutException)1