You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

xjlab-api.yml 2.7 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. version: 2
  2. name: xjlab-api
  3. description: ""
  4. global:
  5. concurrent: 1
  6. param:
  7. - ref: deploy_path
  8. name: deploy_path
  9. value: '"pcm-coordinator-api.yaml"'
  10. required: false
  11. type: STRING
  12. hidden: false
  13. - ref: secret_name
  14. name: ""
  15. value: '"jcce-aliyuncs"'
  16. required: false
  17. type: STRING
  18. hidden: false
  19. - ref: project_name
  20. name: ""
  21. value: '"pcm-coordinator-api"'
  22. required: false
  23. type: STRING
  24. hidden: false
  25. trigger:
  26. webhook: gitlink@1.0.0
  27. event:
  28. - ref: create_tag
  29. ruleset:
  30. - param-ref: tag
  31. operator: EQ
  32. value: '""'
  33. ruleset-operator: AND
  34. workflow:
  35. - ref: start
  36. name: 开始
  37. task: start
  38. - ref: git_clone_0
  39. name: git clone
  40. task: git_clone@1.2.6
  41. input:
  42. remote_url: '"https://gitlink.org.cn/JointCloud/pcm-coordinator.git"'
  43. ref: '"refs/heads/v0.1.0-xjlab-alpha1"'
  44. commit_id: '""'
  45. depth: 1
  46. needs:
  47. - start
  48. - ref: docker_image_build_0
  49. name: docker镜像构建
  50. task: docker_image_build@1.6.0
  51. input:
  52. docker_username: ((dev.docker_user))
  53. docker_password: ((dev.docker_password))
  54. image_name: '"registry.cn-hangzhou.aliyuncs.com/jcce/pcm-coordinator-api"'
  55. image_tag: git_clone_0.commit_time
  56. registry_address: '"registry.cn-hangzhou.aliyuncs.com"'
  57. docker_file: git_clone_0.git_path + '/api/Dockerfile'
  58. docker_build_path: git_clone_0.git_path
  59. workspace: git_clone_0.git_path
  60. image_clean: true
  61. image_push: true
  62. build_args: '""'
  63. needs:
  64. - shell_0
  65. - ref: end
  66. name: 结束
  67. task: end
  68. needs:
  69. - kubectl_deploy_0
  70. - ref: kubectl_deploy_0
  71. name: kubectl部署资源
  72. task: kubectl_deploy@1.1.0
  73. input:
  74. command: '"apply"'
  75. resource_file_path: git_clone_0.git_path + '/api'
  76. certificate_authority_data: ((dev.k8s_cad))
  77. server: '"https://119.45.100.73:6443"'
  78. client_certificate_data: ((dev.k8s_ccd))
  79. client_key_data: ((dev.k8s_ckd))
  80. hosts: '""'
  81. needs:
  82. - docker_image_build_0
  83. - ref: shell_0
  84. name: shell
  85. image: docker.jianmuhub.com/library/debian:buster-slim
  86. env:
  87. IMAGE_NAME: '"registry.cn-hangzhou.aliyuncs.com/jcce/pcm-coordinator-api"'
  88. IMAGE_TAG: git_clone_0.commit_time
  89. SECRET_NAME: global.secret_name
  90. PROJECT_NAME: global.project_name
  91. PROJECT_PATH: git_clone_0.git_path
  92. script:
  93. - cd ${PROJECT_PATH}/api
  94. - sed -i "s#image_name#${IMAGE_NAME}:${IMAGE_TAG}#" ${PROJECT_NAME}.yaml
  95. - sed -i "s#secret_name#${SECRET_NAME}#" ${PROJECT_NAME}.yaml
  96. - cat ${PROJECT_NAME}.yaml
  97. needs:
  98. - git_clone_0

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.