fix: 对齐生产标签参数与助手当地日期
- 按标签发布时将所选版本传入 RELEASE_TAG,直构记录优先读取实际标签。 - 为模型明确提供上海当地日期,避免跨日后把 UTC 日期当作今天。 - 增加真实标签契约与跨日查询回归。
This commit is contained in:
@@ -276,6 +276,38 @@ describe('DeployExecutionService', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('sends the selected tag through RELEASE_TAG for production tag jobs', async () => {
|
||||
const { repository, service, jenkins } = createService({
|
||||
jenkinsHealth: { status: 'ok' },
|
||||
notificationStatus: 'sent',
|
||||
});
|
||||
const tagProject: ProjectSummary = {
|
||||
...project,
|
||||
environments: [
|
||||
{
|
||||
...project.environments[0],
|
||||
name: 'production',
|
||||
releasePolicy: 'tag',
|
||||
jenkinsJobPath: 'prod/access-manage-tag',
|
||||
},
|
||||
],
|
||||
};
|
||||
const { run } = await repository.create({
|
||||
...input,
|
||||
environment: 'production',
|
||||
ref: 'v2026.10.28-stellar.1',
|
||||
idempotencyKey: 'tag-contract',
|
||||
});
|
||||
await service.execute(run, tagProject);
|
||||
expect(jenkins.buildWithParameters).toHaveBeenCalledWith(
|
||||
'prod/access-manage-tag',
|
||||
expect.objectContaining({
|
||||
GIT_REF: 'v2026.10.28-stellar.1',
|
||||
RELEASE_TAG: 'v2026.10.28-stellar.1',
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it('syncs a queued Jenkins run to success', async () => {
|
||||
const { audit, repository, service } = createService({
|
||||
jenkinsHealth: { status: 'ok' },
|
||||
|
||||
Reference in New Issue
Block a user