From 58a7b8d9cb547e7a11a6dcfee877f74d88a9f1c7 Mon Sep 17 00:00:00 2001 From: s_zsolt Date: Thu, 5 Feb 2026 17:24:03 +0000 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index e69de29..c78a576 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -0,0 +1,40 @@ +pipeline { + agent any + + stages { + stage('Checkout') { + steps { + checkout scm + } + } + + stage('Create file') { + steps { + sh ''' + echo "Hello from Jenkins" > jenkis_test.txt + ''' + } + } + + stage('Commit & Push') { + steps { + withCredentials([ + usernamePassword( + credentialsId: 'gitea-creds', + usernameVariable: 'GIT_USER', + passwordVariable: 'GIT_PASS' + ) + ]) { + sh ''' + git config user.email "jenkins@local" + git config user.name "Jenkins" + + git add jenkis_test.txt + git commit -m "Jenkins: add jenkis_test.txt" || echo "Nothing to commit" + git push + ''' + } + } + } + } +}