THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Search for credentialsJSON
settings in repository with settings
Code Block | ||
---|---|---|
| ||
grep -R 'credentialsJSON:' .teamcity/ | \ sed -r 's|(.):.param name="(.)".value="(.)" .|\1 :: \2=\3|' | \ sed -r 's| spec=.||' |
Search for occurrences of UUIDs in <source-teamcity-host>:/<teamcity-data-dir>/config/project
Code Block | ||
---|---|---|
| ||
cd /<source-teamcity-data-dir>/config/project find . -name credentials.json | while read file; do echo "${file}" grep --color -E '(<UUID-1>|UUID-2|...|<UUID-n>)|$' "${file}" done |
Copy updated credentials.json
files to some folder
Code Block | ||
---|---|---|
| ||
cd /<source-teamcity-data-dir>/config/project mkdir -pv /tmp/credentialsJSON find . -name credentials.json | while read file; do cp -v --parents "${file}" /tmp/credentialsJSON done |
Pack secrets in archive
Code Block | ||
---|---|---|
| ||
cd /tmp/credentialsJSON zip -r ../credentialsJSON.zip * |
<source-teamcity-host>:/<teamcity-data-dir>/config/project
Find local secrets and remove them
Code Block | ||
---|---|---|
| ||
cd /<target-teamcity-data-dir>/config/project find . -name credentials.json -exec rm -v {} \; unzip credentialsJSON.zip * |
Restart TeamCity instance
Code Block | ||
---|---|---|
| ||
cd /<target-teamcity-server-dir> bash bin/teamcity-server.sh stop ... bash bin/teamcity-server.sh start |
/<target-teamcity-server-dir>/logs/teamcity-server.log
that TeamCity instance started correctly...