-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major
-
Component/s: ant-plugin
-
None
-
Environment:Jenkins ver. 2.89.3
Ant Plugin 1.8
Build slave OS CentOS 7.2
Ant 1.9.2
The DSL
Â
pipeline {
   agent {
       node {
           label 'lowpriority'
       }
   }
   environment {
       BRANCH_NAME = 'feature/jenkins-pipline-poc'
   }
   tools {
       ant 'Ant 1.9'
       jdk 'wca-jdk-prod'
   }
   stages{
       stage ('Checkout') {
           steps {
               cleanWs()
               checkout scm
           }
       }
       stage ('Build') {
          Â
           steps {
              sh "ant clean -v"
           }
       }
   }
}
Ant property "build-common-ant.dir" depends on ENV vars "NODE_NAME" and "EXECUTOR_NUMBER"
It get following errors
[property] Loading Environment env. Property "NODE_NAME" has not been set Property "EXECUTOR_NUMBER" has not been set
It works if I modify the ant step like this.
steps {
  sh '''#!/bin/bash
        env > env.props
        source env.props
        ant clean -v
'''
}