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 agent any
triggers { triggers {
// Every Friday at 07:15 // Every Thursday at 07:15
cron('15 7 * * 5') cron('15 7 * * 4')
} }
options { options {
@@ -36,13 +36,14 @@ pipeline {
sh """ sh """
. venv/bin/activate . venv/bin/activate
python3 bsky_post.py "Feliç dijous!!!!" \\ python3 bsky_post.py "Feliç dijous!!!!" \\
--username "\$BSKY_HANDLE" \\ --username "\$BSKY_GROMENAWARE_HANDLE" \\
--password "\$BSKY_APP_PASSWORD" \\ --password "\$BSKY_GROMENAWARE_APP_PASSWORD" \\
--image media/dijous.jpg \\ --image media/dijous.jpg \\
--alt "Feliç dijous!!" \\ --alt "Feliç dijous!!" \\
--lang ca \\ --lang ca \\
--service https://eurosky.social --service https://eurosky.social
""" """
}
} }
} }
} }

View File

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

View File

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