Skip to content

Instantly share code, notes, and snippets.

@giehlman
Created October 24, 2017 09:54
Show Gist options
  • Select an option

  • Save giehlman/827890f686b80b2e044f81a43eb5974b to your computer and use it in GitHub Desktop.

Select an option

Save giehlman/827890f686b80b2e044f81a43eb5974b to your computer and use it in GitHub Desktop.

Revisions

  1. giehlman created this gist Oct 24, 2017.
    25 changes: 25 additions & 0 deletions Jenkinsfile for NodeJS
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    #!/usr/bin/env groovy
    pipeline {
    agent any
    tools {nodejs "latest"}
    stages {
    stage('preflight') {
    steps {
    echo sh(returnStdout: true, script: 'env')
    sh 'node -v'
    }
    }
    stage('build') {
    steps {
    sh 'npm --version'
    sh 'git log --reverse -1'
    sh 'npm install'
    }
    }
    stage('test') {
    steps {
    sh 'npm test'
    }
    }
    }
    }