Jenkinsfile support

Working with Jenkinsfiles, Jenkins and Tekton

When importing a project jx project import looks for a Jenkinsfile in the source code.

If there is no Jenkinsfile then the wizard assumes you wish to proceed with automated CI/CD pipelines based on tekton and imports it in the usual Jenkins X way. You also get to confirm the kind of pipeline catalog and language you wish to use for the automated CI/CD - so its easy to import any workload whether its a library, a binary, a container image, a helm chart or a fully blown microservice for automated kubernetes based CI/CD.

If a Jenkinsfile is present then the wizard asks you how you want to proceed:

  • use the automated CI/CD pipelines based on tekton.
    • this option will ignore the Jenkinsfile for now - you can always use it later
  • use a Jenkins server to execute the Jenkinsfile pipeline
  • use Jenkinsfile Runner to run the pipelines

Using Jenkins Server

If you choose the Jenkins server option and you have not yet configured a Jenkins server in your cluster, the wizard will prompt you for the new Jenkins server name and will automatically create you a Jenkins server via GitOps

Otherwise you choose which Jenkins server to use for your project. You could have multiple jenkins servers with different configurations and plugins.

When using a Jenkins Server you get to use the full power of the Jenkins server and Jenkinsfile. Jenkins X uses the upstream Jenkins helm chart which you can configure fully via GitOps

Using Jenkinsfile Runner

When using Jenkinsfile Runner we still reuse tekton to run the pipelines and lighthouse to handle webhooks and to trigger pipelines. The Jenkinsfile Runner container runs as a step in a Tekton pipeline

Last modified May 1, 2021: Update (25a859331d)