From: Tim Johnson Date: Sat, 21 Jul 2018 15:53:04 +0000 (-0700) Subject: Use jenkins default config file location for setup X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F00%2F11900%2F2;p=releng%2Fdocs.git Use jenkins default config file location for setup Update instructions to use the default jenkins configuration file location instead of forcing users to pass `--conf` every time. Remove '--conf' options is calls to 'jenkins-jobs'. Change-Id: I67bb5530dceb9508ee7650c8490d6004f822f55a Co-Authored-By: Thanh Ha Signed-off-by: Tim Johnson Signed-off-by: Thanh Ha --- diff --git a/docs/jenkins-sandbox.rst b/docs/jenkins-sandbox.rst index f32fbfa..7f1a10b 100644 --- a/docs/jenkins-sandbox.rst +++ b/docs/jenkins-sandbox.rst @@ -96,13 +96,10 @@ JJB CLI needs configuration first. Use this configuration if you prefer to use the JJB tool locally on your system. -After getting access to the Sandbox group, configure the following. +Configure the file ``~/.config/jenkins_jobs/jenkins_jobs.ini`` as follows: -Create a jenkins.ini with the following contents modifying the relevant data: - -Example:: - - ; +.. code-block:: none + :caption: ~/.config/jenkins_jobs/jenkins_jobs.ini [job_builder] ignore_cache=True @@ -111,14 +108,24 @@ Example:: retain_anchors=True [jenkins] - user-id= + user= password= - url=https://jenkins./sandbox - ignore_cache=True + url=https://jenkins.example.org/sandbox + +.. note:: + + The [jenkins] section is the default configuration section that JJB will + refer to when calling ``jenkins-jobs`` without passing the ``-s | --server`` + option. If you work on more than one Jenkins system then configure sections + like [odl], [opnfv], [onap], etc... and pass ``jenkins-jobs -s odl`` to make + it convenient to switch projects. How to retrieve API token? -Login to the Jenkins Sandbox using your LFID, go to the user page by clicking on -your username. Click Configure and then click Show API Token. + +#. Login to the Jenkins Sandbox using your LFID +#. Go to the user page by clicking on your username on the top right +#. Click ``Configure`` +#. Click ``Show API Token`` To start using the Sandbox, we must do a clone of ci-management or releng/builder (in case of ODL) repo for the project. @@ -165,13 +172,13 @@ environment before you submit this job to production CI environment. .. code-block:: bash - jenkins-jobs --conf jenkins.ini test jjb/ + jenkins-jobs test jjb/ For Example: .. code-block:: bash - jenkins-jobs --conf jenkins.ini test jjb/ ci-management-jjb-merge + jenkins-jobs test jjb/ ci-management-jjb-merge If the job you would like to test is a template with variables in its name, it must be manually expanded before use. For example, the commonly used template @@ -199,13 +206,13 @@ following command to push the job to the Sandbox: .. code-block:: bash - jenkins-jobs --conf jenkins.ini update jjb/ + jenkins-jobs update jjb/ For Example: .. code-block:: bash - jenkins-jobs --conf jenkins.ini update jjb/ ci-management-jjb-merge + jenkins-jobs update jjb/ ci-management-jjb-merge Delete a Job ^^^^^^^^^^^^ @@ -214,13 +221,13 @@ Execute the following command to Delete a job from Sandbox: .. code-block:: bash - jenkins-jobs --conf jenkins.ini delete jjb/ + jenkins-jobs delete jjb/ For Example: .. code-block:: bash - jenkins-jobs --conf jenkins.ini delete jjb/ ci-management-jjb-merge + jenkins-jobs delete jjb/ ci-management-jjb-merge You can also delete the job from the UI options in Jenkins Sandbox.