mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
[server-ce] tests: add jenkins integration (#27600)
* [server-ce] remove unused CE_CUSTOM_3 shard * [server-ce] tests: add jenkins integration * [server-ce] tests: log failed host-admin requests in CI * [server-ce] tests: attempt at reducing flakiness in Cloud Build GitOrigin-RevId: 8d999efe1ccf041dca148bc8710dddb8561614ab
This commit is contained in:
@@ -28,6 +28,11 @@ const IMAGES = {
|
||||
CE: process.env.IMAGE_TAG_CE.replace(/:.+/, ''),
|
||||
PRO: process.env.IMAGE_TAG_PRO.replace(/:.+/, ''),
|
||||
}
|
||||
const LATEST = {
|
||||
CE: process.env.IMAGE_TAG_CE.replace(/.+:/, '') || 'latest',
|
||||
PRO: process.env.IMAGE_TAG_PRO.replace(/.+:/, '') || 'latest',
|
||||
GIT_BRIDGE: 'latest', // TODO, build in CI?
|
||||
}
|
||||
|
||||
function defaultDockerComposeOverride() {
|
||||
return {
|
||||
@@ -80,10 +85,14 @@ app.get('/status', (req, res) => {
|
||||
app.use(bodyParser.json())
|
||||
app.use((req, res, next) => {
|
||||
// Basic access logs
|
||||
console.log(req.method, req.url, req.body)
|
||||
if (process.env.CI !== 'true') {
|
||||
console.log(req.method, req.url, req.body)
|
||||
}
|
||||
const json = res.json
|
||||
res.json = body => {
|
||||
console.log(req.method, req.url, req.body, '->', body)
|
||||
if (process.env.CI !== 'true' || body.error) {
|
||||
console.log(req.method, req.url, req.body, '->', body)
|
||||
}
|
||||
json.call(res, body)
|
||||
}
|
||||
next()
|
||||
@@ -230,8 +239,9 @@ function setVarsDockerCompose({
|
||||
}) {
|
||||
const cfg = readDockerComposeOverride()
|
||||
|
||||
cfg.services.sharelatex.image = `${pro ? IMAGES.PRO : IMAGES.CE}:${version}`
|
||||
cfg.services['git-bridge'].image = `quay.io/sharelatex/git-bridge:${version}`
|
||||
cfg.services.sharelatex.image = `${pro ? IMAGES.PRO : IMAGES.CE}:${version === 'latest' ? (pro ? LATEST.PRO : LATEST.CE) : version}`
|
||||
cfg.services['git-bridge'].image =
|
||||
`quay.io/sharelatex/git-bridge:${version === 'latest' ? LATEST.GIT_BRIDGE : version}`
|
||||
|
||||
cfg.services.sharelatex.environment = vars
|
||||
|
||||
|
||||
Reference in New Issue
Block a user