From 37d301481e9943383083970a7d4d783be14f4f26 Mon Sep 17 00:00:00 2001 From: Jenkins Server Date: Fri, 26 Dec 2025 17:22:41 +0100 Subject: [PATCH] Recommit for updates in build 6 --- .scannerwork/.sonar_lock | 0 .scannerwork/report-task.txt | 6 --- Jenkinsfile | 95 ------------------------------------ 3 files changed, 101 deletions(-) delete mode 100644 .scannerwork/.sonar_lock delete mode 100644 .scannerwork/report-task.txt delete mode 100644 Jenkinsfile diff --git a/.scannerwork/.sonar_lock b/.scannerwork/.sonar_lock deleted file mode 100644 index e69de29..0000000 diff --git a/.scannerwork/report-task.txt b/.scannerwork/report-task.txt deleted file mode 100644 index df90514..0000000 --- a/.scannerwork/report-task.txt +++ /dev/null @@ -1,6 +0,0 @@ -projectKey=slugs-icons -serverUrl=https://sonarqube.confdroid.com -serverVersion=25.5.0.107428 -dashboardUrl=https://sonarqube.confdroid.com/dashboard?id=slugs-icons -ceTaskId=a9e69ee2-368c-4e2e-898f-f247c53df213 -ceTaskUrl=https://sonarqube.confdroid.com/api/ce/task?id=a9e69ee2-368c-4e2e-898f-f247c53df213 diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 1d12681..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,95 +0,0 @@ -pipeline { - agent { - label 'puppet' - } - - post { - always { - deleteDir() /* clean up our workspace */ - } - success { - updateGitlabCommitStatus state: 'success' - } - failure { - updateGitlabCommitStatus state: 'failed' - step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'support@confdroid.com', sendToIndividuals: true]) - } - } - - options { - gitLabConnection('gitlab.confdroid.com') - } - - stages { - - stage('pull master') { - steps { - sshagent(['edd05eb6-26b5-4c7b-a5cc-ea2ab899f4fa']) { - sh ''' - git config user.name "Jenkins Server" - git config user.email jenkins@confdroid.com - # Ensure we're on the development branch (triggered by push) - git checkout development - # Create jenkins branch from development - git checkout -b jenkins-build-$BUILD_NUMBER - # Optionally merge master into jenkins to ensure compatibility - git merge origin/master --no-ff || { echo "Merge conflict detected"; exit 1; } - ''' - } - } - } - - stage('SonarScan') { - steps { - withCredentials([string(credentialsId: 'sonar-token-12ww1160', variable: 'SONAR_TOKEN')]) { - sh ''' - /opt/sonar-scanner/bin/sonar-scanner \ - -Dsonar.projectKey=slugs-icons \ - -Dsonar.sources=. \ - -Dsonar.host.url=https://sonarqube.confdroid.com \ - -Dsonar.token=$SONAR_TOKEN - ''' - } - } - } - - stage('update repo') { - steps { - sshagent(['edd05eb6-26b5-4c7b-a5cc-ea2ab899f4fa']) { - sh ''' - git config user.name "Jenkins Server" - git config user.email jenkins@confdroid.com - git add -A && git commit -am "Recommit for updates in build $BUILD_NUMBER" || echo "No changes to commit" - git push origin HEAD:master - ''' - } - } - } - - stage('Mirror to Gitea') { - steps { - withCredentials([usernamePassword( - credentialsId: 'Jenkins-gitea', - usernameVariable: 'GITEA_USER', - passwordVariable: 'GITEA_TOKEN')]) { - script { - // Checkout from GitLab (already done implicitly) - sh ''' - git checkout master - git pull origin master - git branch -D development - git branch -D jenkins-build-$BUILD_NUMBER - git rm -f Jenkinsfile - git rm -r --cached .scannerwork - #git rm -r --cached .vscode - git commit --amend --no-edit --allow-empty - git remote add master https://gitea.confdroid.com/confdroid/slugs-icons.git - git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \ - push master --mirror - ''' - } - } - } - } - } -}