当前位置: 首页>>代码示例>>Java>>正文


Java Step类代码示例

本文整理汇总了Java中org.jenkinsci.plugins.workflow.steps.Step的典型用法代码示例。如果您正苦于以下问题:Java Step类的具体用法?Java Step怎么用?Java Step使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Step类属于org.jenkinsci.plugins.workflow.steps包,在下文中一共展示了Step类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: newInstance

import org.jenkinsci.plugins.workflow.steps.Step; //导入依赖的package包/类
@Override
public Step newInstance(Map<String, Object> arguments) throws Exception {
   MicrocksTester step = new MicrocksTester();
   // Assign arguments if provided.
   if (arguments.containsKey("serviceId")) {
      Object serviceId = arguments.get("serviceId");
      if (serviceId != null) {
         step.setServiceId(serviceId.toString());
      }
   }
   if (arguments.containsKey("testEndpoint")) {
      Object testEndpoint = arguments.get("testEndpoint");
      if (testEndpoint != null) {
         step.setTestEndpoint(testEndpoint.toString());
      }
   }
   if (arguments.containsKey("runnerType")) {
      Object runnerType = arguments.get("runnerType");
      if (runnerType != null) {
         step.setRunnerType(runnerType.toString());
      }
   }
   // Fill common parameters before returning step.
   CommonParamsHelper.updateDSLTimedStep(arguments, step);
   return step;
}
 
开发者ID:microcks,项目名称:microcks-jenkins-plugin,代码行数:27,代码来源:MicrocksTester.java

示例2: newInstance

import org.jenkinsci.plugins.workflow.steps.Step; //导入依赖的package包/类
@Override
public Step newInstance(Map<String, Object> arguments) throws Exception {
    if (!arguments.containsKey("deploymentConfig")
            && !arguments.containsKey("depCfg"))
        throw new IllegalArgumentException(
                "need to specify deploymentConfig");
    Object depCfg = arguments.get("deploymentConfig");
    if (depCfg == null || depCfg.toString().trim().length() == 0)
        depCfg = arguments.get("depCfg");
    if (depCfg == null || depCfg.toString().trim().length() == 0)
        throw new IllegalArgumentException(
                "need to specify deploymentConfig");
    OpenShiftDeployer step = new OpenShiftDeployer(depCfg.toString());

    ParamVerify.updateTimedDSLBaseStep(arguments, step);
    return step;
}
 
开发者ID:openshift,项目名称:jenkins-plugin,代码行数:18,代码来源:OpenShiftDeployer.java

示例3: newInstance

import org.jenkinsci.plugins.workflow.steps.Step; //导入依赖的package包/类
@Override
public Step newInstance(Map<String, Object> arguments) throws Exception {
    if (!arguments.containsKey("buildConfig")
            && !arguments.containsKey("bldCfg"))
        throw new IllegalArgumentException(
                "need to specify buildConfig");
    Object bldCfg = arguments.get("buildConfig");
    if (bldCfg == null || bldCfg.toString().trim().length() == 0)
        bldCfg = arguments.get("bldCfg");
    if (bldCfg == null || bldCfg.toString().trim().length() == 0)
        throw new IllegalArgumentException(
                "need to specify buildConfig");
    OpenShiftBuildVerifier step = new OpenShiftBuildVerifier(
            bldCfg.toString());
    if (arguments.containsKey("checkForTriggeredDeployments")) {
        Object checkForTriggeredDeployments = arguments
                .get("checkForTriggeredDeployments");
        if (checkForTriggeredDeployments != null) {
            step.setCheckForTriggeredDeployments(checkForTriggeredDeployments
                    .toString());
        }
    }

    ParamVerify.updateTimedDSLBaseStep(arguments, step);
    return step;
}
 
开发者ID:openshift,项目名称:jenkins-plugin,代码行数:27,代码来源:OpenShiftBuildVerifier.java

示例4: newInstance

