File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 1-
21pipeline {
32 agent any
43
54 environment {
5+ // Add serverless CLI directory to PATH
6+ PATH = " /mnt/c/Users/inbox/AppData/Roaming/npm:$PATH "
67 VENV = ' venv'
78 PYTHON = ' ./venv/bin/python'
89 PIP = ' ./venv/bin/pip'
@@ -16,13 +17,13 @@ pipeline {
1617 python3 --version
1718
1819 echo "Checking Node version..."
19- node -v || (echo "Node.js not found" && exit 1)
20-
20+ node -v
21+
2122 echo "Checking npm version..."
22- npm -v || (echo "npm not found" && exit 1)
23+ npm -v
2324
2425 echo "Checking Serverless version..."
25- serverless --version || (echo "Serverless CLI not found" && exit 1)
26+ /mnt/c/Users/inbox/AppData/Roaming/npm/ serverless --version
2627 '''
2728 }
2829 }
@@ -40,15 +41,16 @@ pipeline {
4041 stage(' Deploy to AWS Lambda' ) {
4142 steps {
4243 sh '''
43- serverless deploy --stage dev
44+ echo "Deploying with Serverless CLI..."
45+ /mnt/c/Users/inbox/AppData/Roaming/npm/serverless deploy --stage dev
4446 '''
4547 }
4648 }
4749 }
4850
4951 post {
5052 failure {
51- echo ' Pipeline failed. Check logs above 👆 '
53+ echo ' ❌ Pipeline failed. Check logs above. '
5254 }
5355 success {
5456 echo ' ✅ Deployment successful!'
You can’t perform that action at this time.
0 commit comments