Created
          January 21, 2016 09:28 
        
      - 
      
- 
        Save iocanel/7c41003744b88830dd27 to your computer and use it in GitHub Desktop. 
    Understanding what runs where in Jenkins + Kubernetes
  
        
  
    
      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 { | |
| def hostname = readFile '/etc/hostname' | |
| echo "Local node hostname: $hostname" | |
| } | |
| node('kubernetes') { | |
| def hostname = readFile '/etc/hostname' | |
| echo "Kubernetes slave hostname: $hostname" | |
| } | |
| node('kubernetes') { | |
| kubernetes.pod('mypod').withImage('maven').inside { | |
| def hostname = readFile '/etc/hostname' | |
| echo "Kubernetes slave in pod hostname: $hostname" | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment