S
Size: a a a
S
S
S
AL
AL
S
AL
S
S
S
S
S
AL
AL
S
podTemplate(yaml:
"""
apiVersion: v1
kind: Pod
metadata:
name: maven
spec:
containers:
- name: maven-test
image: maven
imagePullPolicy: Always
tty: true
- image: "jenkins/inbound-agent:4.3-4"
name: "jnlp"
securityContext:
runAsUser: 1200
restartPolicy: Always
""")
{
node(POD_LABEL) {
def containerIP = ''
stage('Test Run Maven') {
try {
container('maven-test') {
sh "mvn --version"
}
} catch (Exception e) {
error 'Exception while running command'
throw e
}
}
}
}
AL