Skip to content

Commit

Permalink
#49 renames key additional.plugin -> plugins/additional
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Wolfes committed Mar 10, 2020
1 parent 4cbea48 commit a58e03b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dogu.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}],
"Configuration": [
{
"Name": "additional.plugins",
"Name": "plugins/additional",
"Description": "Comma separated list of plugin names to install on start",
"Optional": true
}
Expand Down
21 changes: 21 additions & 0 deletions resources/keymigration.sh
Original file line number Diff line number Diff line change
@@ -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

3 changes: 2 additions & 1 deletion resources/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit a58e03b

Please sign in to comment.