fix(ci): use internal frontend base images

This commit is contained in:
2026-08-24 14:21:43 +08:00
parent f211d12cda
commit 7033903e67
4 changed files with 65 additions and 19 deletions
+12
View File
@@ -6,6 +6,7 @@ const config = readFileSync(resolve(process.cwd(), 'nginx/default.conf.template'
const testCompose = readFileSync(resolve(process.cwd(), 'docker-compose.test.yml'), 'utf8')
const developmentCompose = readFileSync(resolve(process.cwd(), 'docker-compose.development.yml'), 'utf8')
const jenkinsfile = readFileSync(resolve(process.cwd(), 'Jenkinsfile'), 'utf8')
const dockerfile = readFileSync(resolve(process.cwd(), 'Dockerfile'), 'utf8')
describe('admin nginx deployment config', () => {
it('allows qualification uploads with multipart overhead through the API proxy', () => {
@@ -46,4 +47,15 @@ describe('admin nginx deployment config', () => {
expect(jenkinsfile).not.toContain('docker save')
expect(jenkinsfile).not.toMatch(/\bssh\b/)
})
it('uses authenticated internal base images in CI instead of pulling from Docker Hub', () => {
expect(dockerfile).toContain('ARG NODE_IMAGE=node:22-alpine')
expect(dockerfile).toContain('ARG NGINX_IMAGE=nginx:1.27-alpine')
expect(dockerfile).toContain('FROM ${NODE_IMAGE} AS build')
expect(dockerfile).toContain('FROM ${NGINX_IMAGE}')
expect(jenkinsfile).toContain("NODE_BASE_IMAGE = '172.31.198.7:10082/html/node:22-alpine'")
expect(jenkinsfile).toContain("NGINX_BASE_IMAGE = '172.31.198.7:10082/html/nginx:1.27-alpine'")
expect(jenkinsfile).toContain('withCredentials([usernamePassword(')
expect(jenkinsfile).toContain('export DOCKER_CONFIG="${WORKSPACE}@tmp/docker-auth"')
})
})