WARNING: Jenkins X version 2.x is unmaintained. Do not use it.

Please refer to thev3 documentation for the latest supported version.

Apps

Extending Jenkins X using the Apps Framework

What are Apps

Jenkins X Apps are distributed as Helm Charts via Helm Chart repositories. Any Helm chart can be installed as an appusingjx add app, although Jenkins X adds various capabilities to Helm Charts including:

  • the ability to interactively ask questions to generatevalues.yaml based on JSON Schema
  • the ability to create pull requests against the GitOps repo that manages your team/cluster
  • the ability to store secrets in vault
  • the ability to upgrade all apps to the latest version

Planned features include:

  • integratingkustomize to allow existing charts to be modified
  • storing Helm repository credentials in vault
  • taking existingvalues.yaml as defaults when asking questions based on JSON Schema during app upgrade
  • only asking new questions during app upgrade
  • integration for bash completion

Official Apps repositry

Jenkins X provides a lot Apps like: Gloo, Istio, Kubeless and more inhttps://github.com/jenkins-x-apps.

CLI Commands

Structure of an App chart

In addition to the structure of a regular helm chart a Jenkins X App chart contains the following:

  • values.schema.yaml: a JSON schema extended with conditions, field values and questions that is used to point out and prompt the user for customizable values the app should be installed with.
  • templates/app.yaml: a Jenkins XApp custom resource: allows to define avalues.schema.yaml transformation which can be used to inject cluster-specific values as for instance its domain and TLS settings (which can be obtained by mounting the ConfigMapingress-config).

Whenjx add app is called the corresponding helm chart is fetched, itsvalues.schema.yaml transformed using theApp resource and the user prompted for the contained questions (non-const fields).From the user’s answers avalues.yaml is generated and used to install the chart.

How to test local App chart changes

You can build your app chart locally, upload it in your cluster’s chart repository and calljx add app referencing your uploaded chart.This can be done as follows from within your chart’s directory:

CHART_NAME=<YOUR_APP_NAME>CHART_VERSION=<YOUR_APP_VERSION>CHART_REPO=<YOUR_CHART_REPO_URL># listed by `jx get urls`CHART_REPO_USR=<YOUR_USERNAME>CHART_REPO_PSW=<YOUR_PASSWORD>helm init --client-onlyhelm repo add <DEP_REPO_NAME> <DEP_REPO_URL># required if dependencies need to be loadedhelm dependency buildsed"s/version: .*/version:$CHART_VERSION/g" -i Chart.yaml# set the app's current versionhelm lint .helm package .curl --fail -u"$CHART_REPO_USR:$CHART_REPO_PSW" --data-binary"@${CHART_NAME}-${CHART_VERSION}.tgz"${CHART_REPO}/api/chartsjx add app --repository $CHART_REPO --version $CHART_VERSION $CHART_NAME

Feedback

Was this page helpful?

Glad to hear it! Pleasetell us how we can improve.

Sorry to hear that. Pleasetell us how we can improve.