Compare commits

...

4 Commits

Author SHA1 Message Date
Jenkins Server
bdb7946c22 Remove Jenkinsfile for Gitea mirror 2026-04-16 16:32:05 +02:00
Jenkins Server
6107af263f Merge build 8 into master 2026-04-16 16:32:02 +02:00
Jenkins Server
0b6492808c Recommit for updates in build 8 2026-04-16 16:32:01 +02:00
f4d99f7e90 OP#581 edit Readme 2026-04-16 16:30:45 +02:00
4 changed files with 32 additions and 159 deletions

138
Jenkinsfile vendored
View File

@@ -1,138 +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
git fetch origin
source_branch="${gitlabSourceBranch:-${BRANCH_NAME:-${GIT_LOCAL_BRANCH:-$GIT_BRANCH}}}"
source_branch="${source_branch#origin/}"
source_branch="${source_branch#refs/heads/}"
if [ -z "$source_branch" ]; then
source_branch="development"
fi
echo "Using source branch: $source_branch"
# Create an isolated build branch from the triggering branch revision.
git checkout -B jenkins-build-$BUILD_NUMBER "origin/$source_branch"
# Merge the current master into the build branch before validation.
git merge origin/master --no-ff || { echo "Merge conflict detected"; exit 1; }
'''
}
}
}
stage('puppet parser') {
steps {
sh '''for file in $(find . -iname \'*.pp\'); do
/opt/puppetlabs/bin/puppet parser validate --color false --render-as s --modulepath=modules $file || exit 1;
done;'''
}
}
stage('check templates') {
steps{
sh '''for file in $(find . -iname \'*.erb\');
do erb -P -x -T "-" $file | ruby -c || exit 1;
done;'''
}
}
stage('puppet-lint') {
steps {
sh '''/usr/local/bin/puppet-lint . \\
--no-variable_scope-check \\
|| { echo "Puppet lint failed"; exit 1; }
'''
}
}
stage('SonarScan') {
steps {
withCredentials([string(credentialsId: 'sonar-token', variable: 'SONAR_TOKEN')]) {
sh '''
/opt/sonar-scanner/bin/sonar-scanner \
-Dsonar.projectKey=confdroid_jenkins \
-Dsonar.sources=. \
-Dsonar.host.url=https://sonarqube.confdroid.com \
-Dsonar.token=$SONAR_TOKEN
'''
}
}
}
stage('create Puppet documentation') {
steps {
sh '/opt/puppetlabs/bin/puppet strings'
}
}
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 rm -r --cached .vscode || echo "No .vscode to remove from git"
git add -A && git commit -am "Recommit for updates in build $BUILD_NUMBER" || echo "No changes to commit"
git fetch origin
git checkout -B master origin/master
git merge --no-ff jenkins-build-$BUILD_NUMBER -m "Merge build $BUILD_NUMBER into master"
git push origin master
'''
}
}
}
stage('Mirror to Gitea') {
steps {
withCredentials([usernamePassword(
credentialsId: 'Jenkins-gitea',
usernameVariable: 'GITEA_USER',
passwordVariable: 'GITEA_TOKEN')]) {
script {
sh '''
git fetch origin
git checkout -B gitea-mirror-$BUILD_NUMBER origin/master
git rm -f Jenkinsfile
git commit -m "Remove Jenkinsfile for Gitea mirror" || echo "No changes to commit"
git remote get-url master >/dev/null 2>&1 \
&& git remote set-url master https://sourcecode.confdroid.com/confdroid/confdroid_jenkins.git \
|| git remote add master https://sourcecode.confdroid.com/confdroid/confdroid_jenkins.git
git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \
push --force master HEAD:refs/heads/master
git ls-remote --heads master | awk '{print $2}' | sed 's#refs/heads/##' | while read branch; do
if [ -n "$branch" ] && [ "$branch" != "master" ]; then
git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \
push master --delete "$branch"
fi
done
'''
}
}
}
}
}
}

View File

