diff --git a/Jenkinsfile b/Jenkinsfile
deleted file mode 100644
index 77dcd42..0000000
--- a/Jenkinsfile
+++ /dev/null
@@ -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_ntp \
- -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_ntp.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/doc/_index.html b/doc/_index.html
index 6e2bbf7..5afc9e2 100644
--- a/doc/_index.html
+++ b/doc/_index.html
@@ -98,6 +98,11 @@
+
+ confdroid_ntp::monitoring::loki
+
+
+
confdroid_ntp::monitoring::target
diff --git a/doc/puppet_class_list.html b/doc/puppet_class_list.html
index 950878f..4055d68 100644
--- a/doc/puppet_class_list.html
+++ b/doc/puppet_class_list.html
@@ -78,14 +78,21 @@
-
+
+
+
+
+
+
-
+
diff --git a/doc/puppet_classes/confdroid_ntp_3A_3Amain_3A_3Aconfig.html b/doc/puppet_classes/confdroid_ntp_3A_3Amain_3A_3Aconfig.html
index b118542..eead54c 100644
--- a/doc/puppet_classes/confdroid_ntp_3A_3Amain_3A_3Aconfig.html
+++ b/doc/puppet_classes/confdroid_ntp_3A_3Amain_3A_3Aconfig.html
@@ -109,7 +109,11 @@
11
12
13
-14
+14
+15
+16
+17
+18
# File 'manifests/main/config.pp', line 6
@@ -122,6 +126,10 @@ class confdroid_ntp::main::config (
if $cy_manage_nagios == true {
include confdroid_ntp::monitoring::target
}
+
+ if $cy_manage_loki == true {
+ include confdroid_ntp::monitoring::loki
+ }
}
|
diff --git a/doc/puppet_classes/confdroid_ntp_3A_3Amonitoring_3A_3Aloki.html b/doc/puppet_classes/confdroid_ntp_3A_3Amonitoring_3A_3Aloki.html
new file mode 100644
index 0000000..53b5ac7
--- /dev/null
+++ b/doc/puppet_classes/confdroid_ntp_3A_3Amonitoring_3A_3Aloki.html
@@ -0,0 +1,138 @@
+
+
+
+
+
+
+ Puppet Class: confdroid_ntp::monitoring::loki
+
+ — Documentation by YARD 0.9.36
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Puppet Class: confdroid_ntp::monitoring::loki
+
+
+
Summary
+ Class manages loki monitoring for the confdroid_ntp services
+
+
Overview
+
+
+
+
confdroid_ntp::monitoring::loki.pp Module name: confdroid_ntp Author: 12ww1160 (12ww1160@confdroid.com)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+6
+7
+8
+9
+10
+11
+12
+13
+14
+ |
+
+ # File 'manifests/monitoring/loki.pp', line 6
+
+class confdroid_ntp::monitoring::loki (
+
+) inherits confdroid_ntp::params {
+ if $cy_manage_loki == true {
+ confdroid_loki::log_targets { "confdroid_ntp_${fqdn}":
+ log_target => ['/var/log/chrony/*.log'],
+ }
+ }
+}
+ |
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/puppet_classes/confdroid_ntp_3A_3Aparams.html b/doc/puppet_classes/confdroid_ntp_3A_3Aparams.html
index e9da07a..8f16830 100644
--- a/doc/puppet_classes/confdroid_ntp_3A_3Aparams.html
+++ b/doc/puppet_classes/confdroid_ntp_3A_3Aparams.html
@@ -77,6 +77,8 @@
confdroid_ntp::main::service
+ confdroid_ntp::monitoring::loki
+
confdroid_ntp::monitoring::target
@@ -356,6 +358,24 @@
—
List of Nagios contacts for notifications. must exist in Nagios contacts configuration!
+
+
+
+
+
+
+ cy_manage_loki
+
+
+ (Boolean)
+
+
+ (defaults to: false)
+
+
+ —
+
+
Whether to manage Loki logging for the module.
@@ -371,7 +391,6 @@
-27
28
29
30
@@ -414,10 +433,14 @@
67
68
69
-70
+70
+71
+72
+73
+74
- # File 'manifests/params.pp', line 27
+ # File 'manifests/params.pp', line 28
class confdroid_ntp::params (
@@ -441,6 +464,9 @@ class confdroid_ntp::params (
String $cy_target_service = '/etc/nagios/conf.d/chronyd_service.cfg',
Array $cy_target_contacts = ['nagiosadmin'],
+# loki
+ Boolean $cy_manage_loki = false,
+
) {
# facts
$fqdn = $facts['networking']['fqdn']
|