Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
[job_builder]
ignore_cache=True
keep_descriptions=False
recursive=True
update=jobs

[jenkins]
query_plugins_info=False
url=https://jenkins.o-ran-sc.org/sandbox
user=your-sandbox-user-name
password=your-sandbox-api-token

...

Test a job in the sandbox

...

After pushing a job to the sandbox, either via the Jenkins `deploy-jjb` job or directly, you can run the job on the code in your repository, usually the master branch, to test the job. Follow this procedure:

  • Go to https://jenkins.o-ran-sc.org/sandbox/ and click the log in link top right. You need special credentials for this, as discussed above.
  • Find your job in the "All" view and click on it
  • On the job page, find the link on the left "Build with Parameters" and click on it
  • Check the parameters, then click the Build button.

You can also test a job on a Gerrit change set that has not yet been merged.  Follow this procedure:

  • In Gerrit, find your change set, click the icon with three dots at the top right, pick Download Patch

If changes in a commit forces changes in the jjb configuration, such a e.g. a restructuring of files, then it is useful to be able to start a sandbox job with the updated jjb configuration without having to commit any of the changes. To do this, follow the procedure below.

  • Push the updated yaml file with the jjb configuration to Gerrit.
  • In Gerrit, go to the change set to verify.

  • Open the "Download" dialog.

  • Copy "Checkout" line, it looks like this:
                
    • In the dialog-like thing that appears, copy the text that appears in the Checkout box (just click on the icon at the right).  It looks like this:
    Paste it in an editor and copy the following part:
                
    • You want just this part:   refs/changes/62/2962/1
    Go
  • As described above, log in to the Jenkins sandbox, https://jenkins.o-ran-sc.org/sandbox/view/All/.
  • Login.

  • Find your job and click build with parameters,

  • find your job, click Build with Parameters
  • On the job parameters pageOn that screen, find these fields:
                  
      • GERRIT_BRANCH
                  
      • GERRIT_REFSPEC
    • Paste that "the refs/changes/" string /62/2962/1 part you copied from Gerrit into BOTH fields, then click
    • Click the " Build " button.

    Jenkins Build Minion Labels and Images

    ...