Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a8228d4
Init commit: add repoContext and repoInitializer
avetgit Feb 2, 2026
da047cc
translate comment to englisch
avetgit Feb 2, 2026
f4307f0
Rename and bugfix deploying prometheusStack misc dashboard
avetgit Feb 4, 2026
d29925b
Move createMonitoringCrd() from ArgoCD to PrometheusStack
avetgit Feb 4, 2026
6836b3c
Move generateRbac and helm logic out of prepareGitOps
avetgit Feb 4, 2026
278a750
small refactoring and renaming
avetgit Feb 4, 2026
385141c
Merge RepoContext and RepoIntializer into ArgoCDRepoContext
avetgit Feb 4, 2026
37a7e8b
Fix ingress grafana
avetgit Feb 9, 2026
92323b8
Move prepareGitOps to ArgoCDRepoSetup and fix ArgoCD unit tests
avetgit Feb 18, 2026
4fd9c0e
Fix PrometheusStackTest
avetgit Feb 18, 2026
47788e0
Move PrometheusStack relevant unit test from ArgoCD to PrometheusStac…
avetgit Feb 18, 2026
17db9ff
Add unit tests for ArgoCDRepoSetup
avetgit Feb 19, 2026
46ca978
Merge remote-tracking branch 'origin/main' into feature/restructure-a…
avetgit Feb 20, 2026
0d015c4
Fix unit tests
avetgit Feb 20, 2026
abc963f
Add "helm repo add traefic"-command in install ingress script
avetgit Feb 20, 2026
2595f41
Bug fix repo path to tenant.yaml and bootstrap.yaml in dedicated mode
avetgit Feb 20, 2026
e556927
Merge remote-tracking branch 'origin/main' into feature/restructure-a…
avetgit Feb 20, 2026
055f6d3
Fix merge conflicts
avetgit Feb 20, 2026
e447a1e
Fix monitoring unit tests
avetgit Feb 20, 2026
2ea946a
Rename prometheusstack to monitoring in deployment
avetgit Feb 20, 2026
14f5d71
Merge remote-tracking branch 'origin/main' into feature/restructure-a…
avetgit Feb 23, 2026
c0da853
Fix MonitoringTest
avetgit Feb 23, 2026
39e2b61
Merge branch 'main' into feature/restructure-argocd
nihussmann Feb 24, 2026
821195f
docs and code format rules added
nihussmann Feb 24, 2026
283db46
test
nihussmann Feb 24, 2026
41f8a84
adding .png
nihussmann Feb 24, 2026
09f2141
imports
nihussmann Feb 24, 2026
ab7c15c
update
nihussmann Feb 25, 2026
ed5931f
update
nihussmann Feb 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
621 changes: 621 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions compiler.groovy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
withConfig(configuration) {
ast(groovy.transform.CompileStatic)
ast(groovy.transform.TypeChecked)
}
ast(groovy.transform.CompileStatic)
ast(groovy.transform.TypeChecked)
}
39 changes: 39 additions & 0 deletions docs/code-format/Project_Default.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default"/>
<inspection_tool class="CodeNarc.BracesForTryCatchFinally" enabled="true" level="WARNING"
enabled_by_default="true">
<option name="catchOnSameLineAsClosingBrace" value="true"/>
<option name="catchOnSameLineAsOpeningBrace" value="true"/>
<option name="finallyOnSameLineAsClosingBrace" value="true"/>
<option name="finallyOnSameLineAsOpeningBrace" value="true"/>
</inspection_tool>
<inspection_tool class="CodeNarc.BuilderMethodWithSideEffects" enabled="false" level="WARNING"
enabled_by_default="false"/>
<inspection_tool class="CodeNarc.CompileStatic" enabled="false" level="WARNING" enabled_by_default="false"/>
<inspection_tool class="CodeNarc.DuplicateStringLiteral" enabled="false" level="WEAK WARNING"
enabled_by_default="false" editorAttributes="INFO_ATTRIBUTES"/>
<inspection_tool class="CodeNarc.FactoryMethodName" enabled="false" level="WARNING" enabled_by_default="false"/>
<inspection_tool class="CodeNarc.Indentation" enabled="false" level="WEAK WARNING" enabled_by_default="false"/>
<inspection_tool class="CodeNarc.LineLength" enabled="true" level="WARNING" enabled_by_default="true">
<option name="length" value="220"/>
</inspection_tool>
<inspection_tool class="CodeNarc.NoTabCharacter" enabled="false" level="WEAK WARNING"
enabled_by_default="false"/>
<inspection_tool class="CodeNarc.ParameterCount" enabled="true" level="WARNING" enabled_by_default="true">
<option name="maxParameters" value="8"/>
</inspection_tool>
<inspection_tool class="CodeNarc.PublicMethodsBeforeNonPublicMethods" enabled="false" level="WEAK WARNING"
enabled_by_default="false"/>
<inspection_tool class="CodeNarc.SpaceAfterCommentDelimiter" enabled="false" level="WEAK WARNING"
enabled_by_default="false"/>
<inspection_tool class="CodeNarc.SpaceBeforeCommentDelimiter" enabled="false" level="WEAK WARNING"
enabled_by_default="false"/>
<inspection_tool class="CodeNarc.StaticFieldsBeforeInstanceFields" enabled="false" level="WEAK WARNING"
enabled_by_default="false"/>
<inspection_tool class="CodeNarc.StaticMethodsBeforeInstanceMethods" enabled="false" level="WEAK WARNING"
enabled_by_default="false"/>
<inspection_tool class="CodeNarc.ThrowRuntimeException" enabled="false" level="WARNING"
enabled_by_default="false"/>
</profile>
</component>
28 changes: 28 additions & 0 deletions docs/code-format/code-format.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Code Formatting Guide

