Files
post2bsky/jenkins/dijous
Guillem Hernandez Sola 26027c6e91 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.
2026-05-07 09:21:47 +02:00

42 lines
1010 B
Plaintext

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.'
}
}
}