[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:
Jakob Ackermann
2025-08-05 08:05:55 +00:00
committed by Copybot
parent 5d78fa458c
commit 98e82e9f88
7 changed files with 405 additions and 14 deletions
+14 -4
View File
@@ -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