Jenkinsfile support
Working with Jenkinsfiles, Jenkins and Tekton
To create or import projects you will need to get the jx 3.x binary and put it on your $PATH
To create a new project from a quickstart template use the jx project quickstart command:
jx project quickstart
Note that the old Jenkins X 2.x alias jx quickstart is still supported but will be deprecated eventually.
The quickstart files are all found in the quickstart github organization.
See the quickstart documentation for more information.
To import an existing project use the jx project import command:
jx project import
The tasks which are copied over during the import process can be found here.
If you are using nested gitlab repositories (org/group/repository), add --nested-repo flag to jx project import.
NOTE that we recommend trying out a quickstart first before importing a project so that:
Dockerfile or custom charts you can compare your custom chart versus the charts included in the Jenkins X catalog to see how it works. e.g.
Ingress resource in the helm chart from the environment (preview / staging / production etc) so that the same chart can be deployed into any environment and things just work (with and without TLS)For troubleshooting what could be wrong with quickstart/import, refer to this page
If you are importing your own repository which has a Dockerfile and/or a helm chart the default pipelines look for these files at:
Dockerfile in the root directory of your repositorycharts/$repoName/Chart.yaml for the helm chartYou are free to use other conventions if you prefer; though you’ll need to modify the pipelines to look in different locations for these files.
Note that Jenkins X 3.x includes new support for handling of importing Jenkinsfiles if you are trying to combine Jenkins and Tekton together in Jenkins X.
This means we can create quickstarts and import projects using the same UX whether you wish to use the automated CI/CD pipelines from Jenkins X using Tekton or wish to reuse your own existing Jenkinsfile files (or even a combination of both on the same repository!)
If you just run the jx project you get a top level wizard that asks you which kind of approach you wish to take (e.g. quickstart versus import etc)
We’ve made a number of improvements over the 2.x version of jx import command:
maven but you may wish to change the version of the pack (e.g. maven-java11)Jenkinfiles you are given the choice to:
Jenkinsfile and let Jenkins X automate the CI/CD via TektonFor those of you who know Jenkins X and have used jx import before the new project wizard is a little different:
the commands are a little different:
jx create import is now jx project importjx create quickstart is now jx project quickstartjx create project is now jx projectjx create spring is now jx project springWorking with Jenkinsfiles, Jenkins and Tekton
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.