Makefile 807 B

1234567891011121314151617181920212223242526272829303132333435
  1. .PHONY: version
  2. version?=1.0.0
  3. tag=reg.cestong.com.cn/cecf/ob-agent-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:${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}
  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:${version}
  22. js_test_save_path=~/tmp/oas-js-prod-${version}.tar
  23. js-prod-docker-build: jar
  24. docker build . -t ${js_prod_tag}
  25. docker save ${js_prod_tag} -o ${js_test_save_path}