@@ -110,7 +110,12 @@ public class BuildTools {
if (codePacker == null) {
switch (PackType.valueOf(packerDto.getType())) {
case docker:
- codePacker = new DockerPack(packerDto.getTargetPath(), dockerAuth);
+ if (dockerAuth != null) {
+ codePacker = new DockerPack(packerDto.getTargetPath(), dockerAuth);
+ } else {
+ codePacker = new DockerPack(packerDto.getTargetPath());
+ }
+
break;
default:
codePacker = new ZipPack(packerDto.getBinDirname());
@@ -23,6 +23,11 @@ public class DockerPack implements CodePacker {
this.docker = new DockerImpl(dockerAuth);
}
+ public DockerPack(String targetPath) {
+ this.targetPath = targetPath;
+ this.docker = new DockerImpl();
@Override
public String pack(String appId, String commitId, String appRootPath, String dockerfile) throws Exception {
int idx = targetPath.lastIndexOf("/");