I have a bitbucket-pipeline file as below but i get a 'pm2: not found' error when pipeline worked. Thanks for now help and comments.
image: node:18pipelines: branches: development: - parallel: - step: name: Development Build & Deploycaches: - nodescript: - pm2 reload 0
Pm2 not found indicates that pm2 might not be installed.
However, why do you need pm2 in a build pipeline? Usually pm2 is used as a process supervisor for long-running node processes.
Because our test app stand up with pm2. Pm2 installed our server. You can see in the picture below.
Because our test app stand up with pm2. Pm2 installed our server. You can see in the picture below. My problem is why I can't use pm2 commands in pipeline.
Hi İbrahim and welcome to the community!
Pipelines builds that run on Atlassian's infrastructure run in Docker containers. For every step of your build, a Docker container starts (the build container) using the image you have specified in your bitbucket-pipelines.yml file. The step you have posted here will run in a Docker container based on the following Dockerhub image with the tag 18:
Any tools you want to use during a step must be either preinstalled in the Docker image you use as a build container, or you will need to install them during the build by adding the necessary commands in your yml file's script for that step.
The Dockerhub image node:18 doesn't have pm2 preinstalled. You can add a command to install it in that step (you can check this doc, in case this is the tool you are referring to), or you can create a custom Docker image with this and other tools you need, and then use that as a build container in your Pipelines build:
Please feel free to reach out if you have any questions.
Kind regards,Theodora
This page is in a loop, it only stops after accepting the cookie
It looks like you're new here. Sign in or register to get started.