Jenkins client for job enforcement
diff --git a/README.rst b/README.rst
index 237812c..b4bc7e6 100644
--- a/README.rst
+++ b/README.rst
@@ -13,17 +13,23 @@
``jenkins.master``
------------------
-Setup jenkins master
+Setup jenkins master.
``jenkins.slave``
-----------------
-Setup jenkins slave
+Setup jenkins slave.
``jenkins.job_builder``
-----------------------
-Setup jenkins job builder
+Setup jenkins job builder.
+
+``jenkins.client``
+------------------
+
+Setup jenkins client, works with Salt 2016.3+, supports pipeline workflow projects only now.
+
Available metadata
==================
@@ -42,10 +48,13 @@
Setup Jenkins slave
-Example pillars
-===============
+Sample pillars
+==============
Jenkins master
+--------------
+
+Simple master with reverse proxy
.. code-block:: yaml
@@ -89,7 +98,8 @@
- name: rebuild
- name: test-stability
-Jenkins slave
+Agent (former slave)
+--------------------
.. code-block:: yaml
@@ -110,6 +120,72 @@
private_key: |
-----BEGIN PGP PRIVATE KEY BLOCK-----
...
+Client
+------
+
+Simple client with workflow job definition
+
+.. code-block:: yaml
+
+ jenkins:
+ client:
+ master:
+ host: jenkins.example.com
+ port: 80
+ protocol: http
+ job:
+ jobname:
+ type: workflow
+ param:
+ bool_param:
+ type: boolean
+ description: true/false
+ default: true
+ string_param:
+ type: string
+ description: 1 liner
+ default: default_string
+ text_param:
+ type: text
+ description: multi-liner
+ default: default_text
+
+Groovy script samples
+
+.. code-block:: yaml
+
+ jenkins:
+ client:
+ job:
+ test_workflow_jenkins_simple:
+ type: workflow
+ display_name: Test jenkins simple workflow
+ script: |
+ node {
+ stage 'Stage 1'
+ echo 'Hello World 1'
+ stage 'Stage 2'
+ echo 'Hello World 2'
+ }
+ test_workflow_jenkins_input:
+ type: workflow
+ display_name: Test jenkins workflow inputs
+ script: |
+ node {
+ stage 'Enter string'
+ input message: 'Enter job parameters', ok: 'OK', parameters: [
+ string(defaultValue: 'default', description: 'Enter a string.', name: 'string'),
+ ]
+ stage 'Enter boolean'
+ input message: 'Enter job parameters', ok: 'OK', parameters: [
+ booleanParam(defaultValue: false, description: 'Select boolean.', name: 'Bool'),
+ ]
+ stage 'Enter text'
+ input message: 'Enter job parameters', ok: 'OK', parameters: [
+ text(defaultValue: '', description: 'Enter multiline', name: 'Multiline')
+ ]
+ }
+
Usage
=====