Use jenkins default config file location for setup 00/11900/2
authorTim Johnson <tijohnson@linuxfoundation.org>
Sat, 21 Jul 2018 15:53:04 +0000 (08:53 -0700)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 23 Jul 2018 17:12:43 +0000 (13:12 -0400)
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 <thanh.ha@linuxfoundation.org>
Signed-off-by: Tim Johnson <tijohnson@linuxfoundation.org>
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
docs/jenkins-sandbox.rst

index f32fbfa..7f1a10b 100644 (file)
@@ -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::
-
-   ;<jenkins.ini contents>
+.. 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=<Provide your Jenkins Sandbox user-id (LFID)>
+   user=<Provide your Jenkins Sandbox user-id (LFID)>
    password= <Refer below steps to get API token>
-   url=https://jenkins.<project-domain>/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/ <job-name>
+   jenkins-jobs test jjb/ <job-name>
 
 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/ <job-name>
+   jenkins-jobs update jjb/ <job-name>
 
 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/ <job-name>
+   jenkins-jobs delete jjb/ <job-name>
 
 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.