Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- [#72] Configuration options for resource requirements
- [#72] Defaults for CPU and memory requests
- Configuration options for store caches ([#75](https://github.com/cloudogu/scm/pull/75))
### Removed
- Default Plugins ([#70](https://github.com/cloudogu/scm/pull/70/files))

Expand Down
14 changes: 13 additions & 1 deletion dogu.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,18 @@
"Validation": {
"Type": "BINARY_MEASUREMENT"
}
},
{
"Name": "caching/stores/enabled",
"Description": "To enable store caches, set this to 'true'.",
"Optional": true,
"Default": "false"
},
{
"Name": "caching/dataFiles/size",
"Description": "To enable data file caches, set this to an integer value > 0.",
"Optional": true,
"Default": "0"
}
],
"ExposedPorts": [
Expand Down Expand Up @@ -238,4 +250,4 @@
"Type": "tcp",
"Port": 8080
}
}
}
8 changes: 8 additions & 0 deletions resources/etc/default/scm-server
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ if [ "$(doguctl config 'caching/workdir/size' -d 'empty')" != "empty" ]; then
SCM_WORKDIR_CACHE=$(doguctl config "caching/workdir/size")
EXTRA_JVM_ARGUMENTS="$EXTRA_JVM_ARGUMENTS -Dscm.workingCopyPoolSize=${SCM_WORKDIR_CACHE} -Dscm.workingCopyPoolStrategy=sonia.scm.repository.work.SimpleCachingWorkingCopyPool"
fi

if [ "$(doguctl config 'caching/stores/enabled' -d 'false')" == "true" ]; then
EXTRA_JVM_ARGUMENTS="$EXTRA_JVM_ARGUMENTS -Dscm.storeCache.enabled=true"
fi
if [ "$(doguctl config 'caching/dataFiles/size' -d '0')" > 0 ]; then
DATA_FILE_CACHE_SIZE=$(doguctl config 'caching/dataFiles/size')
EXTRA_JVM_ARGUMENTS="$EXTRA_JVM_ARGUMENTS -Dscm.cache.dataFile.maximumSize=${DATA_FILE_CACHE_SIZE} -Dscm.cache.dataFileCache.enabled=true"
fi
3 changes: 0 additions & 3 deletions resources/var/tmp/scm/init.script.d/020-configuration.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ def context = injector.getInstance(SCMContextProvider.class);
String pluginCenterUrl = getValueFromEtcd("plugin_center_url");
if (pluginCenterUrl != null && !pluginCenterUrl.isEmpty()) {
config.setPluginUrl(pluginCenterUrl);
} else if (context.version.contains("SNAPSHOT")) {
config.setPluginUrl("https://oss.cloudogu.com/jenkins/job/scm-manager-github/job/ci-plugin-snapshot/job/master/lastSuccessfulBuild/artifact/plugins/plugin-center.json");
config.setPluginAuthUrl("");
}

String pluginCenterAuthenticationUrl = getValueFromEtcd("plugin_center_authentication_url");
Expand Down