When you open a `.editorconfig` file in IntelliJ IDEA for the first time, you'll see an "Enable EditorConfig support"
button at the top of the editor. Simply click this button to activate EditorConfig support.

Alternatively, you can enable it manually:

1. Go to Settings/Preferences
2. Search for "EditorConfig"
3. Check "Enable EditorConfig support"

Once enabled, the project's `.editorconfig` file will be automatically recognized and its rules will be applied to your
code.

## Auto-Format on Commit

To ensure consistent code formatting across the project, you can configure IntelliJ to automatically format code before
committing:

![Format on Commit Configuration](format-commit.png)

## CodeNarc Inspection Profile

To use custom CodeNarc rules in IntelliJ:

![Loading CodeNarc Profile](loadCodeNarcProfile.png)

and load Project_Default.xml
Binary file added docs/code-format/format-commit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/code-format/formatsave.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/code-format/loadCodeNarcProfile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 6 additions & 8 deletions scripts/jenkins/pluginCheck.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@ List expected = []

String input = "${PLUGIN_LIST}"
input.split(",").toList().stream()
.filter { it.split(":")[0] != "prometheus" } // prometheus does not support dynamic loading and will be installed when restarting.
.collect()
.each { it -> expected.add(it.substring(0, it.indexOf(":"))) }
.filter { it.split(":")[0] != "prometheus" } // prometheus does not support dynamic loading and will be installed when restarting.
.collect()
.each { it -> expected.add(it.substring(0, it.indexOf(":"))) }

Jenkins.instance.pluginManager.failedPlugins.each {
available.add(it.name)
available.add(it.name)
}

Jenkins.instance.pluginManager.plugins.each {
available.add(it.shortName)
available.add(it.shortName)
}

available.each { p ->
if (expected.find { (it == p) })
plugins.add(p)
available.each { p -> if (expected.find { (it == p) }) plugins.add(p)
}

def commons = plugins.intersect(expected)
Expand Down
93 changes: 46 additions & 47 deletions src/main/groovy/com/cloudogu/gitops/Application.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,66 @@ package com.cloudogu.gitops

import com.cloudogu.gitops.config.Config
import com.cloudogu.gitops.utils.TemplatingEngine

import jakarta.inject.Singleton
import groovy.util.logging.Slf4j

import freemarker.template.Configuration
import freemarker.template.DefaultObjectWrapperBuilder
import groovy.util.logging.Slf4j
import jakarta.inject.Singleton

@Slf4j
@Singleton
class Application {

final List<Feature> features
final Config config
final List<Feature> features
final Config config

Application(Config config,
List<Feature> features
) {
this.config = config
// Order is important. Enforced by @Order-Annotation on the Singletons
this.features = features
}
Application(Config config,
List<Feature> features) {
this.config = config
// Order is important. Enforced by @Order-Annotation on the Singletons
this.features = features
}

def start() {
log.debug("Starting Application")
def start() {
log.debug("Starting Application")

setNamespaceListToConfig(config)
setNamespaceListToConfig(config)

features.forEach(feature -> {
feature.validate()
})
features.forEach(feature -> {
feature.install()
})
log.debug("Application finished")
}
features.forEach(feature -> {
feature.validate()
})
features.forEach(feature -> {
feature.install()
})
log.debug("Application finished")
}

List<Feature> getFeatures() {
return features
}
List<Feature> getFeatures() {
return features
}

void setNamespaceListToConfig(Config config) {
LinkedHashSet<String> dedicatedNamespaces = new LinkedHashSet<>()
LinkedHashSet<String> tenantNamespaces = new LinkedHashSet<>()
def engine = new TemplatingEngine()
void setNamespaceListToConfig(Config config) {
LinkedHashSet<String> dedicatedNamespaces = new LinkedHashSet<>()
LinkedHashSet<String> tenantNamespaces = new LinkedHashSet<>()
def engine = new TemplatingEngine()

config.content.namespaces.each { String ns ->
tenantNamespaces.add(engine.template(ns, [
config : config,
// Allow for using static classes inside the templates
statics: new DefaultObjectWrapperBuilder(Configuration.VERSION_2_3_32).build().getStaticModels()
]))
}
config.content.namespaces = tenantNamespaces.toList()
config.content.namespaces.each { String ns ->
tenantNamespaces.add(engine.template(ns, [config : config,
// Allow for using static classes inside the templates
statics: new DefaultObjectWrapperBuilder(Configuration.VERSION_2_3_32).build().getStaticModels()]))
}
config.content.namespaces = tenantNamespaces.toList()

//iterates over all FeatureWithImages and gets their namespaces
dedicatedNamespaces.addAll(this.features
.collect { it.activeNamespaceFromFeature }
.findAll { it }
.unique()
.collect { "${it}".toString() })
//iterates over all FeatureWithImages and gets their namespaces
dedicatedNamespaces.addAll(this.features
.collect { it.activeNamespaceFromFeature }
.findAll { it }
.unique()
.collect { "${it}".toString() })

config.application.namespaces.dedicatedNamespaces = dedicatedNamespaces
config.application.namespaces.tenantNamespaces = tenantNamespaces
log.debug("Active namespaces retrieved: {}", config.application.namespaces.activeNamespaces)
}
config.application.namespaces.dedicatedNamespaces = dedicatedNamespaces
config.application.namespaces.tenantNamespaces = tenantNamespaces
log.debug("Active namespaces retrieved: {}", config.application.namespaces.activeNamespaces)
}
}
Loading