Labels for docker monitoring were added
#!groovy
node("master") {
ansiColor('xterm') {
+ def containerName = env.JOB_NAME.replaceAll(/\//, "_") +
+ "_build_${currentBuild.number}"
+
+ def appNameLabel = "docker_ci";
+ def taskLabel = env.JOB_NAME.replaceAll(/\//, "_")
def mvnHome = tool 'mvn'
def mvnJdk8Image = "orientdb/mvn-gradle-zulu-jdk-8"
@@ -11,7 +16,8 @@ node("master") {
}
stage('Run tests on Java8') {
- docker.image("${mvnJdk8Image}").inside("--memory=4g ${env.VOLUMES}") {
+ docker.image("${mvnJdk8Image}").inside("--label collectd_docker_app=${appNameLabel} --label collectd_docker_task=${taskLabel} " +
+ "--name ${containerName}--memory=4g ${env.VOLUMES}") {
try {
sh "${mvnHome}/bin/mvn --batch-mode -V -U clean install -Dsurefire.useFile=false"
