Unitech / pm2-deploy

Deploy part of PM2
http://pm2.keymetrics.io/docs/usage/deployment/
MIT License
178 stars 72 forks source link

revert is not working #173

Open t0lkman opened 5 years ago

t0lkman commented 5 years ago
www-data@vps:~/tools$ pm2 deploy ecosystem.config.js production revert 1
--> Deploying to production environment
--> on host localhost
  ○ reverting 1 deploy(s)
  ○ deploying 6e1cc1a
  ○ executing pre-deploy-local
  ○ hook pre-deploy
  ○ fast forward 6e1cc1a
Previous HEAD position was 762fbb6 Update index.js
HEAD is now at 6e1cc1a Update index.js
fatal: Couldn't find remote ref 6e1cc1a

It's on linux ubuntu 18 pm2 version is 3.3.1

yangyangyyluck commented 5 years ago

same problem. centos 7 pm2 version 3.5.0

pm2 deploy development revert --> Deploying to development environment --> on host localhost ○ reverting 1 deploy(s) ○ deploying 91ef402 ○ executing pre-deploy-local ○ executing pre-deploy echo

○ fast forward 91ef402 HEAD is now at 91ef402... /api/dev fatal: Couldn't find remote ref 91ef402

git pull failed

Deploy failed

Unitech commented 5 years ago

It might be linked to: https://github.com/Unitech/pm2-deploy/blob/master/deploy#L267

Feel free to PR

hendry91 commented 5 years ago

@Unitech Same problem here. fatal: Couldn't find remote ref #changesetNumber Error occur on

run "cd $path/source && git checkout $branch && git pull origin $branch"

It will execute "git pull origin $branch", however the $branch = git changeset, instead of a branch name. I would like to revert changes, but why it will goes to pull command again?

russitto commented 4 years ago

any news?

MaheshCasiraghi commented 4 years ago

Ping on news concerning this?

AmauryD commented 4 years ago

Same problem here

Unitech commented 4 years ago

Please try with:

npm install Unitech/pm2#development -g

This is PM2 v4

GPlay97 commented 4 years ago

It is also not working with v4.

Why? Any news. PM2 is such a good tool, but revert / rollback is not working!

@Unitech

GPlay97 commented 4 years ago

btw: It seems like @t0lkman fixed this within #174 Is there a reason why it's still not merged? @Unitech

Dartv commented 4 years ago

Same here. Any news?

mojojoseph commented 4 years ago

I was referred to pm2 after realizing that shipit would not work for deploying to multiple servers, and then I run into this. The ability to revert a deployment is a bit of a must have. 😞