From abf0c95bac636707584a9c18db1434963806d70a Mon Sep 17 00:00:00 2001 From: willemjan Date: Thu, 13 Aug 2026 23:49:47 +0200 Subject: [PATCH] roll back --- Jenkinsfile | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 38d6cda..02aaf87 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,32 +1,25 @@ pipeline { agent any + environment { + REGISTRY = 'gitea.zb-kw.duckdns.org' + IMAGE = "${REGISTRY}/willemjan/glucose-dashboard" + OC_SERVER = 'https://api.rm1.0a51.p1.openshiftapps.com:6443' + OC_PROJECT = 'willemjan-dev' + } + options { - skipDefaultCheckout(true) + buildDiscarder(logRotator(numToKeepStr: '20')) + timeout(time: 20, unit: 'MINUTES') } stages { - stage('Probe') { - steps { - sh 'whoami; git --version; java -version' - } - } - stage('Checkout') { steps { - withCredentials([usernamePassword( - credentialsId: 'gitea_user', - usernameVariable: 'GIT_USER', - passwordVariable: 'GIT_TOKEN')]) { - sh ''' - git init -q . - git remote add origin \ - "https://${GIT_USER}:${GIT_TOKEN}@git.jouwdomain.duckdns.org/willemjan/glucose-dashboard.git" \ - 2>/dev/null || true - git fetch --depth 1 origin "${BRANCH_NAME}" - git checkout -q FETCH_HEAD - git rev-parse --short HEAD - ''' + checkout scm + script { + env.TAG = sh(script: 'git rev-parse --short HEAD', + returnStdout: true).trim() } } } @@ -48,7 +41,7 @@ pipeline { stage('Build & push image') { steps { withCredentials([usernamePassword( - credentialsId: 'gitea-registry', + credentialsId: 'gitea_user', usernameVariable: 'REG_USER', passwordVariable: 'REG_PASS')]) { sh '''