Added new yml
This commit is contained in:
44
jenkins/rac1Tw
Normal file
44
jenkins/rac1Tw
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
triggers {
|
||||||
|
// Runs every 30 minutes, matching your GitHub Action cron
|
||||||
|
cron('H/30 * * * *')
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Checkout & Setup') {
|
||||||
|
steps {
|
||||||
|
checkout scm
|
||||||
|
sh '''
|
||||||
|
# Create and activate the virtual environment, then install dependencies
|
||||||
|
python3 -m venv venv
|
||||||
|
. venv/bin/activate
|
||||||
|
pip install atproto fastfeedparser beautifulsoup4 httpx arrow charset-normalizer
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Post RSS to Bluesky') {
|
||||||
|
steps {
|
||||||
|
// 🔐 Fetch the RAC1 specific credentials
|
||||||
|
withCredentials([
|
||||||
|
string(credentialsId: 'BSKY_RAC1_HANDLE', variable: 'BSKY_RAC1_HANDLE'),
|
||||||
|
string(credentialsId: 'BSKY_RAC1_USERNAME', variable: 'BSKY_RAC1_USERNAME'),
|
||||||
|
string(credentialsId: 'BSKY_RAC1_APP_PASSWORD', variable: 'BSKY_RAC1_APP_PASSWORD')
|
||||||
|
]) {
|
||||||
|
sh '''
|
||||||
|
. venv/bin/activate
|
||||||
|
|
||||||
|
# Execute the script with the hardcoded RAC1 URL and credentials
|
||||||
|
python3 rss2bsky.py \\
|
||||||
|
"https://www.rac1.cat/rss/home.xml" \\
|
||||||
|
"$BSKY_RAC1_HANDLE" \\
|
||||||
|
"$BSKY_RAC1_USERNAME" \\
|
||||||
|
"$BSKY_RAC1_APP_PASSWORD"
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user