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:18
pipelines:
branches:
development:
- parallel:
- step:
name: Development Build & Deploy
caches:
- node
script:
- pm2 reload 0
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
Because our test app stand up with pm2. Pm2 installed our server. You can see in the picture below.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.