import org.jenkinsci.plugins.workflow.steps.Step; //导入依赖的package包/类
@Override
public Step newInstance(Map<String, Object> arguments) throws Exception {
    if (!arguments.containsKey("serviceName")
            && !arguments.containsKey("svcName"))
        throw new IllegalArgumentException(
                "need to specify serviceName");
    Object svcName = arguments.get("serviceName");
    if (svcName == null || svcName.toString().trim().length() == 0)
        svcName = arguments.get("svcName");
    if (svcName == null || svcName.toString().trim().length() == 0)
        throw new IllegalArgumentException(
                "need to specify serviceName");
    OpenShiftServiceVerifier step = new OpenShiftServiceVerifier(
            svcName.toString());

    if (arguments.containsKey("retryCount")) {
        Object retryCount = arguments.get("retryCount");
        if (retryCount != null)
            step.setRetryCount(retryCount.toString());
    }

    ParamVerify.updateDSLBaseStep(arguments, step);
    return step;
}
 
开发者ID:openshift,项目名称:jenkins-plugin,代码行数:25,代码来源:OpenShiftServiceVerifier.java

示例5: newInstance

import org.jenkinsci.plugins.workflow.steps.Step; //导入依赖的package包/类
@Override
public Step newInstance(Map<String, Object> arguments) throws Exception {
    Object jsonyaml = arguments.get("yaml");
    if (jsonyaml == null || jsonyaml.toString().trim().length() == 0)
        jsonyaml = arguments.get("json");
    if (jsonyaml == null || jsonyaml.toString().trim().length() == 0)
        jsonyaml = arguments.get("jsonyaml");
    if (jsonyaml == null || jsonyaml.toString().trim().length() == 0)
        throw new IllegalArgumentException(
                "need to specify json or yaml");
    OpenShiftCreator step = new OpenShiftCreator(jsonyaml.toString());
    ParamVerify.updateDSLBaseStep(arguments, step);
    return step;
}
 
开发者ID:openshift,项目名称:jenkins-plugin,代码行数:15,代码来源:OpenShiftCreator.java

示例6: newInstance

import org.jenkinsci.plugins.workflow.steps.Step; //导入依赖的package包/类
@Override
public Step newInstance(Map<String, Object> arguments) throws Exception {
    if (!arguments.containsKey("deploymentConfig")
            && !arguments.containsKey("depCfg"))
        throw new IllegalArgumentException(
                "need to specify deploymentConfig");
    Object depCfg = arguments.get("deploymentConfig");
    if (depCfg == null || depCfg.toString().trim().length() == 0)
        depCfg = arguments.get("depCfg");
    if (depCfg == null || depCfg.toString().trim().length() == 0)
        throw new IllegalArgumentException(
                "need to specify deploymentConfig");
    if (!arguments.containsKey("replicaCount"))
        throw new IllegalArgumentException(
                "need to specif replicaCount");
    OpenShiftScaler step = new OpenShiftScaler(depCfg.toString(),
            arguments.get("replicaCount").toString());

    if (arguments.containsKey("verifyReplicaCount")) {
        Object verifyReplicaCount = arguments.get("verifyReplicaCount");
        if (verifyReplicaCount != null)
            step.setVerifyReplicaCount(verifyReplicaCount.toString());
    }

    ParamVerify.updateTimedDSLBaseStep(arguments, step);
    return step;
}
 
开发者ID:openshift,项目名称:jenkins-plugin,代码行数:28,代码来源:OpenShiftScaler.java

示例7: newInstance

import org.jenkinsci.plugins.workflow.steps.Step; //导入依赖的package包/类
@Override
public Step newInstance(Map<String, Object> arguments) throws Exception {
    if (!arguments.containsKey("types")
            || !arguments.containsKey("keys"))
        throw new IllegalArgumentException(
                "need to specify types, keys, and values");
    OpenShiftDeleterList step = new OpenShiftDeleterList(arguments.get(
            "types").toString(), arguments.get("keys").toString());
    ParamVerify.updateDSLBaseStep(arguments, step);
    return step;
}
 
开发者ID:openshift,项目名称:jenkins-plugin,代码行数:12,代码来源:OpenShiftDeleterList.java

示例8: newInstance

