From 67842ee7f291a2e51acea1d464c23e00616b141f Mon Sep 17 00:00:00 2001 From: Guillem Hernandez Sola Date: Sun, 29 Mar 2026 17:57:32 +0200 Subject: [PATCH] Added new Jenkins file --- jenkins/3catJenkinsfile | 0 jenkins/3catJenkinsfileTw | 50 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) delete mode 100644 jenkins/3catJenkinsfile create mode 100644 jenkins/3catJenkinsfileTw diff --git a/jenkins/3catJenkinsfile b/jenkins/3catJenkinsfile deleted file mode 100644 index e69de29..0000000 diff --git a/jenkins/3catJenkinsfileTw b/jenkins/3catJenkinsfileTw new file mode 100644 index 0000000..87c9137 --- /dev/null +++ b/jenkins/3catJenkinsfileTw @@ -0,0 +1,50 @@ +pipeline { + agent any + + triggers { + // 'H' tells Jenkins to balance the load, running roughly every 30 minutes + cron('H/30 * * * *') + } + + stages { + stage('Checkout Code') { + steps { + // Pulls the code from the repository where this Jenkinsfile lives + checkout scm + } + } + + stage('Install Dependencies') { + steps { + sh ''' + pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q + playwright install chromium + ''' + } + } + + stage('Run Script') { + steps { + // Securely injects Jenkins credentials as environment variables + withCredentials([ + string(credentialsId: 'TWITTER_USERNAME', variable: 'TWITTER_USERNAME'), + string(credentialsId: 'TWITTER_PASSWORD', variable: 'TWITTER_PASSWORD'), + string(credentialsId: 'TWITTER_3CAT_EMAIL', variable: 'TWITTER_3CAT_EMAIL'), + string(credentialsId: 'TWITTER_3CAT_HANDLE', variable: 'TWITTER_3CAT_HANDLE'), + string(credentialsId: 'BSKY_3CAT_HANDLE', variable: 'BSKY_3CAT_HANDLE'), + string(credentialsId: 'BSKY_3CAT_APP_PASSWORD', variable: 'BSKY_3CAT_APP_PASSWORD') + ]) { + sh ''' + python3 twitter2bsky_daemon.py \ + --twitter-username "$TWITTER_USERNAME" \ + --twitter-password "$TWITTER_PASSWORD" \ + --twitter-email "$TWITTER_3CAT_EMAIL" \ + --twitter-handle "$TWITTER_3CAT_HANDLE" \ + --bsky-handle "$BSKY_3CAT_HANDLE" \ + --bsky-password "$BSKY_3CAT_APP_PASSWORD" + ''' + } + } + } + } +}