pipeline { | |
agent { | |
kubernetes { | |
label 'my-agent-pod' | |
yaml """ | |
apiVersion: v1 | |
kind: Pod | |
spec: | |
containers: | |
- name: maven | |
image: maven:alpine | |
resources: | |
requests: | |
memory: "2Gi" | |
cpu: "1" | |
limits: | |
memory: "2Gi" | |
cpu: "1" | |
command: | |
- cat | |
tty: true | |
""" | |
} | |
} | |
stages { | |
stage('Run maven') { | |
steps { | |
container('maven') { | |
sh 'mvn -f ./sdks/java/basys.sdk/pom.xml clean verify' | |
} | |
} | |
} | |
} | |
} |