diff --git a/CHANGELOG.md b/CHANGELOG.md index 78536157..eb8ed08d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Changed - Updates Java version from 8u222-1 to 11.0.4-2 +- Config key additional.plugins which was introduced in the last release will be renamed +according to our new key naming convention additional.plugins ➡ plugins/additional ## [v2.190.3-3] - 2020-02-26 ### Added diff --git a/dogu.json b/dogu.json index 0cc7b1fe..6f618d90 100644 --- a/dogu.json +++ b/dogu.json @@ -29,7 +29,7 @@ }], "Configuration": [ { - "Name": "additional.plugins", + "Name": "plugins/additional", "Description": "Comma separated list of plugin names to install on start", "Optional": true } diff --git a/resources/keymigration.sh b/resources/keymigration.sh new file mode 100644 index 00000000..cb9eb735 --- /dev/null +++ b/resources/keymigration.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -o errexit +set -o nounset +set -o pipefail + + +CURRENT_KEY="${1}" +NEW_KEY="${2}" + +if doguctl config "${CURRENT_KEY}"; then + echo "Migrating key ${CURRENT_KEY} to ${NEW_KEY}" + val=$(doguctl config "${CURRENT_KEY}") + doguctl config "${NEW_KEY}" "${val}" + if [[ $? -eq 0 ]]; then + doguctl config --remove "${CURRENT_KEY}" + echo "Keymigration finished successfully" + fi +else + echo "No Keymigration required" +fi + diff --git a/resources/startup.sh b/resources/startup.sh index 77ce48c0..65aee9d9 100755 --- a/resources/startup.sh +++ b/resources/startup.sh @@ -7,7 +7,8 @@ INIT_SCRIPT_FOLDER="/var/lib/jenkins/init.groovy.d" # TODO rename resources to jenkins MAIN_INIT_SCRIPTS_FOLDER="/var/tmp/resources/init.groovy.d" CUSTOM_INIT_SCRIPTS_FOLDER="/var/lib/custom.init.groovy.d" - +# migrate etcdkey to new naming convention +source keymigration.sh additional.plugins plugins/additional # set state to installing doguctl state 'installing' diff --git a/resources/var/tmp/resources/init.groovy.d/scripts/init030installplugins.groovy b/resources/var/tmp/resources/init.groovy.d/scripts/init030installplugins.groovy index 119f2be0..a6982197 100644 --- a/resources/var/tmp/resources/init.groovy.d/scripts/init030installplugins.groovy +++ b/resources/var/tmp/resources/init.groovy.d/scripts/init030installplugins.groovy @@ -77,7 +77,7 @@ def plugins = [ 'authorize-project' ]; -def additionalPluginPath = "config/jenkins/additional.plugins"; +def additionalPluginPath = "config/jenkins/plugins/additional"; if (keyExists(additionalPluginPath)){ println("Install additional plugins");