Jenkins – Kubeconfig

  To store and switch between Kubernetes configurations, you can use the Kubernetes CLI plugin, to work with it, "kubectl" must be installed in the system Install the plugin Go to "Manage Jenkins"   Section "Manage Plugins"   Go to the "Available" tab and in the search indicate "Kubernetes CLI" Install it.   Add Kubernetes … Continue reading "Jenkins – Kubeconfig"

Helm – Creating Secret from Variable

  In order to save the value of the variable as Secret, the variable must be encoded in base64, for this we use "_helpers.tpl" For example, we need to save the value of the variable "applicationSecret" values.yaml:   Add the following to "_helpers.tpl": _helpers.tpl:   Now in the "templates" directory, create the file "secret.yaml" secret.yaml:

Ansible – Template: to_nice_json

In order to create a file from the template and immediately save it as "Pretty JSON", you can use the "copy" module with the "content" key. For example, save the template "config.j2" as the file "/app/config.json" Playbook:

Jenkins – Active Choice: CheckBox – Default values

  When working with the Active Choice CheckBox parameter, you can select the default values by adding the ": selected" parameter Pipeline:   When assembling with parameters, two environments at once, "Development" and "Production" will be selected by default

Jenkins – Active Choice: Pipeline examples

  A few examples of how Active Choices parameters in Pipeline as a code Example 1 Single selection from the list provided. A drop-down list of environments, by default, the first item in the list is selected. Pipeline:  

Jenkins – Username

In order to find out Jenkins username, you need a plugin user build vars Go to Jenkins settings   Section "Manage Plugins"   Go to the "Available" tab and specify "user build vars" in the search. Install it.   An example of using a plugin from Pipeline:   The module also has the following variables: … Continue reading "Jenkins – Username"