Compare commits

...

4 Commits

Author SHA1 Message Date
Jenkins Server
fcf141dc35 Recommit for updates in build 3 2026-07-22 12:45:57 +02:00
Jenkins Server
425fd79204 Merge remote-tracking branch 'origin/master' into jenkins-build-3 2026-07-22 12:44:50 +02:00
f3923c6330 OP#647 update Readme 2026-07-22 12:44:26 +02:00
Jenkins Server
b55920b478 Recommit for updates in build 2 2026-07-21 13:38:10 +02:00
4 changed files with 28 additions and 134 deletions

127
Jenkinsfile vendored
View File

@@ -1,127 +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('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_alloy \
-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 push origin HEAD:master
'''
}
}
}
stage('Mirror to Gitea') {
steps {
sshagent(['edd05eb6-26b5-4c7b-a5cc-ea2ab899f4fa']) {
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_alloy.git
git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \
push master --mirror
'''
}
}
}
}
}
}
}

View File

@@ -20,7 +20,11 @@
## Synopsis ## Synopsis
Grafana Alloy is a log management agent built by Grafana labs to scrape and forward logs to Loki, a log management system also built by Grafana labs. Then you can use Grafana itself to visualize those logs and built an alerting system. Grafana Alloy is a log management agent built by Grafana labs to scrape and forward logs to Loki, a log management system also built by Grafana labs.
It also can scrape and forward metrics to Prometheus.
Then you can use Grafana itself to visualize those logs and metrics and built an alerting system.
`confdroid_alloy` is a Puppet module to automate installation and configuration of alloy. `confdroid_alloy` is a Puppet module to automate installation and configuration of alloy.
@@ -33,6 +37,7 @@ Grafana Alloy is a log management agent built by Grafana labs to scrape and forw
INSTALLATION INSTALLATION
- installs alloy binaries - installs alloy binaries
- installs node exporter (optional, set `ay_manage_ne`to `true`)
CONFIGURATION CONFIGURATION

View File

@@ -60,7 +60,7 @@
<div id="content"><div id='filecontents'> <div id="content"><div id='filecontents'>
<h1 id="label-Readme">Readme</h1> <h1 id="label-Readme">Readme</h1>
<p><a href="https://jenkins.confdroid.com/job/confdroid_alloy/"><img src="https://jenkins.confdroid.com/buildStatus/icon?job=confdroid_alloy&amp;style=plastic"></a></p> <p><a href="https://jenkins.confdroid.com/job/confdroid_alloy/"><img src="https://jenkins.confdroid.com/buildStatus/icon?job=confdroid_alloy&amp;style=plastic"></a> <a href="https://sonarqube.confdroid.com/dashboard?id=confdroid_alloy"><img src="https://sonarqube.confdroid.com/api/project_badges/measure?project=confdroid_alloy&amp;metric=security_hotspots&amp;token=sqb_05c3bd9116b3d2585b1f06dd7b6d0d5a6433fe8b"></a> <a href="https://deepwiki.com/grizzlycoda/puppet_collection"><img src="https://deepwiki.com/badge.svg"></a></p>
<ul><li> <ul><li>
<p><a href="#readme">Readme</a></p> <p><a href="#readme">Readme</a></p>
</li><li> </li><li>
@@ -91,7 +91,11 @@
<h2 id="label-Synopsis">Synopsis</h2> <h2 id="label-Synopsis">Synopsis</h2>
<p>Grafana Alloy is a log management agent built by Grafana labs to scrape and forward logs to Loki, a log management system also built by Grafana labs. Then you can use Grafana itself to visualize those logs and built an alerting system.</p> <p>Grafana Alloy is a log management agent built by Grafana labs to scrape and forward logs to Loki, a log management system also built by Grafana labs.</p>
<p>It also can scrape and forward metrics to Prometheus.</p>
<p>Then you can use Grafana itself to visualize those logs and metrics and built an alerting system.</p>
<p><code>confdroid_alloy</code> is a Puppet module to automate installation and configuration of alloy.</p> <p><code>confdroid_alloy</code> is a Puppet module to automate installation and configuration of alloy.</p>
@@ -104,13 +108,17 @@
<p>INSTALLATION</p> <p>INSTALLATION</p>
<ul><li> <ul><li>
<p>installs alloy binaries</p> <p>installs alloy binaries</p>
</li><li>
<p>installs node exporter (optional, set <code>ay_manage_ne</code>to <code>true</code>)</p>
</li></ul> </li></ul>
<p>CONFIGURATION</p> <p>CONFIGURATION</p>
<ul><li> <ul><li>
<p>manage directories and files including templates</p> <p>manage directories and files including templates</p>
</li><li> </li><li>
<p>manages the main alloy jenkins for loki and prometheus</p> <p>manages the main alloy pipeline for loki and prometheus</p>
</li><li>
<p>manages log rotation for rsyslog to allow adm membership</p>
</li><li> </li><li>
<p>manage service</p> <p>manage service</p>
</li></ul> </li></ul>

