1
0

config.yml 4.8 KB

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