Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. stages:
  2. - build
  3. - deploy
  4. - prod
  5.  
  6. build_image_dev:main
  7. stage: build
  8. only:
  9. - develop
  10. services:
  11. - docker:18-dind
  12. tags:
  13. - dind_builder
  14. before_script:
  15. - docker login $CI_REGISTRY --username $DOCKER_USER --password $DOCKER_PASS
  16. script:
  17. - docker login $CI_REGISTRY --username $DOCKER_USER --password $DOCKER_PASS
  18. - docker build --build-arg BASE_URL=${BASE_URL_DEV} -t $CI_REGISTRY_IMAGE:latest .
  19. - docker push $CI_REGISTRY_IMAGE:latest
  20.  
  21. build_image_dev:money
  22. stage: build
  23. only:
  24. - develop
  25. services:
  26. - docker:18-dind
  27. tags:
  28. - dind_builder
  29. before_script:
  30. - docker login $CI_REGISTRY --username $DOCKER_USER --password $DOCKER_PASS
  31. script:
  32. - docker login $CI_REGISTRY --username $DOCKER_USER --password $DOCKER_PASS
  33. - docker build -f Dockerfile-money --build-arg BASE_URL=${BASE_URL_MONEY_DEV} -t $CI_REGISTRY_IMAGE:money-latest .
  34. - docker push $CI_REGISTRY_IMAGE:money-latest
  35.  
  36.  
  37. deploy to dev:main
  38. stage: deploy
  39. only:
  40. - develop
  41. tags:
  42. - kube-staging-master
  43. dependencies:
  44. - build_image_dev:main
  45. script:
  46. - kubectl delete pod $(kubectl get pods --namespace fsinru | grep fsinru-front | cut -d " " -f1) --namespace fsinru
  47.  
  48. deploy to dev:money
  49. stage: deploy
  50. only:
  51. - develop
  52. tags:
  53. - kube-staging-master
  54. dependencies:
  55. - build_image_dev:money
  56. script:
  57. - kubectl delete pod $(kubectl get pods --namespace fsinru | grep fsinru-money | cut -d " " -f1) --namespace fsinru
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement