feat: add bsky_post.py and Jenkinsfile for weekly Dijous post
- New standalone script `bsky_post.py` to post text + optional image or video to a Bluesky PDS instance. Supports --image, --video (mutually exclusive), --alt, --lang, --service, --username, --password flags. Reuses the same login-with-backoff pattern as rss2bsky and the Twitter bot. - New Jenkinsfile that triggers every Thursday at 07:15 (cron: 15 7 * * 4), reads credentials from Jenkins secret text entries, and runs bsky_post.py with the configured image and Catalan language tag.
This commit is contained in:
42
jenkins/dijous
Normal file
42
jenkins/dijous
Normal file
@@ -0,0 +1,42 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
triggers {
|
||||
// Every Thursday at 07:15
|
||||
cron('15 7 * * 4')
|
||||
}
|
||||
|
||||
environment {
|
||||
BSKY_HANDLE = credentials('BSKY_GROMENAWARE_HANDLE')
|
||||
BSKY_APP_PASSWORD = credentials('BSKY_GROMENAWARE_APP_PASSWORD')
|
||||
}
|
||||
|
||||
options {
|
||||
timeout(time: 10, unit: 'MINUTES')
|
||||
buildDiscarder(logRotator(numToKeepStr: '30'))
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Post Dijous') {
|
||||
steps {
|
||||
sh """
|
||||
python3 bsky_post.py "Dijous!!!!" \\
|
||||
--username "\$BSKY_HANDLE" \\
|
||||
--password "\$BSKY_APP_PASSWORD" \\
|
||||
--image thursday.jpg \\
|
||||
--alt "Dijous!" \\
|
||||
--lang ca
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
success {
|
||||
echo '✅ Dijous post published successfully.'
|
||||
}
|
||||
failure {
|
||||
echo '❌ Dijous post failed.'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user