Skip to content

Commit 3e13a81

Browse files
Update Jenkinsfile
1 parent 87914a3 commit 3e13a81

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

Jenkinsfile

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
pipeline {
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+

0 commit comments

Comments
 (0)