52 lines
1.8 KiB
Plaintext
52 lines
1.8 KiB
Plaintext
pipeline {
|
|
agent any
|
|
|
|
triggers {
|
|
cron('H/30 * * * *')
|
|
}
|
|
|
|
stages {
|
|
stage('Checkout Code') {
|
|
steps {
|
|
checkout scm
|
|
}
|
|
}
|
|
|
|
stage('Setup Python & Install Dependencies') {
|
|
steps {
|
|
sh '''
|
|
python3 -m venv venv
|
|
. venv/bin/activate
|
|
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q
|
|
playwright install chromium
|
|
'''
|
|
}
|
|
}
|
|
|
|
stage('Run Script') {
|
|
steps {
|
|
withCredentials([
|
|
string(credentialsId: 'TWITTER_USERNAME', variable: 'TWITTER_USERNAME'),
|
|
string(credentialsId: 'TWITTER_PASSWORD', variable: 'TWITTER_PASSWORD'),
|
|
string(credentialsId: 'TWITTER_CAT112_EMAIL', variable: 'TWITTER_CAT112_EMAIL'),
|
|
string(credentialsId: 'TWITTER_SEMGENCAT_HANDLE', variable: 'TWITTER_SEMGENCAT_HANDLE'),
|
|
string(credentialsId: 'BSKY_CAT112_HANDLE', variable: 'BSKY_CAT112_HANDLE'),
|
|
string(credentialsId: 'BSKY_CAT112_PASSWORD', variable: 'BSKY_CAT112_PASSWORD')
|
|
]) {
|
|
sh '''
|
|
. venv/bin/activate
|
|
|
|
python3 twitter2bsky_daemon.py \
|
|
--twitter-username "$TWITTER_USERNAME" \
|
|
--twitter-password "$TWITTER_PASSWORD" \
|
|
--twitter-email "$TWITTER_CAT112_EMAIL" \
|
|
--twitter-handle "$TWITTER_SEMGENCAT_HANDLE" \
|
|
--bsky-handle "$BSKY_CAT112_HANDLE" \
|
|
--bsky-password "$BSKY_CAT112_PASSWORD"
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|