@@ -10,13 +10,13 @@ Puppet 6 repo for managing Jenkins. Internal only due to access details for gitl
## WARNING
***Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production***
> **Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production**
## Features
INSTALLATION
* installs required binaries
- installs required binaries
## Repo Documentation
@@ -26,11 +26,11 @@ See the full Puppet documentation including parameters in `docs/index.html`
All dependencies must be included in the catalogue.
* [java_cd](https://gitlab.confdroid.com/puppet/java_cd) to install java
- [java_cd](https://gitlab.confdroid.com/puppet/java_cd) to install java
## Deployment
* native Puppet deployment
- native Puppet deployment
via site.pp or nodes.pp
@@ -40,7 +40,7 @@ node 'example.example.net' {
}
```
* through Foreman:
- through Foreman:
In order to apply parameters through Foreman, the params.pp must be added to the host or host group in question.
@@ -54,21 +54,22 @@ All files and directories are configured with correct selinux context. If selinu
## Support
* OS: Rocky 9
* Puppet 6-8
- OS: Rocky 9 (all RHEL-based OS should work but Rocky 9 is tested)
- Puppet 8
## Tests
* Puppet Lint
* Puppet Parser
* ERB Template Parser
* Sonar Quality Gate
- Puppet Lint
- Puppet Parser
- ERB Template Parser
- Sonar Quality Gate
## Contact Us
[contact Us](https://confdroid.com/contact/)
- [contact Us](https://confdroid.com/contact/)
- [Feedback Portal](https://feedback.confdroid.com/)
## Disclaimer
ConfDroid as entity is entirely independent from Puppet. We provide custom configuration modules, written for specific purposes and specific environments.
The modules are tested and supported only as documented, and require testing in designated environments (i.e. lab or development environments) for parameter tuning etc. before deploying into production environments.
The modules are tested and supported only as documented, and require testing in designated environments (i.e. lab or development environments) for parameter tuning etc. before deploying into production environments.

View File

@@ -70,7 +70,9 @@
<h2 id="label-WARNING">WARNING</h2>
<p><strong><em>Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production</em></strong></p>
<blockquote>
<p><strong>Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production</strong></p>
</blockquote>
<h2 id="label-Features">Features</h2>
@@ -117,9 +119,9 @@
<h2 id="label-Support">Support</h2>
<ul><li>
<p>OS: Rocky 9</p>
<p>OS: Rocky 9 (all RHEL-based OS should work but Rocky 9 is tested)</p>
</li><li>
<p>Puppet 6-8</p>
<p>Puppet 8</p>
</li></ul>
<h2 id="label-Tests">Tests</h2>
@@ -134,8 +136,11 @@
</li></ul>
<h2 id="label-Contact+Us">Contact Us</h2>
<ul><li>
<p><a href="https://confdroid.com/contact/">contact Us</a></p>
</li><li>
<p><a href="https://feedback.confdroid.com/">Feedback Portal</a></p>
</li></ul>
<h2 id="label-Disclaimer">Disclaimer</h2>

View File

@@ -70,7 +70,9 @@
<h2 id="label-WARNING">WARNING</h2>
<p><strong><em>Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production</em></strong></p>
<blockquote>
<p><strong>Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production</strong></p>
</blockquote>
<h2 id="label-Features">Features</h2>
@@ -117,9 +119,9 @@
<h2 id="label-Support">Support</h2>
<ul><li>
<p>OS: Rocky 9</p>
<p>OS: Rocky 9 (all RHEL-based OS should work but Rocky 9 is tested)</p>
</li><li>
<p>Puppet 6-8</p>
<p>Puppet 8</p>
</li></ul>
<h2 id="label-Tests">Tests</h2>
@@ -134,8 +136,11 @@
</li></ul>
<h2 id="label-Contact+Us">Contact Us</h2>
<ul><li>
<p><a href="https://confdroid.com/contact/">contact Us</a></p>
</li><li>
<p><a href="https://feedback.confdroid.com/">Feedback Portal</a></p>
</li></ul>
<h2 id="label-Disclaimer">Disclaimer</h2>