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