masquitos

Gitlab CI Example

Dec 4th, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. variables:
  2. CLI_VERSION: 9.1.12
  3.  
  4. stages:
  5. - test
  6. - build-test
  7. - build-prod
  8.  
  9. test:
  10. stage: test
  11. only:
  12. - master
  13. - test
  14. image: trion/ng-cli:${CLI_VERSION}
  15. before_script:
  16. - npm ci
  17. script:
  18. - ng lint
  19. tags:
  20. - docker
  21.  
  22. build-test:
  23. stage: build-test
  24. only:
  25. - test
  26. image: trion/ng-cli:${CLI_VERSION}
  27. before_script:
  28. - npm ci
  29. script:
  30. - ng build --configuration=test
  31. artifacts:
  32. expire_in: 1 day
  33. paths:
  34. - dist/
  35. tags:
  36. - docker
  37.  
  38. build-prod:
  39. stage: build-prod
  40. only:
  41. - master
  42. image: trion/ng-cli:${CLI_VERSION}
  43. before_script:
  44. - npm ci
  45. script:
  46. - ng build --prod
  47. artifacts:
  48. expire_in: 1 day
  49. paths:
  50. - dist/
  51. tags:
  52. - docker
Advertisement
Add Comment
Please, Sign In to add comment