• Robert Knight's avatar
    Avoid using build executor while waiting for deployment confirmation · ee9ecb42
    Robert Knight authored
    The Jenkinsfile previously has this structure:
    
    ```
    node {
      // Do checkout, run tests etc.
      ...
      stage('Deploy to prod') {
        input(message: "Deploy to prod")
      }
    }
    ```
    
    While any steps inside the `node` block are running or waiting, the pipeline
    will consume a build executor slot. If several client builds were waiting for
    manual input, this could prevent other Jenkins jobs from running.
    
    This commit restructures the Jenkinsfile like so:
    
    ```
    node {
      // Do checkout, run tests etc.
    }
    
    stage('Deploy to prod') {
      input(message: 'Deploy to prod?')
      node {
        // Do the deployment
      }
    }
    
    As a result, a client build waiting to be deployed to production will no longer
    consume a build executor slot.
    
    See also the "7. Don't: Use input within a node" tip in [1]
    
    Fixes #955
    
    [1] https://www.cloudbees.com/blog/top-10-best-practices-jenkins-pipeline-plugin
    ee9ecb42
Name
Last commit
Last update
.github Loading commit data...
docs Loading commit data...
embedding-examples Loading commit data...
images Loading commit data...
scripts Loading commit data...
src Loading commit data...
.babelrc Loading commit data...
.eslintignore Loading commit data...
.eslintrc Loading commit data...
.gitignore Loading commit data...
.npmignore Loading commit data...
.npmrc Loading commit data...
.prettierignore Loading commit data...
.prettierrc Loading commit data...
.travis.yml Loading commit data...
CODE_OF_CONDUCT Loading commit data...
Jenkinsfile Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
gulpfile.js Loading commit data...
package.json Loading commit data...
requirements-dev.in Loading commit data...
tox.ini Loading commit data...
yarn.lock Loading commit data...