diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aab5f95 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +.yardoc +Gemfile.lock +FileList +.scannerwork +.vscode +.puppet-lint.rc +.rspec 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 528f196..0000000 --- a/.scannerwork/report-task.txt +++ /dev/null @@ -1,6 +0,0 @@ -projectKey=automatic_cd -serverUrl=https://sonarqube.confdroid.com -serverVersion=25.5.0.107428 -dashboardUrl=https://sonarqube.confdroid.com/dashboard?id=automatic_cd -ceTaskId=32a467a0-6b69-44e2-ad8b-26a38d29383a -ceTaskUrl=https://sonarqube.confdroid.com/api/ce/task?id=32a467a0-6b69-44e2-ad8b-26a38d29383a diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 15d16a0..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "cSpell.words": [ - "debuglevel", - "notifyonly", - "Ssendwait" - ] -} \ No newline at end of file diff --git a/.yardoc/checksums b/.yardoc/checksums deleted file mode 100644 index 824141d..0000000 --- a/.yardoc/checksums +++ /dev/null @@ -1,7 +0,0 @@ -manifests/init.pp 478e2a087e702bfd4cf48c5d8984325040307f15 -manifests/params.pp dbafa4ecafba7351af41dbbae8baca878a5ec959 -manifests/main/dirs.pp af59ff6da810f0490aff3b9c21a8f3c69ae5b20b -manifests/main/files.pp edab2ec72add8ddf6284fbb375b648cf7f65f077 -manifests/main/config.pp 27413292f36c6dd5df14e4c64455d623a0b164fa -manifests/main/install.pp 5a03608b5080efd898c40968c2c8c5dfc9762fb2 -manifests/main/service.pp bc471c6cf6baeba3123fb3c6f037691afd4c87c3 diff --git a/.yardoc/complete b/.yardoc/complete deleted file mode 100644 index e69de29..0000000 diff --git a/.yardoc/object_types b/.yardoc/object_types deleted file mode 100644 index 86e2045..0000000 Binary files a/.yardoc/object_types and /dev/null differ diff --git a/.yardoc/objects/root.dat b/.yardoc/objects/root.dat deleted file mode 100644 index a83cffa..0000000 Binary files a/.yardoc/objects/root.dat and /dev/null differ diff --git a/.yardoc/proxy_types b/.yardoc/proxy_types deleted file mode 100644 index beefda1..0000000 Binary files a/.yardoc/proxy_types and /dev/null differ diff --git a/Jenkinsfile b/Jenkinsfile index 248d03f..268d25e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,5 @@ pipeline { - agent { - label 'puppet' - } + agent any post { always { @@ -69,7 +67,7 @@ pipeline { withCredentials([string(credentialsId: 'sonar-token', variable: 'SONAR_TOKEN')]) { sh ''' /opt/sonar-scanner/bin/sonar-scanner \ - -Dsonar.projectKey=automatic_cd \ + -Dsonar.projectKey=confdroid_automatic \ -Dsonar.sources=. \ -Dsonar.host.url=https://sonarqube.confdroid.com \ -Dsonar.token=$SONAR_TOKEN @@ -90,6 +88,10 @@ pipeline { sh ''' git config user.name "Jenkins Server" git config user.email jenkins@confdroid.com + git rm -r --cached .scannerwork || echo "No .scannerwork to remove from git" + git rm -r --cached .yardoc || echo "No .yardoc to remove from git" + git rm -r --cached .vscode || echo "No .vscode to remove from git" + git commit --amend --no-edit --allow-empty git add -A && git commit -am "Recommit for updates in build $BUILD_NUMBER" || echo "No changes to commit" git push -o merge_request.create \ -o merge_request.target=master \ @@ -101,5 +103,30 @@ pipeline { } } } + + 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 .vscode || echo "No .vscode to remove from git" + git commit --amend --no-edit --allow-empty + git remote add master https://sourcecode.confdroid.com/confdroid/confdroid_automatic.git + git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \ + push master --mirror + ''' + } + } + } + } } } \ No newline at end of file diff --git a/README.md b/README.md index f6166ec..dd0daed 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Readme -[![Build Status](https://jenkins.confdroid.com/buildStatus/icon?job=automatic_cd)](https://jenkins.confdroid.com/job/automatic_cd/)| +[![Build Status](https://jenkins.confdroid.com/buildStatus/icon?job=confdroid_automatic)](https://jenkins.confdroid.com/job/confdroid_automatic/)| [[_TOC_]] @@ -8,7 +8,7 @@ dnf-automatic is a mechanism to allow automatic OS updates for Rocky 9. -`automatic_cd` manages dnf-automatic installations and configurations. +`confdroid_automatic` manages dnf-automatic installations and configurations. ## WARNING diff --git a/doc/_index.html b/doc/_index.html index a66fed5..dff28cb 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -64,42 +64,42 @@ -