Skip to content

Commit 87914a3

Browse files
Update Jenkinsfile
1 parent f4319c7 commit 87914a3

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

Jenkinsfile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)