Add Jenkins CI (#1486)

* add jenkins ci file

* add try/catch and process.exit
This commit is contained in:
Danny Skubak 2018-04-10 22:54:21 -04:00 committed by Daniel Ternyak
parent 54dc4f94e3
commit 7b7e7eaae2
2 changed files with 58 additions and 34 deletions

View File

@ -0,0 +1,19 @@
pipeline {
agent {
node {
label 'master'
}
}
stages {
stage('Install') {
steps {
sh 'npm install'
}
}
stage('Build') {
steps {
sh 'npm run build:electron'
}
}
}
}

View File

@ -33,6 +33,7 @@ async function build() {
);
console.log('Building...');
try {
await builder.build({
mac: shouldBuildOs('mac') ? ['zip', 'dmg'] : undefined,
win: shouldBuildOs('windows') ? ['nsis'] : undefined,
@ -68,6 +69,10 @@ async function build() {
});
console.info(`Electron builds are finished! Available at ${electronBuildsDir}`);
} catch(err) {
console.error(err);
process.exit(1);
}
}
build();