Makefile 867 B

12345678910111213141516171819202122232425262728293031323334353637
  1. .PHONY: version
  2. version?=1.0.0
  3. tag=reg.cestong.com.cn/cecf/ob-platform-stream:${version}
  4. jar:
  5. mvn package
  6. docker-build: jar
  7. docker build . -t ${tag}
  8. docker-push: docker-build
  9. docker push ${tag}
  10. echo ${version} > ./version
  11. # test
  12. js_test_tag=hub.js.sgcc.com.cn/observe/ob-agent-stream-js-test:${version}
  13. js_test_save_path=~/tmp/oas-js-test-${version}.tar
  14. js-test-docker-build: jar
  15. docker build . -t ${js_test_tag} -f Dockerfile.js.test
  16. docker save ${js_test_tag} -o ${js_test_save_path}
  17. js-test-docker-push: js-test-docker-build
  18. docker push ${js_test_tag}
  19. echo ${version} > ./version
  20. # js prod
  21. js_prod_tag=hub.js.sgcc.com.cn/observe/ob-agent-stream-js-prod:${version}
  22. js-prod-docker-build: jar
  23. docker build . -t ${js_prod_tag} -f Dockerfile.js.prod
  24. js-prod-docker-push: js-prod-docker-build
  25. docker push ${js_prod_tag}
  26. echo ${version} > ./version