Referring to the document: https://jenkinsci.github.io/job-dsl-plugin/#path/freeStyleJob-steps-python I am trying to configure my job automatically through groovy. The job will execute a python code piece. Something like this:
import os
from Reporting.MSTest import MSTest
jsonFile = os.path.join(os.getenv('temp')
Here is the code snippet. Which will add above python script in the job build steps
# the job name is "jobName"
jobA = freeStyleJob("jobName")
jobA.with {
steps {
python {
command(String 'import os')
}
}
}
It not working. Please help!
commandcontains the filename for a python script, not python code - KeepCalmAndCarryOn