@@ -35,7 +35,7 @@ export const upsertProject: StepCall<Project> = async (payload) => {
35
35
const projectSelector2 = `dso/project.id=${ project . id } ,app.kubernetes.io/managed-by=dso-console`
36
36
37
37
const infraRepositories = project . repositories . filter ( repo => repo . isInfra )
38
- const sourceRepos = [
38
+ const sourceRepositories = [
39
39
`${ await gitlabApi . getGroupUrl ( ) } /**` ,
40
40
...splitExtraRepositories ( payload . config . argocd ?. extraRepositories ) ,
41
41
...splitExtraRepositories ( project . store . argocd ?. extraRepositories ) ,
@@ -76,6 +76,7 @@ export const upsertProject: StepCall<Project> = async (payload) => {
76
76
appProjectName ,
77
77
infraRepositories ,
78
78
infraProject . id ,
79
+ sourceRepositories ,
79
80
gitlabApi ,
80
81
vaultApi ,
81
82
)
@@ -91,7 +92,7 @@ export const upsertProject: StepCall<Project> = async (payload) => {
91
92
const minimalAppProject = getMinimalAppProjectPatch (
92
93
destination ,
93
94
appProjectName ,
94
- sourceRepos ,
95
+ sourceRepositories ,
95
96
roGroup ,
96
97
rwGroup ,
97
98
project ,
@@ -101,7 +102,7 @@ export const upsertProject: StepCall<Project> = async (payload) => {
101
102
} else {
102
103
const appProjectObject = getAppProjectObject ( {
103
104
name : appProjectName ,
104
- sourceRepos ,
105
+ sourceRepositories ,
105
106
destination,
106
107
roGroup,
107
108
rwGroup,
@@ -205,16 +206,14 @@ interface ArgoRepoSource {
205
206
path : string
206
207
valueFiles : string [ ]
207
208
}
208
- async function ensureInfraEnvValues ( project : Project , environment : Environment , appNamespace : string , roGroup : string , rwGroup : string , appProjectName : string , sourceRepos : Repository [ ] , repoId : number , gitlabApi : GitlabProjectApi , vaultApi : VaultProjectApi ) {
209
- const infraAppsRepoUrl = await gitlabApi . getRepoUrl ( 'infra-apps' )
210
- const gitlabGroupUrl = dirname ( infraAppsRepoUrl )
209
+ async function ensureInfraEnvValues ( project : Project , environment : Environment , appNamespace : string , roGroup : string , rwGroup : string , appProjectName : string , infraRepositories : Repository [ ] , repoId : number , sourceRepositories : string [ ] , gitlabApi : GitlabProjectApi , vaultApi : VaultProjectApi ) {
211
210
const cluster = getCluster ( project , environment )
212
211
const infraProject = await gitlabApi . getProjectById ( repoId )
213
212
const valueFilePath = getValueFilePath ( project , cluster , environment )
214
213
const vaultCredentials = await vaultApi . Project . getCredentials ( )
215
214
const repositories : ArgoRepoSource [ ] = await Promise . all ( [
216
215
getArgoRepoSource ( 'infra-apps' , environment . name , gitlabApi ) ,
217
- ...sourceRepos . map ( repo => getArgoRepoSource ( repo . internalRepoName , environment . name , gitlabApi ) ) ,
216
+ ...infraRepositories . map ( repo => getArgoRepoSource ( repo . internalRepoName , environment . name , gitlabApi ) ) ,
218
217
] )
219
218
const values = {
220
219
common : {
@@ -227,7 +226,7 @@ async function ensureInfraEnvValues(project: Project, environment: Environment,
227
226
cluster : inClusterLabel ,
228
227
namespace : getConfig ( ) . namespace ,
229
228
project : appProjectName ,
230
- envChartVersion : process . env . DSO_ENV_CHART_VERSION ?? 'dso-env-1.4.0 ' ,
229
+ envChartVersion : process . env . DSO_ENV_CHART_VERSION ?? 'dso-env-1.5.2 ' ,
231
230
nsChartVersion : process . env . DSO_NS_CHART_VERSION ?? 'dso-ns-1.1.1' ,
232
231
} ,
233
232
environment : {
@@ -242,7 +241,7 @@ async function ensureInfraEnvValues(project: Project, environment: Environment,
242
241
cpu : environment . quota . cpu ,
243
242
memory : environment . quota . memory ,
244
243
} ,
245
- sourceReposPrefix : gitlabGroupUrl ,
244
+ sourceRepositories ,
246
245
destination : {
247
246
namespace : appNamespace ,
248
247
name : cluster . label ,
0 commit comments