now checking for specific testfiles for each Image version

This commit is contained in:
Philipp Kunz 2016-06-07 05:20:04 +02:00
parent 48bee2fa92
commit 4ffb1d1e7e
3 changed files with 20 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

View File

@ -169,10 +169,16 @@ export class Dockerfile {
bashBare("docker pull " + this.buildTag); bashBare("docker pull " + this.buildTag);
}; };
test(){ test(){
let testExists = plugins.smartfile.checks.fileExistsSync(
plugins.path.join(paths.NpmciProjectDir,("./test/test_" + this.version + ".sh"))
);
if(testExists){
bashBare("docker run -v " + bashBare("docker run -v " +
plugins.path.join(paths.NpmciProjectDir,"./test") + ":/test/ " + plugins.path.join(paths.NpmciProjectDir,"./test") + ":/test/ " +
"--name " + this.containerName + " /test/" + "test_" + this.version); "--name " + this.containerName + " /test/" + "test_" + this.version + ".sh");
} else {
plugins.beautylog.warn("skipping tests for " + this.cleanTag + " because no testfile was found!");
}
}; };
release(){ release(){
bashBare("docker tag " + this.getId() + " " + this.releaseTag); bashBare("docker tag " + this.getId() + " " + this.releaseTag);