This commit is contained in:
Guillem Hernandez Sola
2026-05-08 14:35:24 +02:00
parent 22b32b0b0e
commit f9aaa8b3ed
3 changed files with 28 additions and 24 deletions

View File

@@ -2,8 +2,8 @@ pipeline {
agent any
triggers {
// Every Friday at 07:15
cron('15 7 * * 5')
// Every Friday at 21:15
cron('15 21 * * 5')
}
options {
@@ -25,7 +25,7 @@ pipeline {
}
}
stage('Post Divendres Nit') {
stage('Post Divendres') {
steps {
// Securely injects Jenkins credentials as environment variables
// Note the added curly braces wrapping the sh block
@@ -36,24 +36,25 @@ pipeline {
sh """
. venv/bin/activate
python3 bsky_post.py "DIVENDRES NIT PER FI!!!!!!!!!!!" \\
--username "\$BSKY_HANDLE" \\
--password "\$BSKY_APP_PASSWORD" \\
--image media/divendres_nit.mp4 \\
--username "\$BSKY_GROMENAWARE_HANDLE" \\
--password "\$BSKY_GROMENAWARE_APP_PASSWORD" \\
--video media/divendres_nit.mp4 \\
--alt "DIVENDRES NIT PER FI!!!!!!!!!!!" \\
--lang ca \\
--service https://eurosky.social \\
--allow-pds-video-fallback
"""
"""
}
}
}
}
post {
success {
echo '✅ Divendres Nit post published successfully.'
echo '✅ Divendres post published successfully.'
}
failure {
echo '❌ Divendres Nit post failed.'
echo '❌ Divendres post failed.'
}
}
}