diff --git a/configs/.env b/configs/.env index c55e3d429..e5b2c72b9 100644 --- a/configs/.env +++ b/configs/.env @@ -28,6 +28,7 @@ GITHUB_DEPLOY_KEYS_POOL_SIZE=10 GITHUB_HOOK_NAME=web GITHUB_HOOK_SECRET=3V3RYTHINGisAW3S0ME! GITHUB_HOST=github.com +GITHUB_HOST_FOR_OCTOBEAR=github.com GITHUB_PROXY_EXPIRATION=3600 GITHUB_SCOPE=user:email,read:org,repo,repo_deployment,read:repo_hook,repo:status GITHUB_SUPER_SCOPE=user:email,read:org,repo,repo_deployment,read:repo_hook,repo:status,write:public_key diff --git a/lib/models/services/cluster-config-service.js b/lib/models/services/cluster-config-service.js index 548528a55..70bb6d6f8 100644 --- a/lib/models/services/cluster-config-service.js +++ b/lib/models/services/cluster-config-service.js @@ -1529,7 +1529,7 @@ module.exports = class ClusterConfigService { ownerUsername: GitHub.getOrgFromFullRepoName(repoFullName), userContentDomain: process.env.USER_CONTENT_DOMAIN, dockerComposeFilePath: rootFilePath, - scmDomain: process.env.GITHUB_HOST + scmDomain: process.env.GITHUB_HOST_FOR_OCTOBEAR } return octobear.parseAndMergeMultiple(opts, composeFilesContents) .then(parsedResult => { @@ -1815,7 +1815,7 @@ module.exports = class ClusterConfigService { return { builds: ClusterConfigService._uniquePathReduce(builds, 'build.dockerFilePath'), - externals: ClusterConfigService._uniquePathReduce(externals, 'repo') + externals: ClusterConfigService._uniquePathReduce(externals, 'code.repo') } } } diff --git a/unit/models/services/cluster-config-service.js b/unit/models/services/cluster-config-service.js index 459dea70d..6bf7adbf5 100644 --- a/unit/models/services/cluster-config-service.js +++ b/unit/models/services/cluster-config-service.js @@ -3039,13 +3039,19 @@ describe('Cluster Config Service Unit Tests', function () { }, externals: { github: { - repo: 'user/externalRepo' + code: { + repo: 'user/externalRepo' + } }, anotherTest: { - repo: 'user/testRepo' + code: { + repo: 'user/testRepo' + } }, andAnotherTest: { - repo: 'user/testRepo' + code: { + repo: 'user/testRepo' + } } } }