Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

162
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!