Created
August 23, 2019 09:32
-
-
Save car-roll/4471dc9231abeb1db1271ad349706bcb to your computer and use it in GitHub Desktop.
This file contains 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
pipeline { | |
agent any | |
stages { | |
stage('Standard') { | |
agent { | |
kubernetes { | |
defaultContainer 'jnlp' | |
yaml """ | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
labels: | |
some-label: some-label-value | |
""" | |
} | |
} | |
steps { | |
sh 'echo hello' | |
sleep 3 | |
sh 'ps -e -o pid,ppid,stat,cmd' | |
} | |
} | |
stage('Shared Namespace') { | |
agent { | |
kubernetes { | |
defaultContainer 'jnlp' | |
yaml """ | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
labels: | |
some-label: some-label-value | |
spec: | |
shareProcessNamespace: true | |
""" | |
} | |
} | |
steps { | |
sh 'echo hello' | |
sleep 3 | |
sh 'ps -e -o pid,ppid,stat,cmd' | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment