.gitlab-ci.yml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. cache:
  2. untracked: true
  3. paths:
  4. - node_modules
  5. stages:
  6. - build
  7. - mechanism_latest
  8. - mechanism_tag
  9. - operate_latest
  10. - operate_tag
  11. - mpHomeweb_latest
  12. - mpHomeweb_tag
  13. build:
  14. stage: build
  15. image: docker.finogeeks.club/public/node:10.5
  16. script:
  17. - echo //mirrors.finogeeks.club/repository/npm/:_authToken=$${NPM_TOKEN} >> .npmrc
  18. - cd mechanism
  19. - yarn
  20. - yarn build
  21. - cd ../operate
  22. - yarn
  23. - yarn build
  24. - cd ../mpHomeweb
  25. - yarn
  26. - yarn build
  27. - cd ..
  28. artifacts:
  29. name: "dist"
  30. untracked: false
  31. expire_in: 10 mins
  32. paths:
  33. - $CI_PROJECT_DIR/mechanism/dist
  34. - $CI_PROJECT_DIR/operate/dist
  35. - $CI_PROJECT_DIR/mpHomeweb/dist
  36. mechanism_latest:
  37. stage: mechanism_latest
  38. image: docker.finogeeks.club/mop/kaniko-executor:debug
  39. script:
  40. - mkdir -p /kaniko/.docker
  41. - echo "${DOCKER_AUTH_CONFIG}" > /kaniko/.docker/config.json
  42. - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile_mechanism --destination docker.finogeeks.club/mop/mop-front-mechanism:latest
  43. only:
  44. - pushes
  45. mechanism_tag:
  46. stage: mechanism_tag
  47. image: docker.finogeeks.club/mop/kaniko-executor:debug
  48. script:
  49. - mkdir -p /kaniko/.docker
  50. - echo "${DOCKER_AUTH_CONFIG}" > /kaniko/.docker/config.json
  51. - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile_mechanism --destination docker.finogeeks.club/mop/mop-front-mechanism:$CI_COMMIT_TAG
  52. only:
  53. - tags
  54. operate_latest:
  55. stage: operate_latest
  56. image: docker.finogeeks.club/mop/kaniko-executor:debug
  57. script:
  58. - mkdir -p /kaniko/.docker
  59. - echo "${DOCKER_AUTH_CONFIG}" > /kaniko/.docker/config.json
  60. - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile_operate --destination docker.finogeeks.club/mop/mop-front-mechanism:latest
  61. only:
  62. - pushes
  63. operate_tag:
  64. stage: operate_tag
  65. image: docker.finogeeks.club/mop/kaniko-executor:debug
  66. script:
  67. - mkdir -p /kaniko/.docker
  68. - echo "${DOCKER_AUTH_CONFIG}" > /kaniko/.docker/config.json
  69. - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile_operate --destination docker.finogeeks.club/mop/mop-front-mechanism:$CI_COMMIT_TAG
  70. only:
  71. - tags
  72. mpHomeweb_latest:
  73. stage: mpHomeweb_latest
  74. image: docker.finogeeks.club/mop/kaniko-executor:debug
  75. script:
  76. - mkdir -p /kaniko/.docker
  77. - echo "${DOCKER_AUTH_CONFIG}" > /kaniko/.docker/config.json
  78. - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile_mpHomeweb --destination docker.finogeeks.club/mop/mop-front-mphomeweb:latest
  79. only:
  80. - pushes
  81. mpHomeweb_tag:
  82. stage: mpHomeweb_tag
  83. image: docker.finogeeks.club/mop/kaniko-executor:debug
  84. script:
  85. - mkdir -p /kaniko/.docker
  86. - echo "${DOCKER_AUTH_CONFIG}" > /kaniko/.docker/config.json
  87. - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile_mpHomeweb --destination docker.finogeeks.club/mop/mop-front-mphomeweb:$CI_COMMIT_TAG
  88. only:
  89. - tags