File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change 11pipeline {
2- agent any
2+ agent {
3+ docker {
4+ image ' cimg/python:3.12-node' // includes Python and Node.js
5+ }
6+ }
37
48 environment {
59 VENV = ' venv'
@@ -15,7 +19,7 @@ pipeline {
1519 stage(' Set Up Python' ) {
1620 steps {
1721 sh '''
18- python3 -m venv venv
22+ python -m venv venv
1923 ${PIP} install --upgrade pip
2024 ${PIP} install -r requirements.txt
2125 '''
@@ -36,22 +40,13 @@ pipeline {
3640 stage(' Deploy to Lambda' ) {
3741 steps {
3842 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-
4643 npm install -g serverless
47-
48- # If you need Python plugin support in serverless
49- ${PIP} install serverless
50-
44+ ${PIP} install serverless # optional, if needed for Python plugin
5145 serverless deploy --stage dev
5246 '''
5347 }
5448 }
5549 }
5650}
5751
52+
You can’t perform that action at this time.
0 commit comments