restructure

This commit is contained in:
Philipp Kunz 2016-06-05 01:31:21 +02:00
parent c826ba3d5f
commit dd142856d0
3 changed files with 37 additions and 25 deletions

View File

@ -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 .";
}

View File

@ -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;

View File

@ -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 .";
}