File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ pipeline {
1616 steps {
1717 sh '''
1818 python3 -m venv venv
19- ./venv/bin/pip install --upgrade pip
20- ./venv/bin/pip install -r requirements.txt
19+ ${PIP} install --upgrade pip
20+ ${PIP} install -r requirements.txt
2121 '''
2222 }
2323 }
@@ -36,8 +36,18 @@ pipeline {
3636 stage(' Deploy to Lambda' ) {
3737 steps {
3838 sh '''
39+ # Check if npm is available
40+ if ! command -v npm &> /dev/null; then
41+ echo "Installing Node.js and npm..."
42+ curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
43+ sudo apt-get install -y nodejs
44+ fi
45+
3946 npm install -g serverless
40- ./venv/bin/pip install serverless # Optional: if needed for Python env
47+
48+ # If you need Python plugin support in serverless
49+ ${PIP} install serverless
50+
4151 serverless deploy --stage dev
4252 '''
4353 }
You can’t perform that action at this time.
0 commit comments