- Website: https://jenkins-x.io/
- Slack channels (part of kubernetes workspace):
- #jenkins-x-user for users of Jenkins X
- #jenkins-x-dev for developers of Jenkins X
- Discourse forum: Discourse
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:
Then what to do next when you have Jenkins X installed.
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:
jx
Or to get help on a specific command, say, create then type:
jx help create
You can also browse the jx command reference documentation.
To open a console for foo:
jx open fooIf you do not know the name:
jx openTo tail the logs of anything running on Kubernetes (jenkins or your own applications) type.
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:
jx logs -f cheeseThen if there's only one deployment with a name that contains cheese then 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 rsh command:
jx rshOr to open a shell inside a pod named foo:
jx rsh fooPass -c to specify the container name. e.g. to open a shell in a maven build pod:
jx rsh -c maven mavenTo import an application from the current directory:
jx importOr to create a new Spring Boot application from scratch:
jx create springe.g. to create a new WebMVC and Spring Boot Actuator microservice try this:
jx create spring -d web -d actuatorOr to create a new project from scratch:
jx create projectTo start a pipeline using a specific name try:
jx start pipeline myorg/myrepoOr to pick the pipeline to start:
jx start pipelineIf you know part of the name of the pipeline to run you can filter the list via:
jx start pipeline -f thingyYou can start and tail the build log via:
jx start pipeline -tTo view environments for a team:
jx get envTo view the application versions across environments:
jx get versionTypically 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:
jx promote myapp -e prodOr if you wish to use a custom namespace:
jx promote myapp -n my-dummy-namespaceThe jx CLI tool uses the same Kubernetes cluster and namespace context as kubectl.
You can switch Environments via:
jx envOr change it via:
jx env staging
jx env prodTo display the current environment without trying to change it:
jx env -bTo view all the environments type:
jx get envYou can create or edit environments too:
jx create env # Create an environment
jx edit env staging # Edit staging environmentYou can switch namespaces in the same way via:
jx nsor
jx ns awesome-stagingIf you have multiple Kubernetes clusters then you can switch between them via:
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.
jx shell my-prod-contextOr to pick the context to use for the sub shell:
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 prompt to configure your CLI prompt to display the current team and environment you are working within:
# Enable the prompt for bash
PS1="[\u@\h \W \$(jx prompt)]\$ "
# Enable the prompt for zsh
PROMPT='$(jx prompt)'$PROMPTNote that the prompt is updated automatically for you via the jx shell command too.
On a Mac to enable bash completion try:
jx completion bash > ~/.jx/bash
source ~/.jx/bashOr try:
source <(jx completion bash)For more help try:
jx help completion bashWe are adding a number of addon capabilities to Jenkins X. To add or remove addons use the jx create addon or jx delete addon commands.
For example to add the Gitea Git server to your Jenkins X installation try:
jx create addon giteaThis will:
- install the Gitea Helm chart.
- add Gitea as a Git server (via the
jx create git server giteacommand). - create a new user in Gitea (via the
jx create git user -n giteacommand). - create a new Git API token in Gitea (via the
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.
If you're looking to build from source or get started hacking on jx, please see the CONTRIBUTING.MD or our Contributing Guide on the Jenkins X website.