Deploy Strapi using Jenkins Pipeline

We are desperate for an answer for deploying Strapi from our Bitbucket repository to a Strapi Server using Jenkin Pipeline. We are brand new to Strapi and are still waiting for our support contract to go through. In the meantime, we need to deploy our code to a development server.

The goal is to create a Jenkin pipeline to deploy Strapi to a development server automatically.

System Information:

  • Strapi version: 4.3.2
  • Node: v16.18.0
  • Database: PostgreSQL version 14
  • Edition: Community

We manually built the source code by running the “npm run build” command, and there were no errors.

At this point, we are unsure what to do with the artifacts because we also need to worry about content changes in the database.

What is the process for deploying Strapi with PostgreSQL connection using the Jenkin Pipeline?

Thank you.

How is your build pipeline script setup then ?
Technically you want to push it to the server, (don’t think you need to build it)
Or even better you could use Docker, build pipeline builds the image tags it, then pushes it to your own repo server holding them.
Server then will pull latest image and run the image.

For people to help, knowing what server you are deploying to, how you are running it is quite crucial because it’s part of how you would solve this problem.

PS: Make sure you upgrade your Strapi version to latest as you are quite far behind,

Thank you for responding. I am contacting the right people within my organization to answer your questions. I do not have visibility into our DevOps environment; therefore, I do not know the answer off the top of my head.

Here is a follow-up question:

What is the best way to source control Strapi’s source code (for example, components, collection types, API)?

It’s out of the box ready for it.