Пример #1
0
class TaskModel(BaseModel):
    Name: str
    Configuration: Any = Schema(..., alias="Config")

    Env: Dict[str, str]
    Resources: ResourceModel

    pass
Пример #2
0
class DockerPublicAuthCredentials(BaseModel):
    mode: AuthType = Schema(AuthType.CREDENTIALS, const=True)
    auth: AuthCredentials
Пример #3
0
class BundleAuthNone(BaseModel):
    mode: AuthType = Schema(AuthType.NONE, const=True)
    auth: AuthNone
Пример #4
0
class BundleBuild(BaseModel):
    type: BuildType = Schema(BuildType.BUNDLE_UPLOAD, const=True)
    config: BundleBuildConfig
Пример #5
0
 class Model(BaseModel):
     foo: int = Schema(4)
Пример #6
0
class GitBuild(BaseModel):
    type: BuildType = Schema(BuildType.BUNDLE_GIT, const=True)
    config: GitBuildConfig
Пример #7
0
class GitAuthSsh(BaseModel):
    mode: AuthType = Schema(AuthType.SSH, const=True)
    auth: AuthSsh
Пример #8
0
class BuildExecutorInDb(BuildExecutorInBase):
    refrence_id: ObjectId = Schema(None, alias="refrence_id")
    exec_status: ExecutionStatus = ExecutionStatus.ENQUEUED
    result: Optional[DockerImageSpec]
Пример #9
0
class DockerPrivateBuild(BaseModel):
    type: BuildType = Schema(BuildType.REGISTRY_PRIVATE, const=True)
    config: DockerPrivateBuildConfig
Пример #10
0
class DockerfileBuild(BaseModel):
    type: BuildType = Schema(BuildType.DOCKERFILE, const=True)
    config: DockerfileBuildConfig
Пример #11
0
class DockerImageSpec(BaseModel):
    AttachStderr: Optional[bool] = Schema(None, alias="AttachStderr")
    AttachStdin: Optional[bool] = Schema(None, alias="AttachStdin")
    AttachStdout: Optional[bool] = Schema(None, alias="AttachStdout")
    Cmd: Optional[List[str]] = Schema(None, alias="Cmd")
    Domainname: Optional[str] = Schema(None, alias="Domainname")
    Entrypoint: Optional[List[str]] = Schema(None, alias="Entrypoint")
    Env: Optional[List[str]] = Schema(None, alias="Env")
    Hostname: Optional[str] = Schema(None, alias="Hostname")
    Image: Optional[str] = Schema(None, alias="Image")
    User: Optional[str] = Schema(None, alias="User")
    WorkingDir: Optional[str] = Schema(None, alias="WorkingDir")
    ArgsEscaped: Optional[bool] = Schema(None, alias="ArgsEscaped")
    NetworkDisabled: Optional[bool] = Schema(None, alias="NetworkDisabled")
    StopSignal: Optional[str] = Schema(None, alias="StopSignal")
    Shell: Optional[List[str]] = Schema(None, alias="Shell")

    class Config:
        validate_assignment = True

    @validator('Cmd')
    def set_cmd(cls, value):
        return value or [""]

    @validator('Entrypoint')
    def set_env(cls, value):
        return value or [""]
Пример #12
0
class BuildExecutorCompositeInResponse(BuildExecutorInBase):
    refrence_id: ObjectId = Schema(None, alias="refrence_id")
    exec_status: Optional[ExecutionStatus] = ExecutionStatus.UNKNOWN
    tool: ToolInResp = Schema(None, alias="tool")
    build_id: ObjectIdInRes = Schema(None, alias="_build_id")
    tool_id: ObjectIdInRes = Schema(None, alias="_tool_id")
Пример #13
0
class BuildExecutorInResponse(BuildExecutorInBase):
    refrence_id: ObjectId = Schema(None, alias="refrence_id")
    exec_status: Optional[ExecutionStatus] = ExecutionStatus.UNKNOWN
    tool: ToolInResp = Schema(None, alias="tool")
    result: Optional[DockerImageSpec]
Пример #14
0
class DockerPublicBuild(BaseModel):
    type: BuildType = Schema(BuildType.REGISTRY_PUBLIC, const=True)
    config: DockerPublicBuildConfig
Пример #15
0
class GitAuthToken(BaseModel):
    mode: AuthType = Schema(AuthType.AUTHTOKEN, const=True)
    auth: AuthToken
Пример #16
0
class DockerPublicAuthNone(BaseModel):
    mode: AuthType = Schema(AuthType.NONE, const=True)
    auth: AuthNone
Пример #17
0
class BuildExecutorInRequest(BuildExecutorInBase):
    refrence_id: ObjectIdInReq = Schema(None, alias="refrence_id")
    exec_status: Optional[ExecutionStatus] = ExecutionStatus.UNKNOWN