How do I diagnose a step in a pipeline?
If you are wondering what image, command, environment variables are being used in a step in the pipeline the simplest thing is to open the octant console via:
Then if you navigate to the pipeline you are interested in and select the envelope icon next to a step name that will take you to the Step details page. e.g. if you click on the icon pointed to by the big red arrow:
If that doesn’t help another option is to edit the pipeline step via the
.lighthouse/jenkins-x/pullrequest.yaml file to add the command:
sleep infinity in the
script: value before the command that is not working.
You can then
kubectl exec into the pod at that step and look around and try running commands inside the pod/container.
e.g. using the pod name from the above page and the container name you can do something like:
kubectl exec -it -c name-of-step-container name-of-pod sh
How do I access the preview namespace or URL?
For details see how to add additional preview steps
How do I access a Secret from my pipeline?
Once you have a kubernetes Secret (see how to create them) you can access then in a pipeline either:
How do I configure pipelines to use GPUs?
You can install the nvidia k8s device plugin as a daemonset to expose which nodes have GPUs and their status.
You can then view the nodes via:
kubectl get nodes "-o=custom-columns=NAME:.metadata.name,GPU:.status.allocatable.nvidia\.com/gpu"
You can then use the
resources on your tekton steps as follows:
- image: gcr.io/kaniko-project/executor:v1.3.0-debug name: build-my-image resources: limits: # This job requires an instance with 1 GPU, 4 CPUs and 16GB memory - g4dn.2xlarge nvidia.com/gpu: 1 script: | #!/busybox/sh
How can I use a monorepo?
If you have an existing monorepo you want to import into Jenkins X you can; just be aware that you’ll have to create and maintain your own pipelines for your monorepo.
We currently have no special tekton steps to analyse git changes and conditionally run different sets of tekton steps based on what has changed.
So you may need to write your own steps to handle this nicely based on whatever kind of monorepo you have. Or you may want to look at using a tool like Bazel or some similar tool to implement your monorepo build and just invoke that from the Tekton pipeline.
You could start with the automated CI/CD pipelines that most match your technology choices and edit them to suit.
There are a few tools around that could help:
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.