Skip to content
This repository has been archived by the owner on Jun 7, 2019. It is now read-only.

Commit

Permalink
Merge pull request #388 from fchavant/simplify-jenkinsfile
Browse files Browse the repository at this point in the history
Simplify Jenkinsfile
  • Loading branch information
Tobias Schwarz committed Sep 28, 2017
2 parents f79c76c + 925b0dd commit a2d40a0
Showing 1 changed file with 21 additions and 38 deletions.
59 changes: 21 additions & 38 deletions Jenkinsfile
Expand Up @@ -12,54 +12,37 @@
* Removal or modification of this copyright notice is prohibited.
*
*/
node('lisk-js-01'){
lock(resource: "lisk-js-01", inversePrecedence: true) {
stage ('Prepare Workspace') {
deleteDir()
checkout scm
pipeline {
agent { node { label 'lisk-js' } }
stages {
stage('Prepare workspace') {
steps {
deleteDir()
checkout scm
}
}

stage ('Build Dependencies') {
try {
sh '''#!/bin/bash
# Install Deps
stage('Install dependencies') {
steps {
sh '''
npm install --verbose
cp ~/.coveralls.yml .
'''
} catch (err) {
currentBuild.result = 'FAILURE'
error('Stopping build, installation failed')
}
}

stage ('Run Eslint') {
try {
sh '''#!/bin/bash
# Run Tests
grunt eslint-ci
'''
} catch (err) {
currentBuild.result = 'FAILURE'
error('Stopping build, tests failed')
stage('Run lint') {
steps{
sh 'grunt eslint-ci'
}
}

stage ('Run tests') {
try {
sh '''#!/bin/bash
# Run Tests
npm run jenkins
'''
} catch (err) {
currentBuild.result = 'FAILURE'
error('Stopping build, tests failed')
stage('Run tests') {
steps {
sh 'npm run jenkins'
}
}

stage ('Set milestone') {
milestone 1
deleteDir()
currentBuild.result = 'SUCCESS'
stage('Cleanup') {
steps {
deleteDir()
}
}
}
}

0 comments on commit a2d40a0

Please sign in to comment.