Compare commits

...

2 Commits

Author SHA1 Message Date
chyoo ecee879694 patch..
ci/woodpecker/push/woodpecker Pipeline was successful
2026-08-13 17:58:33 +09:00
chyoo 964472e148 rollback..
ci/woodpecker/push/woodpecker Pipeline was successful
2026-08-13 17:54:17 +09:00
@@ -36,13 +36,13 @@ type ImageTags = {
artifacts?: Record<string, string>;
};
function releaseArtifacts(release?: AppRelease | null) {
function releaseArtifacts(release?: AppRelease | null, appName?: string) {
const imageTags = release?.imageTags as ImageTags | null | undefined;
const entries = Object.entries(imageTags?.images ?? {}).filter(([, image]) => (
!/^(postgres|mysql|mariadb|mongo)(:|@)/i.test(image.trim())
));
if (entries.length) return entries;
if (release?.artifact) return [[release.app.name, release.artifact]];
if (release?.artifact) return [[release.app?.name ?? appName ?? 'artifact', release.artifact]];
return [];
}
@@ -51,15 +51,6 @@ function firstArtifact(release: AppRelease) {
return artifacts[0]?.[1] ?? release.artifact ?? '-';
}
function hasDeployableImage(release: AppRelease) {
const imageTags = release.imageTags as ImageTags | null | undefined;
return Object.values(imageTags?.images ?? {}).some((image) => (
typeof image === 'string'
&& image.trim()
&& !/^(postgres|mysql|mariadb|mongo)(:|@)/i.test(image.trim())
));
}
function deploymentTime(deployment: DeploymentJob) {
const value = new Date(deployment.createdAt || deployment.startedAt || deployment.finishedAt || 0).getTime();
return Number.isNaN(value) ? 0 : value;
@@ -116,9 +107,7 @@ export function DeploymentManagementPage() {
[deployedReleaseIdValues]
);
const deployableReleases = useMemo(
() => filteredReleases.filter((release) => (
!deployedReleaseIds.has(release.id) && hasDeployableImage(release)
)),
() => filteredReleases.filter((release) => !deployedReleaseIds.has(release.id)),
[filteredReleases, deployedReleaseIds]
);
const filteredDeployments = useMemo(
@@ -274,7 +263,7 @@ export function DeploymentManagementPage() {
</div>
) : null}
{pagedDeployments.map((deployment, index) => {
const artifacts = releaseArtifacts(deployment.release);
const artifacts = releaseArtifacts(deployment.release, deployment.app?.name);
return (
<div key={deployment.id} className="rounded-md border border-border bg-background/70 p-4">
<div className="flex items-start justify-between gap-4">
@@ -346,7 +335,7 @@ export function DeploymentManagementPage() {
</Card>
<Card className="min-w-0 overflow-hidden">
<CardHeader title="배포 가능 릴리즈" description="컨테이너 이미지가 있고 아직 성공 배포되지 않은 릴리즈만 표시합니다." />
<CardHeader title="배포 가능 릴리즈" description="아직 성공 배포되지 않은 릴리즈만 표시합니다." />
<div className="space-y-3 p-4">
{deployableCards.length === 0 ? (
<div className="rounded-md border border-border px-3 py-4 text-center text-sm text-muted-foreground">