View File

@@ -60,7 +60,7 @@
<div id="content"><div id='filecontents'> <div id="content"><div id='filecontents'>
<h1 id="label-Readme">Readme</h1> <h1 id="label-Readme">Readme</h1>
<p><a href="https://jenkins.confdroid.com/job/confdroid_alloy/"><img src="https://jenkins.confdroid.com/buildStatus/icon?job=confdroid_alloy&amp;style=plastic"></a></p> <p><a href="https://jenkins.confdroid.com/job/confdroid_alloy/"><img src="https://jenkins.confdroid.com/buildStatus/icon?job=confdroid_alloy&amp;style=plastic"></a> <a href="https://sonarqube.confdroid.com/dashboard?id=confdroid_alloy"><img src="https://sonarqube.confdroid.com/api/project_badges/measure?project=confdroid_alloy&amp;metric=security_hotspots&amp;token=sqb_05c3bd9116b3d2585b1f06dd7b6d0d5a6433fe8b"></a> <a href="https://deepwiki.com/grizzlycoda/puppet_collection"><img src="https://deepwiki.com/badge.svg"></a></p>
<ul><li> <ul><li>
<p><a href="#readme">Readme</a></p> <p><a href="#readme">Readme</a></p>
</li><li> </li><li>
@@ -91,7 +91,11 @@
<h2 id="label-Synopsis">Synopsis</h2> <h2 id="label-Synopsis">Synopsis</h2>
<p>Grafana Alloy is a log management agent built by Grafana labs to scrape and forward logs to Loki, a log management system also built by Grafana labs. Then you can use Grafana itself to visualize those logs and built an alerting system.</p> <p>Grafana Alloy is a log management agent built by Grafana labs to scrape and forward logs to Loki, a log management system also built by Grafana labs.</p>
<p>It also can scrape and forward metrics to Prometheus.</p>
<p>Then you can use Grafana itself to visualize those logs and metrics and built an alerting system.</p>
<p><code>confdroid_alloy</code> is a Puppet module to automate installation and configuration of alloy.</p> <p><code>confdroid_alloy</code> is a Puppet module to automate installation and configuration of alloy.</p>
@@ -104,13 +108,17 @@
<p>INSTALLATION</p> <p>INSTALLATION</p>
<ul><li> <ul><li>
<p>installs alloy binaries</p> <p>installs alloy binaries</p>
</li><li>
<p>installs node exporter (optional, set <code>ay_manage_ne</code>to <code>true</code>)</p>
</li></ul> </li></ul>
<p>CONFIGURATION</p> <p>CONFIGURATION</p>
<ul><li> <ul><li>
<p>manage directories and files including templates</p> <p>manage directories and files including templates</p>
</li><li> </li><li>
<p>manages the main alloy jenkins for loki and prometheus</p> <p>manages the main alloy pipeline for loki and prometheus</p>
</li><li>
<p>manages log rotation for rsyslog to allow adm membership</p>
</li><li> </li><li>
<p>manage service</p> <p>manage service</p>
</li></ul> </li></ul>