Added new yml
This commit is contained in:
@@ -17,16 +17,14 @@ pipeline {
|
|||||||
stage('Setup Python & Install Dependencies') {
|
stage('Setup Python & Install Dependencies') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh '''
|
||||||
|
set -e # Exit immediately if a command exits with a non-zero status
|
||||||
|
|
||||||
# Create a virtual environment named 'venv'
|
# Create a virtual environment named 'venv'
|
||||||
python3 -m venv venv
|
python3 -m venv venv
|
||||||
|
|
||||||
# Activate the virtual environment
|
# Activate the virtual environment and install dependencies
|
||||||
. venv/bin/activate
|
. venv/bin/activate && \
|
||||||
|
pip install --upgrade pip && \
|
||||||
# Upgrade pip to ensure we have the latest version
|
|
||||||
pip install --upgrade pip
|
|
||||||
|
|
||||||
# Install required packages
|
|
||||||
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy
|
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy
|
||||||
|
|
||||||
# Check if moviepy is installed
|
# Check if moviepy is installed
|
||||||
@@ -39,7 +37,7 @@ pipeline {
|
|||||||
python3 -c "import moviepy.editor" || { echo 'MoviePy import failed!'; exit 1; }
|
python3 -c "import moviepy.editor" || { echo 'MoviePy import failed!'; exit 1; }
|
||||||
|
|
||||||
# Install the local browser binaries for this environment
|
# Install the local browser binaries for this environment
|
||||||
playwright install chromium
|
npx playwright install chromium
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -56,10 +54,8 @@ pipeline {
|
|||||||
string(credentialsId: 'BSKY_3CAT_APP_PASSWORD', variable: 'BSKY_3CAT_APP_PASSWORD')
|
string(credentialsId: 'BSKY_3CAT_APP_PASSWORD', variable: 'BSKY_3CAT_APP_PASSWORD')
|
||||||
]) {
|
]) {
|
||||||
sh '''
|
sh '''
|
||||||
# 1. Activate the virtual environment in THIS shell
|
# Activate the virtual environment and run the script
|
||||||
. venv/bin/activate
|
. venv/bin/activate && \
|
||||||
|
|
||||||
# 2. Now run the script (it will use the venv's Python and find 'arrow')
|
|
||||||
python3 twitter2bsky_daemon.py \
|
python3 twitter2bsky_daemon.py \
|
||||||
--twitter-username "$TWITTER_USERNAME" \
|
--twitter-username "$TWITTER_USERNAME" \
|
||||||
--twitter-password "$TWITTER_PASSWORD" \
|
--twitter-password "$TWITTER_PASSWORD" \
|
||||||
|
|||||||
Reference in New Issue
Block a user