restructure
This commit is contained in:
parent
c826ba3d5f
commit
dd142856d0
@ -1,6 +1,7 @@
|
||||
import * as plugins from "./npmci.plugins"
|
||||
import * as env from "./npmci.env";
|
||||
import {tagDocker} from "./npmci.tag.docker";
|
||||
import * as NpmciEnv from "./npmci.env";
|
||||
|
||||
|
||||
export let build = function(){
|
||||
let done = plugins.q.defer();
|
||||
done.resolve();
|
||||
@ -8,4 +9,35 @@ export let build = function(){
|
||||
}
|
||||
|
||||
|
||||
class Dockerfile {
|
||||
repo:string;
|
||||
version:string;
|
||||
baseImage:string;
|
||||
constructor(){
|
||||
|
||||
};
|
||||
build(){
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
export let dockerTagVersion = function(){
|
||||
if(process.env.CI_BUILD_STAGE == "test"){
|
||||
return "test";
|
||||
} else {
|
||||
return "latest"
|
||||
}
|
||||
}
|
||||
|
||||
export let tagDocker = function(){
|
||||
return NpmciEnv.dockerRegistry + "/" + NpmciEnv.repo.user + "/" + NpmciEnv.repo.repo + ":" + dockerTagVersion() +" .";
|
||||
}
|
||||
|
||||
export let dockerTagTest = function(){
|
||||
return NpmciEnv.dockerRegistry + "/" + NpmciEnv.repo.user + "/" + NpmciEnv.repo.repo + ":test .";
|
||||
}
|
||||
|
||||
export let dockerTagRelease = function(){
|
||||
return NpmciEnv.dockerRegistry + "/" + NpmciEnv.repo.user + "/" + NpmciEnv.repo.repo + ":latest .";
|
||||
}
|
||||
|
@ -7,4 +7,6 @@ export let repo = new GitRepo(process.env.CI_BUILD_REPO);
|
||||
export let dockerTestTag:string;
|
||||
export let dockerReleaseTag:string;
|
||||
|
||||
export let dockerRegistry = "docker.io"; // will be set by npmci.prepare
|
||||
export let dockerRegistry; // will be set by npmci.prepare
|
||||
export let dockerImages;
|
||||
export let dockerFiles;
|
@ -1,22 +0,0 @@
|
||||
import "typings-global";
|
||||
import * as plugins from "./npmci.plugins";
|
||||
import * as NpmciEnv from "./npmci.env";
|
||||
export let dockerTagVersion = function(){
|
||||
if(process.env.CI_BUILD_STAGE == "test"){
|
||||
return "test";
|
||||
} else {
|
||||
return "latest"
|
||||
}
|
||||
}
|
||||
|
||||
export let tagDocker = function(){
|
||||
return NpmciEnv.dockerRegistry + "/" + NpmciEnv.repo.user + "/" + NpmciEnv.repo.repo + ":" + dockerTagVersion() +" .";
|
||||
}
|
||||
|
||||
export let dockerTagTest = function(){
|
||||
return NpmciEnv.dockerRegistry + "/" + NpmciEnv.repo.user + "/" + NpmciEnv.repo.repo + ":test .";
|
||||
}
|
||||
|
||||
export let dockerTagRelease = function(){
|
||||
return NpmciEnv.dockerRegistry + "/" + NpmciEnv.repo.user + "/" + NpmciEnv.repo.repo + ":latest .";
|
||||
}
|
Loading…
Reference in New Issue
Block a user