Questions on using Jenkins X

How do I list the apps that have been deployed?

There is a handy HTML report in your cluster dev git repository at docs/ which lists all the charts deployed in every namespace with their version.

You can see the helm charts that are installed along with their version, namespaces and any configuration values by looking at the releases section of your helmfile.yaml and helmfile/*/helmfile.yaml files in your cluster git repository.

You can browse all the kubernetes resources in each namespace using the canonical layout in the config-root folder. e.g. all charts are versioned in git as follows:


You can see the above kubernetes resource, a Deployment with name lighthouse-webhooks in the namespace jx which comes from the lighthouse chart.

There could be some additional charts installed via Terraform for the git operator and health subsystem which can be viewed via:

helm list --all-namespaces

How do I delete an application?

There is a jx application delete command to remove a repository from the source configuration and for removing any deployed instances of the application.


jx application delete --repo myapp

Or you can remove an application or helm chart from an environment by removing the entry in the releases: list in the helmfiles/$namespace/helmfile.yaml file in your dev git repository and peforming a git commit and pushing the change (usually via a Pull Request).

Once the pull request is merged, the boot job will trigger which will remove the application from kubernetes.

Stopping new releases

If the application you are removing was released via Jenkins X then the next time there is a change committed to your applications git repsitory a new release will be triggered which will be promoted again.

So to stop new releases you need to remove the application from the .jx/gitops/source-config.yaml repository.

You should also ensure that the SourceRepository has been deleted. Unfortunately when using kubectl apply this doesn’t usually get removed (though it does with kapp) so you may want to do:

# view all the SourceRepository resources:
kubectl get sr

# find the one that you want to remove then:
kubectl delete sr $theNameToDelete

This will stop Jenkins X creating webhooks and firing pipelines when you make changes.

You may also want to remove the webhook from the repository to be safe.

How do I stop jx asking for git credentials

Commands like jx project used to create/import repositories or jx application used to list applications need to be able to access git repositories using tokens.

Running these commands prompt the user to enter the git-username and git-token to clone the repository into a temporary folder (ssh authentication is not supported at the moment). Follow the steps below to stop the prompting (substitute the <git-username> and <git-token> with your personal username and access token)

export GIT_USERNAME=<git-username>
export GIT_TOKEN=<git-token>

mkdir -p ~/git
echo "https://$GIT_USERNAME:$" >> ~/git/credentials
# Required if not setting XDG_CONFIG to $HOME
# echo "https://$GIT_USERNAME:$" >> ~/.git-credentials

git config --global credential.helper store

NOTE: If you set XDG_CONFIG_HOME to $HOME environment variable, then you dont have to copy the credentials to ~/.git-credentials

To read more about the git credential store follow this document

How do I use dev pods?

See the inner loop documentation

How do I use Testcontainers?

If you want to use a container, such as a database, inside your pipeline so that you can run tests against your database inside your pipeline then use a sidecar container in Tekton.

Here is another example of a sidecar in a pipeline

If you want to use a separate container inside a preview environment then add charts or resources to the preview/helmfile.yaml