获取交付中心版本列表

请求

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

Query

参数名类型描述默认值是否必须
projectNamestring项目名称默认为空,查询所有项目optional
workflowNamestring工作流的名称默认为空,查询所有工作流optional
taskIdinteger工作流任务 ID默认为空,查询所有 taskoptional
serviceNamestring服务名称默认为空,查询所有服务optional

正常返回

  1. [
  2. {
  3. "versionInfo": {
  4. "id": "619dbaa8c528c2182225e8d9",
  5. "version": "test",
  6. "productName": "nginx2",
  7. "workflowName": "nginx2-ops-workflow",
  8. "taskId": 1,
  9. "desc": "test",
  10. "labels": [
  11. "test"
  12. ],
  13. "productEnvInfo": {
  14. "id": "000000000000000000000000",
  15. "product_name": "nginx2",
  16. "create_time": 0,
  17. "update_time": 0,
  18. "namespace": "nginx2-env-dev",
  19. "status": "",
  20. "revision": 0,
  21. "enabled": false,
  22. "env_name": "dev",
  23. "update_by": "",
  24. "auth": [],
  25. "visibility": "",
  26. "services": [
  27. [
  28. {
  29. "service_name": "nginx",
  30. "product_name": "nginx2",
  31. "type": "k8s",
  32. "revision": 1,
  33. "containers": [
  34. {
  35. "name": "nginx-test",
  36. "image": "ccr.ccs.tencentyun.com/koderover-rc/nginx-test:20211116230712-1-master"
  37. }
  38. ],
  39. "render": {
  40. "name": "nginx2-env-dev",
  41. "revision": 1,
  42. "product_tmpl": "nginx2",
  43. "description": ""
  44. }
  45. }
  46. ]
  47. ],
  48. "render": {
  49. "name": "nginx2-env-dev",
  50. "revision": 1,
  51. "product_tmpl": "nginx2",
  52. "description": ""
  53. },
  54. "error": "",
  55. "vars": [
  56. {
  57. "key": "NginxVersion",
  58. "value": "",
  59. "alias": "{{.NginxVersion}}",
  60. "state": "present",
  61. "services": [
  62. "nginx"
  63. ]
  64. },
  65. {
  66. "key": "customer",
  67. "value": "",
  68. "alias": "{{.customer}}",
  69. "state": "present",
  70. "services": [
  71. "nginx"
  72. ]
  73. }
  74. ],
  75. "isPublic": false,
  76. "roleIds": [],
  77. "recycle_day": 0,
  78. "source": "",
  79. "is_opensource": false
  80. },
  81. "createdBy": "admin",
  82. "created_at": 1637726888,
  83. "deleted_at": 0
  84. },
  85. "buildInfo": [],
  86. "deployInfo": [
  87. {
  88. "id": "619dbaa8c528c2182225e8da",
  89. "releaseId": "619dbaa8c528c2182225e8d9",
  90. "serviceName": "nginx/nginx-test",
  91. "containerName": "nginx-test",
  92. "image": "ccr.ccs.tencentyun.com/koderover-rc/nginx-test:20211116230712-1-master",
  93. "registry_id": "619dba6ac528c2182225e8d3",
  94. "yamlContents": [
  95. "---\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"
  96. ],
  97. "envs": [],
  98. "orderedServices": [
  99. [
  100. "nginx"
  101. ]
  102. ],
  103. "start_time": 1637726884,
  104. "end_time": 1637726888,
  105. "created_at": 1637726888,
  106. "deleted_at": 0
  107. }
  108. ],
  109. "testInfo": [],
  110. "distributeInfo": [],
  111. "securityStatsInfo": []
  112. }
  113. ]

错误返回

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

获取交付物追踪信息

请求

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

Query

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

正常返回

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