天天看點

使用blue ocean生成pipeline

1.腳本的路徑

使用blue ocean生成pipeline
2.代碼路徑
使用blue ocean生成pipeline
 3.自動生成的Jenkinsfile ​​creating-a-pipeline-in-blue-ocean​​/Jenkinsfile

pipeline {
  agent {
    docker {
      image 'node:6-alpine'
      args '-p 3000:3000'
    }

  }
  stages {
    stage('Build') {
      steps {
        sh 'npm install'
      }
    }

    stage('Test') {
      steps {
        sh './jenkins/scripts/test.sh'
      }
    }

    stage('Deliver') {
      steps {
        sh './jenkins/scripts/deliver.sh'
        input 'Finished using the web site? (Click "Proceed" to continue)'
        sh './jenkins/scripts/kill.sh'
      }
    }

  }
  environment {
    CI = 'true'
  }
}      

用一個例子來示範會更加清晰

繼續閱讀