config.yml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. version: 2
  2. jobs:
  3. dockerhubuploadrelease:
  4. machine: true
  5. steps:
  6. - checkout
  7. - run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:${CIRCLE_TAG}-py2 .
  8. - run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:${CIRCLE_TAG} -t matrixdotorg/synapse:${CIRCLE_TAG}-py3 --build-arg PYTHON_VERSION=3.6 .
  9. - run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
  10. - run: docker push matrixdotorg/synapse:${CIRCLE_TAG}
  11. - run: docker push matrixdotorg/synapse:${CIRCLE_TAG}-py2
  12. - run: docker push matrixdotorg/synapse:${CIRCLE_TAG}-py3
  13. dockerhubuploadlatest:
  14. machine: true
  15. steps:
  16. - checkout
  17. - run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:latest-py2 .
  18. - run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:latest -t matrixdotorg/synapse:latest-py3 --build-arg PYTHON_VERSION=3.6 .
  19. - run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
  20. - run: docker push matrixdotorg/synapse:latest
  21. - run: docker push matrixdotorg/synapse:latest-py2
  22. - run: docker push matrixdotorg/synapse:latest-py3
  23. sytestpy2:
  24. docker:
  25. - image: matrixdotorg/sytest-synapsepy2
  26. working_directory: /src
  27. steps:
  28. - checkout
  29. - run: /synapse_sytest.sh
  30. - store_artifacts:
  31. path: /logs
  32. destination: logs
  33. - store_test_results:
  34. path: /logs
  35. sytestpy2postgres:
  36. docker:
  37. - image: matrixdotorg/sytest-synapsepy2
  38. working_directory: /src
  39. steps:
  40. - checkout
  41. - run: POSTGRES=1 /synapse_sytest.sh
  42. - store_artifacts:
  43. path: /logs
  44. destination: logs
  45. - store_test_results:
  46. path: /logs
  47. sytestpy2merged:
  48. docker:
  49. - image: matrixdotorg/sytest-synapsepy2
  50. working_directory: /src
  51. steps:
  52. - checkout
  53. - run: bash .circleci/merge_base_branch.sh
  54. - run: /synapse_sytest.sh
  55. - store_artifacts:
  56. path: /logs
  57. destination: logs
  58. - store_test_results:
  59. path: /logs
  60. sytestpy2postgresmerged:
  61. docker:
  62. - image: matrixdotorg/sytest-synapsepy2
  63. working_directory: /src
  64. steps:
  65. - checkout
  66. - run: bash .circleci/merge_base_branch.sh
  67. - run: POSTGRES=1 /synapse_sytest.sh
  68. - store_artifacts:
  69. path: /logs
  70. destination: logs
  71. - store_test_results:
  72. path: /logs
  73. sytestpy3:
  74. docker:
  75. - image: matrixdotorg/sytest-synapsepy3
  76. working_directory: /src
  77. steps:
  78. - checkout
  79. - run: /synapse_sytest.sh
  80. - store_artifacts:
  81. path: /logs
  82. destination: logs
  83. - store_test_results:
  84. path: /logs
  85. sytestpy3postgres:
  86. docker:
  87. - image: matrixdotorg/sytest-synapsepy3
  88. working_directory: /src
  89. steps:
  90. - checkout
  91. - run: POSTGRES=1 /synapse_sytest.sh
  92. - store_artifacts:
  93. path: /logs
  94. destination: logs
  95. - store_test_results:
  96. path: /logs
  97. sytestpy3merged:
  98. docker:
  99. - image: matrixdotorg/sytest-synapsepy3
  100. working_directory: /src
  101. steps:
  102. - checkout
  103. - run: bash .circleci/merge_base_branch.sh
  104. - run: /synapse_sytest.sh
  105. - store_artifacts:
  106. path: /logs
  107. destination: logs
  108. - store_test_results:
  109. path: /logs
  110. sytestpy3postgresmerged:
  111. docker:
  112. - image: matrixdotorg/sytest-synapsepy3
  113. working_directory: /src
  114. steps:
  115. - checkout
  116. - run: bash .circleci/merge_base_branch.sh
  117. - run: POSTGRES=1 /synapse_sytest.sh
  118. - store_artifacts:
  119. path: /logs
  120. destination: logs
  121. - store_test_results:
  122. path: /logs
  123. workflows:
  124. version: 2
  125. build:
  126. jobs:
  127. - sytestpy2:
  128. filters:
  129. branches:
  130. only: /develop|master|release-.*/
  131. - sytestpy2postgres:
  132. filters:
  133. branches:
  134. only: /develop|master|release-.*/
  135. - sytestpy3:
  136. filters:
  137. branches:
  138. only: /develop|master|release-.*/
  139. - sytestpy3postgres:
  140. filters:
  141. branches:
  142. only: /develop|master|release-.*/
  143. - sytestpy2merged:
  144. filters:
  145. branches:
  146. ignore: /develop|master|release-.*/
  147. - sytestpy2postgresmerged:
  148. filters:
  149. branches:
  150. ignore: /develop|master|release-.*/
  151. - sytestpy3merged:
  152. filters:
  153. branches:
  154. ignore: /develop|master|release-.*/
  155. - sytestpy3postgresmerged:
  156. filters:
  157. branches:
  158. ignore: /develop|master|release-.*/
  159. - dockerhubuploadrelease:
  160. filters:
  161. tags:
  162. only: /v[0-9].[0-9]+.[0-9]+.*/
  163. branches:
  164. ignore: /.*/
  165. - dockerhubuploadlatest:
  166. filters:
  167. branches:
  168. only: master