Zadig 文档
Zadig
关于
Zadig
关于
v1.10.0
Loading...
      编辑文档
      反馈问题
      Slack 上联系我们

    本页导航

    交付中心

    # 获取交付中心版本列表

    # 请求

    GET /api/aslan/delivery/releases?projectName=<projectName>&workflowName=<workflowName>&taskId=<taskId>&serviceName=<serviceName>
    
    1

    # Query

    参数名 类型 描述 默认值 是否必须
    projectName string 项目名称 默认为空,查询所有项目 optional
    workflowName string 工作流的名称 默认为空,查询所有工作流 optional
    taskId integer 工作流任务 ID 默认为空,查询所有 task optional
    serviceName string 服务名称 默认为空,查询所有服务 optional

    # 正常返回

    [
      {
        "versionInfo": {
          "id": "619dbaa8c528c2182225e8d9",
          "version": "test",
          "productName": "nginx2",
          "workflowName": "nginx2-ops-workflow",
          "taskId": 1,
          "desc": "test",
          "labels": [
            "test"
          ],
          "productEnvInfo": {
            "id": "000000000000000000000000",
            "product_name": "nginx2",
            "create_time": 0,
            "update_time": 0,
            "namespace": "nginx2-env-dev",
            "status": "",
            "revision": 0,
            "enabled": false,
            "env_name": "dev",
            "update_by": "",
            "auth": [],
            "visibility": "",
            "services": [
              [
                {
                  "service_name": "nginx",
                  "product_name": "nginx2",
                  "type": "k8s",
                  "revision": 1,
                  "containers": [
                    {
                      "name": "nginx-test",
                      "image": "ccr.ccs.tencentyun.com/koderover-rc/nginx-test:20211116230712-1-master"
                    }
                  ],
                  "render": {
                    "name": "nginx2-env-dev",
                    "revision": 1,
                    "product_tmpl": "nginx2",
                    "description": ""
                  }
                }
              ]
            ],
            "render": {
              "name": "nginx2-env-dev",
              "revision": 1,
              "product_tmpl": "nginx2",
              "description": ""
            },
            "error": "",
            "vars": [
              {
                "key": "NginxVersion",
                "value": "",
                "alias": "{{.NginxVersion}}",
                "state": "present",
                "services": [
                  "nginx"
                ]
              },
              {
                "key": "customer",
                "value": "",
                "alias": "{{.customer}}",
                "state": "present",
                "services": [
                  "nginx"
                ]
              }
            ],
            "isPublic": false,
            "roleIds": [],
            "recycle_day": 0,
            "source": "",
            "is_opensource": false
          },
          "createdBy": "admin",
          "created_at": 1637726888,
          "deleted_at": 0
        },
        "buildInfo": [],
        "deployInfo": [
          {
            "id": "619dbaa8c528c2182225e8da",
            "releaseId": "619dbaa8c528c2182225e8d9",
            "serviceName": "nginx/nginx-test",
            "containerName": "nginx-test",
            "image": "ccr.ccs.tencentyun.com/koderover-rc/nginx-test:20211116230712-1-master",
            "registry_id": "619dba6ac528c2182225e8d3",
            "yamlContents": [
              "---\napiVersion: v1\nkind: Service\nmetadata:\n  name: nginx3\n  labels:\n    app: nginx3\n    tier: backend\n    version: \"\"\nspec:\n  type: NodePort\n  ports:\n  - port: 80\n  selector:\n    app: nginx3\n    tier: backend\n---\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: nginx3\nspec:\n  replicas: 1\n  selector:\n    matchLabels:\n      app: nginx3\n      tier: backend\n      version: \"\"\n  template:\n    metadata:\n      labels:\n        app: nginx3\n        tier: backend\n        version: \"\"\n    spec:\n      containers:\n      - name: nginx-test\n        image: ccr.ccs.tencentyun.com/koderover-rc/nginx-test:20211116230712-1-master\n        ports:\n        - containerPort: 80\n        volumeMounts:\n          - name: static-page\n            mountPath: /usr/share/nginx/html\n      volumes:\n        - name: static-page\n          configMap:\n            name: static-page\n---\napiVersion: extensions/v1beta1\nkind: Ingress\nmetadata:\n  name: nginx-expose\nspec:\n  rules:\n  - host: dev-nginx-expose.app.8slan.com\n    http:\n      paths:\n      - backend:\n          serviceName: nginx\n          servicePort: 80\n        path: /\n---\napiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: static-page\n  labels:\n    app.kubernetes.io/instance: poetry\n    app.kubernetes.io/name: poetry-portal-config\ndata:\n  index.html: |-\n        <!DOCTYPE html>\n        <html>\n        <head>\n            <meta charset=\"utf-8\" />\n            <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n            <title> - Sliding Perspective</title>\n            <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n            <style>\n            html,\n            body {\n                width: 100%;\n                height: 100%;\n                margin: 0;\n                background: #00ff00;\n                overflow-y: hidden;\n            }\n\n            .bounce {\n                display: flex;\n                align-items: center;\n                justify-content: center;\n                width: 100%;\n                color: white;\n                height: 100%;\n                font: normal bold 6rem 'Product Sans', sans-serif;\n                white-space: nowrap;\n            }\n\n            .letter {\n                animation: bounce 0.75s cubic-bezier(0.05, 0, 0.2, 1) infinite alternate;\n                display: inline-block;\n                transform: translate3d(0, 0, 0);\n                margin-top: 0.5em;\n                text-shadow: rgba(255, 255, 255, 0.4) 0 0 0.05em;\n                font: normal 500 6rem 'Varela Round', sans-serif;\n                color:#fff;\n                color:#1989fa;\n\n            }\n\n            .letter:nth-of-type(1) {\n                animation-delay: -0.083333333s;\n            }\n            .letter:nth-of-type(3) {\n                animation-delay: 0.0833333333s;\n            }\n            .letter:nth-of-type(4) {\n                animation-delay: 0.1666666667s;\n            }\n            .letter:nth-of-type(5) {\n                animation-delay: 0.25s;\n            }\n            .letter:nth-of-type(6) {\n                animation-delay: 0.3333333333s;\n            }\n            .letter:nth-of-type(7) {\n                animation-delay: 0.4166666667s;\n            }\n\n            @keyframes bounce {\n                0% {\n                transform: translate3d(0, 0, 0);\n                text-shadow: rgba(255, 255, 255, 0.4) 0 0 0.05em;\n                }\n                100% {\n                transform: translate3d(0, -1em, 0);\n                text-shadow: rgba(255, 255, 255, 0.4) 0 1em 0.35em;\n                }\n            }\n            </style>\n        </head>\n        <body>\n            <div class=\"bounce\">\n            <span class=\"letter\">K</span><span class=\"letter\"></span><span class=\"letter\">o</span><span class=\"letter\">d</span><span class=\"letter\">e</span><span class=\"letter\">R</span\n            ><span class=\"letter\">o</span><span class=\"letter\">v</span><span class=\"letter\">e</span><span class=\"letter\">r</span>\n            </div>\n        </body>\n        </html>\n"
            ],
            "envs": [],
            "orderedServices": [
              [
                "nginx"
              ]
            ],
            "start_time": 1637726884,
            "end_time": 1637726888,
            "created_at": 1637726888,
            "deleted_at": 0
          }
        ],
        "testInfo": [],
        "distributeInfo": [],
        "securityStatsInfo": []
      }
    ]
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113

    # 错误返回

    {
      "code": 400,
      "description": "strconv.Atoi: parsing \"invalidTaskId\": invalid syntax",
      "extra": {},
      "message": "Bad Request",
      "type": "error"
    }
    
    1
    2
    3
    4
    5
    6
    7

    # 获取交付物追踪信息

    # 请求

    GET /api/directory/dc/artifact?image=<image>
    
    1

    # Query

    参数名 类型 描述 默认值 是否必须
    image string 镜像名称 无 must

    # 正常返回

    {
      "id": "61b84bbcc19ba8cdb184cc53",
      "name": "picket",
      "type": "image",
      "source": "workflow",
      "image": "ccr.ccs.tencentyun.com/koderover-rc/picket:20211214154446-70-main-pr-736",
      "image_tag": "20211214154446-70-main-pr-736",
      "image_digest": "sha256:1d9ddf94feb5ff9ca9d76248ad51dd2a95210895d0dbf1e87bd66cc471c41f0e",
      "image_size": 22578466,
      "architecture": "amd64",
      "os": "linux",
      "created_by": "user1",
      "created_time": 1639467962,
      "activities": [
        {
          "artifact_id": "61b84bbcc19ba8cdb184cc53",
          "type": "build",
          "url": "/v1/projects/detail/zadig/pipelines/multi/dev2/70",
          "commits": [
            {
              "address": "https://github.com",
              "source": "github",
              "repo_owner": "koderover",
              "repo_name": "zadig",
              "branch": "main",
              "pr": 736,
              "commit_id": "4b15c43b012e7a4a901fdcfe33736ad1c3b53f48",
              "commit_message": "test",
              "author_name": "user1"
            }
          ],
          "start_time": 1639467890,
          "end_time": 1639467944,
          "created_by": "user1",
          "created_time": 1639467964
        }
      ],
      "sortedActivities": {
        "build": [
          {
            "artifact_id": "61b84bbcc19ba8cdb184cc53",
            "type": "build",
            "url": "/v1/projects/detail/zadig/pipelines/multi/dev2/70",
            "commits": [
              {
                "address": "https://github.com",
                "source": "github",
                "repo_owner": "koderover",
                "repo_name": "zadig",
                "branch": "main",
                "pr": 736,
                "commit_id": "4b15c43b012e7a4a901fdcfe33736ad1c3b53f48",
                "commit_message": "test",
                "author_name": "user1"
              }
            ],
            "start_time": 1639467890,
            "end_time": 1639467944,
            "created_by": "user1",
            "created_time": 1639467964
          }
        ]
      }
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64

    ← API 调用方式 工作流→

    资源
    文档
    博客
    公司
    关于我们
    加入我们
    联系我们
    微信扫一扫
    hello@koderover.com
    上海市浦东软件园

    © 2022 筑栈(上海)信息技术有限公司 沪 ICP 备 19000177 号 - 1

    •  跟随系统
    •  浅色模式
    •  深色模式
    •  阅读模式