improve triggr detection

This commit is contained in:
2016-06-23 22:22:03 +02:00
parent 3e80ea15e0
commit 3298b6298e
13 changed files with 84 additions and 63 deletions

View File

@@ -133,7 +133,7 @@ export class Dockerfile {
this.releaseTag = dockerTag(NpmciEnv.dockerRegistry,this.repo,this.version);
this.containerName = "dockerfile-" + this.version;
if(options.filePath && options.read){
this.content = plugins.smartfile.local.toStringSync(plugins.path.resolve(options.filePath));
this.content = plugins.smartfile.fs.toStringSync(plugins.path.resolve(options.filePath));
};
this.baseImage = dockerBaseImage(this.content);
this.localBaseImageDependent = false;
@@ -170,7 +170,7 @@ export class Dockerfile {
};
test(){
let testFile:string = plugins.path.join(paths.NpmciTestDir,"test_" + this.version + ".sh");
let testFileExists:boolean = plugins.smartfile.checks.fileExistsSync(testFile);
let testFileExists:boolean = plugins.smartfile.fs.fileExistsSync(testFile);
if(testFileExists){
bashBare("docker run --name npmci_test_container " + this.buildTag + " mkdir /npmci_test");
bashBare("docker cp " + testFile + " npmci_test_container:/npmci_test/test.sh");