Jenkins X provides automated CI+CD for Kubernetes with Preview Environments on Pull Requests using T...
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
JX is a command line tool for installing and using Jenkins X.
Check out how to install jx.
Please check out the Getting Started Guide on how to:
We value respect and inclusiveness and follow the CDF Code of Conduct in all interactions.
We’d love to talk with you about Jenkins X and are happy to help if you have any questions.
Find out more about our bi-weekly office hours, where we discuss all things Jenkins X, and other events here.
To find out the available commands type:
jxOr to get help on a specific command, say,
jx help createYou can also browse the jx command reference documentation.
To open a console for
sh jx open fooIf you do not know the name:
sh jx open
To tail the logs of anything running on Kubernetes (jenkins or your own applications) type.
sh jx logsWhich prompts you for the deployment to log then tails the logs of the newest pod for an app.
You can filter the list of deployments via:
sh jx logs -f cheeseThen if there's only one deployment with a name that contains
cheesethen it'll tail the logs of the latest pod or will prompt you to choose the exact deployment to use.
You can open a remote shell inside any pods container via the
sh jx rshOr to open a shell inside a pod named foo:
sh jx rsh fooPass
-cto specify the container name. e.g. to open a shell in a maven build pod:
sh jx rsh -c maven maven
To import an application from the current directory:
sh jx importOr to create a new Spring Boot application from scratch:
sh jx create springe.g. to create a new WebMVC and Spring Boot Actuator microservice try this:
sh jx create spring -d web -d actuatorOr to create a new project from scratch:
sh jx create project
To start a pipeline using a specific name try:
sh jx start pipeline myorg/myrepoOr to pick the pipeline to start:
sh jx start pipelineIf you know part of the name of the pipeline to run you can filter the list via:
sh jx start pipeline -f thingyYou can start and tail the build log via:
sh jx start pipeline -t
To view environments for a team:
sh jx get envTo view the application versions across environments:
sh jx get version
Typically we setup Environments to use automatic promotion so that the CI / CD pipelines will automatically promote versions through the available Environments using the CI / CD Pipeline.
However if you wish to manually promote a version to an environment you can use the following command:
sh jx promote myapp -e prodOr if you wish to use a custom namespace:
sh jx promote myapp -n my-dummy-namespace
jxCLI tool uses the same Kubernetes cluster and namespace context as
You can switch Environments via:
sh jx envOr change it via:
sh jx env staging jx env prod
To display the current environment without trying to change it:
sh jx env -bTo view all the environments type:
sh jx get envYou can create or edit environments too:
sh jx create env # Create an environment jx edit env staging # Edit staging environmentYou can switch namespaces in the same way via:
sh jx nsor
sh jx ns awesome-staging
If you have multiple Kubernetes clusters then you can switch between them via:
sh jx ctxNote that changing the namespace ,environment or cluster changes the current context for ALL shells!
So if you want to work temporarily with, say, the production cluster we highly recommend you use a sub shell for that.
sh jx shell my-prod-contextOr to pick the context to use for the sub shell:
sh jx shellThen your bash prompt will be updated to reflect that you are in a different context and/or namespace. Any changes to the namespace, environment or context will be local to the current shell only!
You can use the
jx promptto configure your CLI prompt to display the current team and environment you are working within:
PS1="[\[email protected]\h \W \$(jx prompt)]\$ "
PROMPT='$(jx prompt)'$PROMPT ``
**Note** that the prompt is updated automatically for you via thejx shell` command too.
On a Mac to enable bash completion try:
sh jx completion bash > ~/.jx/bash source ~/.jx/bashOr try:
sh source For more help try:sh jx help completion bash
We are adding a number of addon capabilities to Jenkins X. To add or remove addons use thejx create addonorjx delete addoncommands.
For example to add the Gitea Git server to your Jenkins X installation try:sh jx create addon giteaThis will:
jx create git server giteacommand).
jx create git user -n giteacommand).
jx create git token -n gitea -p password usernamecommand).
We have tried to collate common issues here with work arounds. If your issue isn't listed here please let us know.
Please let us know and see if we can help? Good luck!
We welcome your contributions.