0

I have a jenkins Job that do two steps. 1) Get source code from GIT 2) Run the source code analisys using SONAR-RUNNER

The Job works fine and I'd like to copy/create a similar Job. I tried to create a new Job using the command: curl -s --data-binary @config.xml -H "Content-Type: application/xml" -X POST http://localhost:8080/createItem?name=SONAR-NEW It does create a new Job, however the SONAR-RUNNER part is empty and if I ran the build it doesn't make the SONAR part. The funny thing is that if I check the config.xml generated the SONAR-RUNNER configuration part is there. The same thing happens if I try to copy the JOB, I tried it using: 1) jenkins-cli, or 2) curl --data "name=NEWJOBNAME&mode=copy&from=SONAR" -X POST http://localhost:8080/createItem

If I have a different build step, for example a "Execute SHell", I am able to copy/create the JOB.

So my question is how can I create or copy a JOB that as a build step using "Execute SonarQube Scanner"

G. Ann - SonarSource Team
  • 20,814
  • 3
  • 32
  • 60
Fernando
  • 321
  • 3
  • 3

0 Answers0