Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
Remove fix permissions (#31)
Browse files Browse the repository at this point in the history
* Remove obscure fix permission, which breaks existing dbs
  • Loading branch information
GoebelL authored Nov 18, 2020
1 parent ecbfe58 commit e08a759
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions shared/start.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,13 @@

void execute(String FQDN = env.NODE_NAME + '.intern.est.fujitsu.com') {

def _fixPermissionsForTesting = {
sh '''

if [ ${COMPLETE_CLEANUP} == "false" ]; then
mkdir -p ${WORKSPACE}/backup
cp -r ${WORKSPACE}/docker/config ${WORKSPACE}/backup
cp -r ${WORKSPACE}/docker/data ${WORKSPACE}/backup
cp -r ${WORKSPACE}/docker/logs ${WORKSPACE}/backup
fi;

rm -rf ${WORKSPACE}/docker
mkdir -p ${WORKSPACE}/docker/config/oscm-identity/tenants/


if [ ${COMPLETE_CLEANUP} == "false" ]; then
mkdir -p ${WORKSPACE}/backup
cp -r ${WORKSPACE}/backup/config ${WORKSPACE}/docker
cp -r ${WORKSPACE}/backup/data ${WORKSPACE}/docker
cp -r ${WORKSPACE}/backup/logs ${WORKSPACE}/docker
rm -rf ${WORKSPACE}/backup
fi;
'''
}

def _createEnvTemplates = {
stage('Start - create env templates') {
// If the docker dir doesn't exists at this point, it is created with root owner by volume mapping with the docker run command
// But we need to change it's owner to jenkins here, in order that env files can be replaced with sed later on
// (this is because sed needs permission to create a temp file in this directory!)
sh '''
docker run --rm -v ${WORKSPACE}/docker:/docker busybox chown $(id -u jenkins):$(id -g jenkins) /docker
docker run \
--name deployer1 \
--rm \
Expand Down Expand Up @@ -173,8 +153,6 @@ void execute(String FQDN = env.NODE_NAME + '.intern.est.fujitsu.com') {
}
}


_fixPermissionsForTesting()
_createEnvTemplates()
_setupEnv()
_setupVarEnv()
Expand Down

0 comments on commit e08a759

Please sign in to comment.