2016-06-04 16:41:35 +00:00
|
|
|
import * as plugins from "./npmci.plugins"
|
2016-06-04 23:31:21 +00:00
|
|
|
import * as NpmciEnv from "./npmci.env";
|
|
|
|
|
|
|
|
|
2016-06-04 16:41:35 +00:00
|
|
|
export let build = function(){
|
|
|
|
let done = plugins.q.defer();
|
|
|
|
done.resolve();
|
|
|
|
return done.promise;
|
|
|
|
}
|
|
|
|
|
2016-06-04 23:22:04 +00:00
|
|
|
|
2016-06-04 23:31:21 +00:00
|
|
|
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() +" .";
|
|
|
|
}
|
2016-06-04 23:22:04 +00:00
|
|
|
|
2016-06-04 23:31:21 +00:00
|
|
|
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 .";
|
|
|
|
}
|