1
scheitern Ich habe ein Problem mit excute MakefileCapistrano excute Makefile
deploy.rb:
namespace :deploy do
after :deploy, :build_app do
on roles(:app), in: :groups do
execute "make production"
end
end
end
Makefile:
production:
echo "make file production"
staging:
echo "make file staging"
all:
echo "make file all"
Fehler bei der Ausführung "cap Produktion deploy"
DEBUG [1f0a117d] Command: make production
DEBUG [1f0a117d] make: *** No rule to make target `production'. Stop.
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as make production exit status: 2
make production stdout: make: *** No rule to make target `production'. Stop.
make production stderr: Nothing written
Debuggen direkt auf dem Server "ma ke Produktion“=> echo "Datei Produktion machen"
Und excute wenn mit nur "make" wird es auf den ersten Tag laufen
--- Makefile zusätzlich
production:
npm install
npm run deploy-production
sudo docker rmi dashboard:latest; sudo echo 0
sudo docker build -t dashboard:$(VERSION) .
sudo docker tag -f dashboard:$(VERSION) dashboard:latest
staging:
npm install
npm run deploy-staging
sudo docker rmi dashboard:latest; sudo echo 0
sudo docker build -t dashboard:$(VERSION) .
sudo docker tag -f dashboard:$(VERSION) dashboard:latest
Gibt es einen Grund, warum Sie es über make statt einer einfachen 'cap production deploy' laufen lassen? – microspino
Ja. Ich muss es ausführen, um etwas Code zu erstellen (NPM, Docker-Bild, ...). Zum einfachen Lesen, entferne ich alle Code nicht auf Fehler –
können Sie die Makefile-Quelle veröffentlichen? (ignorieren Sie dies nur sah Sie es getan) – microspino