Created
          June 28, 2017 20:09 
        
      - 
      
 - 
        
Save mryan43/a823a57d91f49afb989155c7decbe6be to your computer and use it in GitHub Desktop.  
    scripted pipeline version of https://stackoverflow.com/questions/42561241
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | node('yona'){ | |
| stage('Build'){ | |
| ... | |
| } | |
| } | |
| stage('Decide tag on Docker Hub'){ | |
| env.TAG_ON_DOCKER_HUB = input message: 'User input required', | |
| parameters: [choice(name: 'Tag on Docker Hub', choices: 'no\nyes', description: 'Choose "yes" if you want to deploy this build')] | |
| } | |
| if (env.TAG_ON_DOCKER_HUB == 'yes'){ | |
| node('yona'){ | |
| ... | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment