Fet
This commit is contained in:
@@ -6,14 +6,11 @@ pipeline {
|
||||
cron('15 7 * * 5')
|
||||
}
|
||||
|
||||
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'))
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
timestamps()
|
||||
buildDiscarder(logRotator(numToKeepStr: '10'))
|
||||
disableConcurrentBuilds()
|
||||
}
|
||||
|
||||
stages {
|
||||
@@ -30,6 +27,11 @@ pipeline {
|
||||
|
||||
stage('Post Dijous') {
|
||||
steps {
|
||||
// Securely injects Jenkins credentials as environment variables
|
||||
withCredentials([
|
||||
string(credentialsId: 'BSKY_GROMENAWARE_HANDLE', variable: 'BSKY_GROMENAWARE_HANDLE'),
|
||||
string(credentialsId: 'BSKY_GROMENAWARE_APP_PASSWORD', variable: 'BSKY_GROMENAWARE_APP_PASSWORD')
|
||||
])
|
||||
sh """
|
||||
. venv/bin/activate
|
||||
python3 bsky_post.py "DIVENDRES!!!!!!" \\
|
||||
@@ -45,10 +47,10 @@ pipeline {
|
||||
|
||||
post {
|
||||
success {
|
||||
echo '✅ Dijous post published successfully.'
|
||||
echo '✅ Divendres post published successfully.'
|
||||
}
|
||||
failure {
|
||||
echo '❌ Dijous post failed.'
|
||||
echo '❌ Divendres post failed.'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user