Upgrading

Upgrading and converting pipelines

Converting older pipelines

If you have older pipelines in your git repository created with an older version of Jenkins X you can convert them to the new concise image: uses:sourceURI syntax via the jx pipeline convert command:

jx pipeline convert 

The pipelines should be modified and if you have a Kptfile it will be removed.

If you have any old jenkins-x.yml files, those will be converted across to the new .lighthouse tekton notation too.

Upgrading pipelines and helm charts via kpt

You can upgrade any git repository in the same way you upgrade your clusters git repository by running the jx gitops upgrade command inside a git checkout of your repository:

cd my-quickstart-thingy
jx gitops upgrade

This will then upgrade any helm charts or pipeline catalogs you are using in your git repository with the latest versions.

After running this command you will usually have some changes in git you can review. If you are happy with the changes commit them and create a Pull Request so that they can get applied on your cluster.

git add *
git commit -a -m "fix: upgrade pipeline catalog"
git push

It is possible that you can have merge conflicts.

You can follow the inline git helper messages to resolve conflicts - or use your IDE to help figure out the merge issues more easily.

Converting all repositories

You can now perform a batch of Pull Requests if you need to upgrade your pipelines on your repositories if the upstream pipeline catalogs have upgraded.

See: generate pull requests to upgrade pipelines

Here is an example of an automated Pull Request that was used to migrate one of our pipelines on jx-gitops - as you can see the resulting file is much simpler and easier to maintain.