import org.jenkinsci.plugins.workflow.steps.Step; //导入依赖的package包/类
@Override
public Step newInstance(Map<String, Object> arguments) throws Exception {
    if (!arguments.containsKey("deploymentConfig")
            && !arguments.containsKey("depCfg"))
        throw new IllegalArgumentException(
                "need to specify deploymentConfig");
    Object depCfg = arguments.get("deploymentConfig");
    if (depCfg == null || depCfg.toString().trim().length() == 0)
        depCfg = arguments.get("depCfg");
    if (depCfg == null || depCfg.toString().trim().length() == 0)
        throw new IllegalArgumentException(
                "need to specify deploymentConfig");
    OpenShiftDeploymentVerifier step = new OpenShiftDeploymentVerifier(
            depCfg.toString());

    if (arguments.containsKey("replicaCount")) {
        Object replicaCount = arguments.get("replicaCount");
        if (replicaCount != null)
            step.setReplicaCount(replicaCount.toString());
    }
    if (arguments.containsKey("verifyReplicaCount")) {
        Object verifyReplicaCount = arguments.get("verifyReplicaCount");
        if (verifyReplicaCount != null)
            step.setVerifyReplicaCount(verifyReplicaCount.toString());
    }

    ParamVerify.updateTimedDSLBaseStep(arguments, step);
    return step;
}
 
开发者ID:openshift,项目名称:jenkins-plugin,代码行数:30,代码来源:OpenShiftDeploymentVerifier.java

示例9: newInstance

import org.jenkinsci.plugins.workflow.steps.Step; //导入依赖的package包/类
@Override
public Step newInstance(Map<String, Object> arguments) throws Exception {
    Object jsonyaml = arguments.get("yaml");
    if (jsonyaml == null || jsonyaml.toString().trim().length() == 0)
        jsonyaml = arguments.get("json");
    if (jsonyaml == null || jsonyaml.toString().trim().length() == 0)
        jsonyaml = arguments.get("jsonyaml");
    if (jsonyaml == null || jsonyaml.toString().trim().length() == 0)
        throw new IllegalArgumentException(
                "need to specify json or yaml");
    OpenShiftDeleterJsonYaml step = new OpenShiftDeleterJsonYaml(
            jsonyaml.toString());
    ParamVerify.updateDSLBaseStep(arguments, step);
    return step;
}
 
开发者ID:openshift,项目名称:jenkins-plugin,代码行数:16,代码来源:OpenShiftDeleterJsonYaml.java

示例10: newInstance

import org.jenkinsci.plugins.workflow.steps.Step; //导入依赖的package包/类
@Override
public Step newInstance(Map<String, Object> arguments) throws Exception {
    if (!arguments.containsKey("types")
            || !arguments.containsKey("keys")
            || !arguments.containsKey("values"))
        throw new IllegalArgumentException(
                "need to specify types, keys, and values");
    OpenShiftDeleterLabels step = new OpenShiftDeleterLabels(arguments
            .get("types").toString(), arguments.get("keys").toString(),
            arguments.get("values").toString());
    ParamVerify.updateDSLBaseStep(arguments, step);
    return step;
}
 
开发者ID:openshift,项目名称:jenkins-plugin,代码行数:14,代码来源:OpenShiftDeleterLabels.java

示例11: newInstance

import org.jenkinsci.plugins.workflow.steps.Step; //导入依赖的package包/类
@Override
public Step newInstance(Map<String, Object> arguments) throws Exception {
    if (!arguments.containsKey("buildConfig")
            && !arguments.containsKey("bldCfg"))
        throw new IllegalArgumentException(
                "need to specify buildConfig");
    Object bldCfg = arguments.get("buildConfig");
    if (bldCfg == null || bldCfg.toString().trim().length() == 0)
        bldCfg = arguments.get("bldCfg");
    if (bldCfg == null || bldCfg.toString().trim().length() == 0)
        throw new IllegalArgumentException(
                "need to specify buildConfig");
    OpenShiftBuilder step = new OpenShiftBuilder(bldCfg.toString());
    if (arguments.containsKey("buildName")) {
        Object buildName = arguments.get("buildName");
        if (buildName != null) {
            step.setBuildName(buildName.toString());
        }
    }
    if (arguments.containsKey("checkForTriggeredDeployments")) {
        Object checkForTriggeredDeployments = arguments
                .get("checkForTriggeredDeployments");
        if (checkForTriggeredDeployments != null) {
            step.setCheckForTriggeredDeployments(checkForTriggeredDeployments
                    .toString());
        }
    }
    if (arguments.containsKey("commitID")) {
        Object commitID = arguments.get("commitID");
        if (commitID != null) {
            step.setCommitID(commitID.toString());
        }
    }
    if (arguments.containsKey("showBuildLogs")) {
        Object showBuildLogs = arguments.get("showBuildLogs");
        if (showBuildLogs != null) {
            step.setShowBuildLogs(showBuildLogs.toString());
        }
    }

    // Allow env to be specified as a map: env: [ [ name : 'name1',
    // value : 'value2' ], ... ]
    Object envObject = arguments.get("env");
    if (envObject != null) {
        try {
            ArrayList<NameValuePair> envs = new ArrayList<>();
            List l = (List) envObject;
            for (Object o : l) {
                Map m = (Map) o;
                Object name = m.get("name");
                Object value = m.get("value");
                if (name == null || value == null) {
                    throw new IOException(
                            "Missing name or value in entry: "
                                    + o.toString());
                }
                envs.add(new NameValuePair(name.toString().trim(),
                        value.toString().trim()));
            }
            step.setEnv(envs);
        } catch (Throwable t) {
            throw new UnsupportedOperationException(
                    "Environment variables must be specified as follows: env: [ [ name : 'name1', value : 'value2' ], ... ]. Error: "
                            + t.getMessage());
        }
    }

    ParamVerify.updateTimedDSLBaseStep(arguments, step);
    return step;
}
 
