@@ -340,13 +340,14 @@ export default class OtomiStack {
340340 cleanSecretPaths . push ( p )
341341 } else {
342342 teams . forEach ( ( teamId : string ) => {
343- if ( p . indexOf ( teamProp ) === 0 )
343+ if ( p . indexOf ( teamProp ) === 0 ) {
344344 cleanSecretPaths . push (
345345 p
346346 . replace ( teamProp , `teamConfig.${ teamId } ` )
347347 // add spec to the path for v2 endpoints
348348 . replace ( `teamConfig.${ teamId } .settings` , `teamConfig.${ teamId } .settings.spec` ) ,
349349 )
350+ }
350351 } )
351352 }
352353 } )
@@ -797,7 +798,7 @@ export default class OtomiStack {
797798 const configKey = this . getConfigKey ( 'AplTeamWorkloadValues' )
798799 const repo = this . createTeamConfigInRepo ( teamId , configKey , [ values ] )
799800 const fileMap = getFileMaps ( '' ) . find ( ( fm ) => fm . kind === 'AplTeamWorkloadValues' ) !
800- await this . git . saveConfig ( repo , fileMap )
801+ await this . git . saveConfig ( repo , fileMap , false )
801802 }
802803
803804 async saveTeamPolicy ( teamId : string , data : AplPolicyResponse ) : Promise < void > {
@@ -1549,11 +1550,12 @@ export default class OtomiStack {
15491550
15501551 async createAplBuild ( teamId : string , data : AplBuildRequest ) : Promise < AplBuildResponse > {
15511552 const buildName = `${ data ?. spec ?. imageName } -${ data ?. spec ?. tag } `
1552- if ( buildName . length > 128 )
1553+ if ( buildName . length > 128 ) {
15531554 throw new HttpError (
15541555 400 ,
15551556 'Invalid container image name, the combined image name and tag must not exceed 128 characters.' ,
15561557 )
1558+ }
15571559 try {
15581560 const build = this . repoService . getTeamConfigService ( teamId ) . createBuild ( data )
15591561 await this . saveTeamConfigItem ( build )
@@ -1566,8 +1568,9 @@ export default class OtomiStack {
15661568 )
15671569 return build
15681570 } catch ( err ) {
1569- if ( err . code === 409 )
1571+ if ( err . code === 409 ) {
15701572 err . publicMessage = 'Container image name already exists, the combined image name and tag must be unique.'
1573+ }
15711574 throw err
15721575 }
15731576 }
@@ -1745,8 +1748,9 @@ export default class OtomiStack {
17451748 fileContent = fileContent . replace ( regex , variables [ key ] as string )
17461749 } )
17471750 if ( file === 'tty_02_Pod.yaml' ) fileContent = podContentAddTargetTeam ( fileContent )
1748- if ( ! sessionUser . isPlatformAdmin && file === 'tty_03_Rolebinding.yaml' )
1751+ if ( ! sessionUser . isPlatformAdmin && file === 'tty_03_Rolebinding.yaml' ) {
17491752 fileContent = rolebindingContentsForUsers ( fileContent )
1753+ }
17501754 return fileContent
17511755 } ) ,
17521756 )
@@ -1774,8 +1778,9 @@ export default class OtomiStack {
17741778 const { sub, isPlatformAdmin, teams } = sessionUser as { sub : string ; isPlatformAdmin : boolean ; teams : string [ ] }
17751779 const userTeams = teams . map ( ( teamName ) => `team-${ teamName } ` )
17761780 try {
1777- if ( await checkPodExists ( 'team-admin' , `tty-${ sessionUser . sub } ` ) )
1781+ if ( await checkPodExists ( 'team-admin' , `tty-${ sessionUser . sub } ` ) ) {
17781782 await k8sdelete ( { sub, isPlatformAdmin, userTeams } )
1783+ }
17791784 } catch ( error ) {
17801785 debug ( 'Failed to delete cloudtty' )
17811786 }
0 commit comments