Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ class PkgPyFuncs {
});

const info = _.map(functions, (target) => {


return {
name: target.name,
includes: target.package.include,
Expand Down Expand Up @@ -122,7 +120,8 @@ class PkgPyFuncs {
if (this.abortOnPackagingErrors){
const countErrorNewLines = errorText.split('\n').length

if(countErrorNewLines < 2 && errorText.toLowerCase().includes('git clone')){

if(!errorText.includes("ERROR:") && countErrorNewLines < 2 && errorText.toLowerCase().includes('git clone')){
// Ignore false positive due to pip git clone printing to stderr
} else if(errorText.toLowerCase().includes('warning') && !errorText.toLowerCase().includes('error')){
// Ignore warnings
Expand Down Expand Up @@ -162,17 +161,19 @@ class PkgPyFuncs {

if ( out === this.containerName ){
this.log('Container already exists. Reusing.')
} else {
let args = ['run', '--rm', '-dt', '-v', `${process.cwd()}:${this.dockerServicePath}`]

if (this.mountSSH) {
args = args.concat(['-v', `${process.env.HOME}/.ssh:/root/.ssh`])
}
let out = this.runProcess('docker', ['kill', `${this.containerName}`])
this.log(out)
}

let args = ['run', '--rm', '-dt', '-v', `${process.cwd()}:${this.dockerServicePath}`]

args = args.concat(['--name',this.containerName, this.dockerImage, 'bash'])
this.runProcess('docker', args)
this.log('Container created')
if (this.mountSSH) {
args = args.concat(['-v', `${process.env.HOME}/.ssh:/root/.ssh`])
}

args = args.concat(['--name',this.containerName, this.dockerImage, 'bash'])
this.runProcess('docker', args)
this.log('Container created')
}

ensureImage(){
Expand Down Expand Up @@ -213,7 +214,7 @@ class PkgPyFuncs {
if (this.globalRequirements){
requirements = _.concat(requirements, this.globalRequirements)
}
_.forEach(requirements, (req) => { this.installRequirements(buildPath,req)})
_.forEach(requirements, (req) => { this.installRequirements(buildPath,req) })
zipper.sync.zip(buildPath).compress().save(`${buildPath}.zip`)
}

Expand Down