开发者ID:openshift,项目名称:jenkins-plugin,代码行数:71,代码来源:OpenShiftBuilder.java

示例12: newInstance

import org.jenkinsci.plugins.workflow.steps.Step; //导入依赖的package包/类
@Override
public Step newInstance(Map<String, Object> arguments) throws Exception {
    if (!arguments.containsKey("sourceStream")
            && !arguments.containsKey("destinationStream")
            && !arguments.containsKey("sourceTag")
            && !arguments.containsKey("destinationTag")
            && !arguments.containsKey("destStream")
            && !arguments.containsKey("destTag")
            && !arguments.containsKey("srcTag")
            && !arguments.containsKey("destStream")
            && !arguments.containsKey("srcStream"))
        throw new IllegalArgumentException(
                "need to specify sourceStream, sourceTag, destinationStream, destinationTag");

    Object srcStream = arguments.get("sourceStream");
    Object srcTag = arguments.get("sourceTag");
    Object destStream = arguments.get("destinationStream");
    Object destTag = arguments.get("destinationTag");

    if (srcStream == null || srcStream.toString().trim().length() == 0)
        srcStream = arguments.get("srcStream");
    if (srcTag == null || srcTag.toString().trim().length() == 0)
        srcTag = arguments.get("srcTag");
    if (destStream == null
            || destStream.toString().trim().length() == 0)
        destStream = arguments.get("destStream");
    if (destTag == null || destTag.toString().trim().length() == 0)
        destTag = arguments.get("destTag");

    if (srcStream == null || srcStream.toString().trim().length() == 0
            || srcTag == null || srcTag.toString().trim().length() == 0
            || destStream == null
            || destStream.toString().trim().length() == 0
            || destTag == null
            || destTag.toString().trim().length() == 0)
        throw new IllegalArgumentException(
                "need to specify sourceStream, sourceTag, destinationStream, destinationTag");

    OpenShiftImageTagger step = new OpenShiftImageTagger(
            srcStream.toString(), srcTag.toString(),
            destStream.toString(), destTag.toString());
    if (arguments.containsKey("alias")) {
        Object alias = arguments.get("alias");
        if (alias != null) {
            step.setAlias(alias.toString());
        }
    }
    if (arguments.containsKey("destinationNamespace")) {
        Object destinationNamespace = arguments
                .get("destinationNamespace");
        if (destinationNamespace != null) {
            step.setDestinationNamespace(destinationNamespace
                    .toString());
        }
    }
    if (arguments.containsKey("destinationAuthToken")) {
        Object destinationAuthToken = arguments
                .get("destinationAuthToken");
        if (destinationAuthToken != null) {
            step.setDestinationAuthToken(destinationAuthToken
                    .toString());
        }
    }

    ParamVerify.updateDSLBaseStep(arguments, step);
    return step;
}
 
开发者ID:openshift,项目名称:jenkins-plugin,代码行数:68,代码来源:OpenShiftImageTagger.java


注:本文中的org.jenkinsci.plugins.workflow.steps.Step类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。