@@ -342,13 +342,14 @@ export default class OtomiStack {
342342 cleanSecretPaths . push ( p )
343343 } else {
344344 teams . forEach ( ( teamId : string ) => {
345- if ( p . indexOf ( teamProp ) === 0 )
345+ if ( p . indexOf ( teamProp ) === 0 ) {
346346 cleanSecretPaths . push (
347347 p
348348 . replace ( teamProp , `teamConfig.${ teamId } ` )
349349 // add spec to the path for v2 endpoints
350350 . replace ( `teamConfig.${ teamId } .settings` , `teamConfig.${ teamId } .settings.spec` ) ,
351351 )
352+ }
352353 } )
353354 }
354355 } )
@@ -801,7 +802,7 @@ export default class OtomiStack {
801802 const configKey = this . getConfigKey ( 'AplTeamWorkloadValues' )
802803 const repo = this . createTeamConfigInRepo ( teamId , configKey , [ values ] )
803804 const fileMap = getFileMaps ( '' ) . find ( ( fm ) => fm . kind === 'AplTeamWorkloadValues' ) !
804- await this . git . saveConfig ( repo , fileMap )
805+ await this . git . saveConfig ( repo , fileMap , false )
805806 }
806807
807808 async saveTeamPolicy ( teamId : string , data : AplPolicyResponse ) : Promise < void > {
@@ -1553,11 +1554,12 @@ export default class OtomiStack {
15531554
15541555 async createAplBuild ( teamId : string , data : AplBuildRequest ) : Promise < AplBuildResponse > {
15551556 const buildName = `${ data ?. spec ?. imageName } -${ data ?. spec ?. tag } `
1556- if ( buildName . length > 128 )
1557+ if ( buildName . length > 128 ) {
15571558 throw new HttpError (
15581559 400 ,
15591560 'Invalid container image name, the combined image name and tag must not exceed 128 characters.' ,
15601561 )
1562+ }
15611563 try {
15621564 const build = this . repoService . getTeamConfigService ( teamId ) . createBuild ( data )
15631565 await this . saveTeamConfigItem ( build )
@@ -1570,8 +1572,9 @@ export default class OtomiStack {
15701572 )
15711573 return build
15721574 } catch ( err ) {
1573- if ( err . code === 409 )
1575+ if ( err . code === 409 ) {
15741576 err . publicMessage = 'Container image name already exists, the combined image name and tag must be unique.'
1577+ }
15751578 throw err
15761579 }
15771580 }
@@ -1749,8 +1752,9 @@ export default class OtomiStack {
17491752 fileContent = fileContent . replace ( regex , variables [ key ] as string )
17501753 } )
17511754 if ( file === 'tty_02_Pod.yaml' ) fileContent = podContentAddTargetTeam ( fileContent )
1752- if ( ! sessionUser . isPlatformAdmin && file === 'tty_03_Rolebinding.yaml' )
1755+ if ( ! sessionUser . isPlatformAdmin && file === 'tty_03_Rolebinding.yaml' ) {
17531756 fileContent = rolebindingContentsForUsers ( fileContent )
1757+ }
17541758 return fileContent
17551759 } ) ,
17561760 )
@@ -1778,8 +1782,9 @@ export default class OtomiStack {
17781782 const { sub, isPlatformAdmin, teams } = sessionUser as { sub : string ; isPlatformAdmin : boolean ; teams : string [ ] }
17791783 const userTeams = teams . map ( ( teamName ) => `team-${ teamName } ` )
17801784 try {
1781- if ( await checkPodExists ( 'team-admin' , `tty-${ sessionUser . sub } ` ) )
1785+ if ( await checkPodExists ( 'team-admin' , `tty-${ sessionUser . sub } ` ) ) {
17821786 await k8sdelete ( { sub, isPlatformAdmin, userTeams } )
1787+ }
17831788 } catch ( error ) {
17841789 debug ( 'Failed to delete cloudtty' )
17851790 }
0 commit comments