com.aeontronix.enhancedmule.tools.cli.application.ApplicationDeployCmd Maven / Gradle / Ivy
/*
* Copyright (c) Aeontronix 2021
*/
package com.aeontronix.enhancedmule.tools.cli.application;
import com.aeontronix.enhancedmule.tools.anypoint.Environment;
import com.aeontronix.enhancedmule.tools.anypoint.application.deploy.DeploymentServiceImpl;
import org.slf4j.Logger;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;
import java.io.File;
import java.util.HashMap;
import java.util.concurrent.Callable;
import static org.slf4j.LoggerFactory.getLogger;
import static picocli.CommandLine.Parameters;
import static picocli.CommandLine.ParentCommand;
@Command(name = "deploy")
public class ApplicationDeployCmd implements Callable {
private static final Logger logger = getLogger(ApplicationDeployCmd.class);
@ParentCommand
private ApplicationCmd applicationCmd;
@Parameters
private String source;
@Option(names = {"--target","-t"})
private String target;
@Option(names = {"--organization","-o"})
private String organizationName;
@Option(names = {"--environment","-e"})
private String environmentName;
@Option(names = {"--var","-V"})
private HashMap vars;
@Option(names = {"--property","-P"})
private HashMap properties;
@Option(names = {"--property-file","--pf"})
private File propertyFile;
@Option(names = {"--build-number","--bn"})
private String buildNumber;
@Option(names = {"--skip-wait","--sw"})
private boolean skipWait;
@Option(names = {"--skip-provisioning","--sp"})
private boolean skipProvisioning;
@Override
public Integer call() throws Exception {
Environment env = applicationCmd.getCli().getEnvironment(organizationName,environmentName);
final DeploymentServiceImpl deploymentService = new DeploymentServiceImpl(env.getOrganization().getClient());
// final RuntimeDeploymentRequest request = new RuntimeDeploymentRequest(filename != null ? filename :
// source.getFileName(), appName, source.getArtifactId(), buildNumber, vars, properties, propertyfile,
// target, getEnvironment(), injectEnvInfo, skipWait, skipProvisioning);
return 0;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy