diff --git a/frontend/src/clients/pipelineApis.ts b/frontend/src/clients/pipelineApis.ts index 39082bc0..43589a31 100644 --- a/frontend/src/clients/pipelineApis.ts +++ b/frontend/src/clients/pipelineApis.ts @@ -1,4 +1,5 @@ import { createRequest } from "./createRequest"; +import { PipelineTool } from "../models/pipeline"; export const createPipelineUsingPost = createRequest<{ projectId: string; @@ -75,8 +76,3 @@ export type Pipeline = JenkinsPipeline | BambooPipeline; export type PipelineVerification = | Omit | Omit; - -export enum PipelineTool { - BAMBOO = "BAMBOO", - JENKINS = "JENKINS", -} diff --git a/frontend/src/components/PipelineSetup/PipelineSetup.tsx b/frontend/src/components/PipelineSetup/PipelineSetup.tsx index 7e54257d..46614ee3 100644 --- a/frontend/src/components/PipelineSetup/PipelineSetup.tsx +++ b/frontend/src/components/PipelineSetup/PipelineSetup.tsx @@ -2,7 +2,6 @@ import { BambooPipeline, JenkinsPipeline, Pipeline, - PipelineTool, verifyPipelineUsingPost, } from "../../clients/pipelineApis"; import React, { FC, useState } from "react"; @@ -10,6 +9,7 @@ import { Alert, Button, Col, Divider, Form, Input, Row, Select, Typography } fro import { css } from "@emotion/react"; import { PIPELINE_CONFIG, PIPELINE_TYPE_NOTE } from "../../utils/pipelineConfig/pipelineConfig"; import { VerifyStatus } from "../../models/common"; +import { PipelineTool } from "../../models/pipeline"; const { Option } = Select; const { Text } = Typography; diff --git a/frontend/src/constants/tooltips.ts b/frontend/src/constants/tooltips.ts index dcde61e4..3f6aad5a 100644 --- a/frontend/src/constants/tooltips.ts +++ b/frontend/src/constants/tooltips.ts @@ -1,4 +1,4 @@ -import { PipelineTool } from "../clients/pipelineApis"; +import { PipelineTool } from "../models/pipeline"; export const TOOLTIP_MAPPING = { [PipelineTool.JENKINS]: { diff --git a/frontend/src/models/pipeline.ts b/frontend/src/models/pipeline.ts index e69de29b..64479fbb 100644 --- a/frontend/src/models/pipeline.ts +++ b/frontend/src/models/pipeline.ts @@ -0,0 +1,4 @@ +export enum PipelineTool { + BAMBOO = "BAMBOO", + JENKINS = "JENKINS", +} \ No newline at end of file diff --git a/frontend/src/models/project.ts b/frontend/src/models/project.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/frontend/src/utils/pipelineConfig/pipelineConfig.tsx b/frontend/src/utils/pipelineConfig/pipelineConfig.tsx index 80d28b50..b357d3a5 100644 --- a/frontend/src/utils/pipelineConfig/pipelineConfig.tsx +++ b/frontend/src/utils/pipelineConfig/pipelineConfig.tsx @@ -1,7 +1,7 @@ import React from "react"; -import { PipelineTool } from "../../clients/pipelineApis"; import { JENKINS_PIPELINE_CONFIG } from "./jenkinsConfig"; import { BAMBOO_PIPELINE_CONFIG } from "./bambooConfig"; +import { PipelineTool } from "../../models/pipeline"; export const PIPELINE_CONFIG = { [PipelineTool.JENKINS]: JENKINS_PIPELINE_CONFIG,