Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

164
Vistas
How to use "readProperties file:" in jenkins

So I am using a very old svn (1.6.23_32) and jenkins version.

I am trying to run the following in my Jenkinsfile-

def p = readProperties file: 'versions.properties'

def SVN_TAG="ccsmp_v_${p.version.major}.${p.version.minor}.${p.version.maintenance}.${p.version.build}"

But I am getting the following error -

java.lang.NoSuchMethodError: No such DSL method 'readProperties' found among [ansiColor, archive, bat, build, catchError, checkout, deleteDir, dir, echo, emailext, emailextrecipients, error, fileExists, git, input, isUnix, load, mail, node, parallel, properties, publishHTML, pwd, readFile, retry, sh, slackSend, sleep, sshagent, stage, stash, step, svn, timeout, timestamps, tool, unarchive, unstash, waitUntil, withEnv, wrap, writeFile, ws]

"versions.properties" have following contents-

#ccsmp build version information
#Tue, 12 Apr 2022 15:32:37 -0400
branch.type=feature
cscsmp.svn.branch=branches/features/javarto_maven
ivy.cache.dir.name=${svn.branch}
jrto.version=${jrto.version.major}.${jrto.version.minor}.${jrto.version.maintenance}
jrto.version.build=26856
jrto.version.maintenance=0
jrto.version.major=0
jrto.version.minor=0
lib.version=1.5
openvms_pass=xyz
openvms_server=xyz
openvms_user=loadxyz
svn.branch=branches/features/CRE-442
svn.branchurl=${svn.rooturl}/${svn.branch}
svn.password=xyz
svn.rooturl=svn\://xyz-repo/svn/ccsmp
svn.tagurl=${svn.rooturl}/tags
svn.username=xyz
version.build=846
version.date=2022/04/12 15\:32
version.maintenance=0
version.major=1
version.minor=37
version.release=${version.major}.${version.minor}.${version.maintenance}.${version.build}

Is there any alternative way to doing this? Any suggestions are highly appreciated

UPDATE: I also tried -

def p = readFile 'versions.properties'
p = new Properties().load( new StringReader(p) )

def SVN_TAG="ccsmp_v_${p.version.major}..."

But this also didn't work and gave following error-

java.lang.NullPointerException: Cannot get property 'version' on null object
about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda