@@ -14,6 +14,7 @@ commands:
1414 - run :
1515 name : Upload Coverage Results
1616 command : |
17+ if [ -z "${COVERAGE_ARGS}" ]; then exit 0; fi
1718 # Download and verify the codecov binary
1819 curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --import # One-time step
1920 curl -Os https://uploader.codecov.io/latest/linux/codecov
@@ -276,6 +277,99 @@ commands:
276277 . venv/bin/activate
277278 twine upload dist/*
278279
280+ deploy_to_devpi :
281+ description : " Publish wheel + sdist packages to devpi"
282+ parameters :
283+ devpi_base_url :
284+ description : Base URL for the devpi service
285+ type : string
286+ devpi_index :
287+ description : Index to push packages to and install requirements from.
288+ type : string
289+ python_tag :
290+ description : Python tag to use when building wheels
291+ type : string
292+ tag_verify :
293+ description : Check if the git tag matches the package version.
294+ type : boolean
295+ default : true
296+ pip_install_args :
297+ description : Additional args to provide to pip install when installing requirements.
298+ type : string
299+ default : ' '
300+ python_smoke_code :
301+ description : Code used to smoke test the package before publication.
302+ type : string
303+ steps :
304+ - restore_cache :
305+ keys :
306+ - v4-venv-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum "pyproject.toml" }}
307+
308+ - run :
309+ name : install python dependencies
310+ command : |
311+ python3 -m venv venv
312+ . venv/bin/activate
313+ python3 -m pip install -U wheel pip
314+ python3 -m pip install -U -r requirements.txt --index-url="<< parameters.devpi_base_url >><< parameters.devpi_index >>/+simple" << parameters.pip_install_args >>
315+ python3 -m pip install -U twine build
316+
317+ - save_cache :
318+ paths :
319+ - ./venv
320+ key : v4-venv-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum "pyproject.toml" }}
321+
322+ - when :
323+ condition : << parameters.tag_verify >>
324+ steps :
325+ - run :
326+ name : verify git tag vs. version
327+ command : |
328+ . venv/bin/activate
329+ python ./scripts/verify_version.py
330+
331+ - run :
332+ name : create packages
333+ command : |
334+ . venv/bin/activate
335+ python3 scripts/replace_commit.py
336+ export DIST_EXTRA_CONFIG=/tmp/build-opts.cfg
337+ echo -e "[bdist_wheel]\npython_tag=<< parameters.python_tag >>" > $DIST_EXTRA_CONFIG
338+ python -m build --wheel
339+ python -m build --sdist
340+
341+ - run :
342+ name : smoke packages
343+ command : |
344+ python3 -m venv /tmp/sdisttest/venv
345+ mkdir -p /tmp/sdisttest
346+ cp dist/*.tar.gz /tmp/sdisttest
347+
348+ mkdir -p /tmp/wheeltest
349+ python3 -m venv /tmp/wheeltest/venv
350+ cp dist/*.whl /tmp/wheeltest
351+
352+ cd /tmp/wheeltest
353+ . ./venv/bin/activate
354+ python3 -m pip install -U wheel pip twine
355+ python3 -m twine check *.whl
356+ python3 -m pip install *.whl
357+ python3 -c "<< parameters.python_smoke_code >>"
358+ deactivate
359+
360+ cd /tmp/sdisttest
361+ . ./venv/bin/activate
362+ python3 -m pip install -U wheel pip twine
363+ python3 -m twine check *.tar.gz
364+ python3 -m pip install *.tar.gz
365+ python3 -c "<< parameters.python_smoke_code >>"
366+ deactivate
367+
368+ - run :
369+ name : upload to devpi
370+ command : |
371+ . venv/bin/activate
372+ twine upload --repository-url "<< parameters.devpi_base_url >><< parameters.devpi_index >>" dist/*
279373
280374 do_docker_prep :
281375 description : " Install packages and set commit."
@@ -333,11 +427,11 @@ commands:
333427 - run :
334428 name : build images
335429 command : |
336- docker/build_all .sh << parameters.image-tag >>
430+ docker/scripts/build .sh << parameters.image-tag >>
337431 - run :
338432 name : smoke test images
339433 command : |
340- docker/scripts/test_all .sh << parameters.image-tag >>
434+ docker/scripts/test .sh << parameters.image-tag >>
341435
342436 push_docker_image :
343437 description : " Push a docker image up to a registry"
@@ -364,12 +458,12 @@ commands:
364458 - run :
365459 name : retag images
366460 command : |
367- docker/scripts/retag_all .sh << parameters.source-tag >> << parameters.image-tag >>
461+ docker/scripts/retag .sh << parameters.source-tag >> << parameters.image-tag >>
368462
369463 - run :
370464 name : push images
371465 command : |
372- docker/scripts/push_all .sh << parameters.image-tag >> << parameters.registry >> imageDigests.txt
466+ docker/scripts/push .sh << parameters.image-tag >> << parameters.registry >> imageDigests.txt
373467
374468 - when :
375469 condition : << parameters.cosign >>
@@ -422,7 +516,7 @@ commands:
422516 command : |
423517 if [ -z $DOCKER_FAILOVER ]
424518 then
425- docker/scripts/copy_all .sh << parameters.image-tag >> << parameters.registry >> << parameters.secondaryregistry >>
519+ docker/scripts/copy .sh << parameters.image-tag >> << parameters.registry >> << parameters.secondaryregistry >>
426520 else
427521 echo "Skipping secondary registry copy."
428522 fi
@@ -447,34 +541,35 @@ commands:
447541
448542jobs :
449543
450- python311 :
544+ python314 :
451545 resource_class : xlarge
452546 docker :
453- - image : cimg/python:3.11
547+ - image : cimg/python:3.14.2
454548 environment :
455- PYVERS : 3.11
549+ PYVERS : 3.14
550+ NO_COLOR : 1
456551 RUN_SYNTAX : 1
457552 SYN_VENDOR_TEST : 1
458553 CODECOV_FLAG : linux
459554 SYN_REGRESSION_REPO : ~/git/synapse-regression
460555 COVERAGE_FILE : test-reports/<< pipeline.git.revision >>/.coverage
461556 COVERAGE_ARGS : --cov synapse --cov-append
557+ COVERAGE_CORE : sysmon
462558
463559 working_directory : ~/repo
464560
465561 steps :
466562 - test_steps_python
467563
468- python311_replay :
564+ python314_replay :
469565 resource_class : xlarge
470566 docker :
471- - image : cimg/python:3.11
567+ - image : cimg/python:3.14.2
472568 environment :
473- PYVERS : 3.11
569+ PYVERS : 3.14
570+ NO_COLOR : 1
474571 RUN_SYNTAX : 1
475- CODECOV_FLAG : linux_replay
476572 SYN_REGRESSION_REPO : ~/git/synapse-regression
477- COVERAGE_ARGS : --cov synapse
478573 SYNDEV_NEXUS_REPLAY : 1
479574
480575 working_directory : ~/repo
@@ -484,9 +579,9 @@ jobs:
484579
485580 doctests :
486581 docker :
487- - image : cimg/python:3.11
582+ - image : cimg/python:3.14.2
488583 environment :
489- PYVERS : 3.11
584+ PYVERS : 3.14
490585
491586 working_directory : ~/repo
492587
@@ -495,10 +590,10 @@ jobs:
495590
496591 python_package_smoketest :
497592 docker :
498- - image : cimg/python:3.11
593+ - image : cimg/python:3.14.2
499594 environment :
500595 PYPI_SMOKE_CODE : import synapse; print(synapse.version)
501- PYTHON_TAG : py311
596+ PYTHON_TAG : py314
502597
503598 steps :
504599 - deploy_pypi_prologue
@@ -507,10 +602,10 @@ jobs:
507602
508603 deploy_pypi :
509604 docker :
510- - image : cimg/python:3.11
605+ - image : cimg/python:3.14.2
511606 environment :
512607 PYPI_SMOKE_CODE : import synapse; print(synapse.version)
513- PYTHON_TAG : py311
608+ PYTHON_TAG : py314
514609
515610 steps :
516611 - deploy_pypi_prologue
@@ -552,6 +647,26 @@ jobs:
552647 registry : ${DOCKER_PRIMARY_REGISTRY}
553648 secondaryregistry : ${DOCKER_SECONDARY_REGISTRY}
554649
650+ devpi_synapse_3xx :
651+ docker :
652+ - image : cimg/python:3.14.2
653+ steps :
654+ - checkout
655+ - run :
656+ name : Version bump and date the build.
657+ command : |
658+ python3 -m pip install bump2version
659+ DATE=`date '+%Y%m%d%H%M'`
660+ CURRENT_VERSION=`grep "current_version =" .bumpversion.cfg | cut -f 2 -d "=" | tr -d '[:space:]'`
661+ # The "patch" value is used here just to fulfill a required argument.
662+ python3 -m bumpversion --allow-dirty --no-tag --no-commit --new-version "${CURRENT_VERSION}a${DATE}" patch
663+ - deploy_to_devpi :
664+ devpi_base_url : ${DEVPI_BASE_URL}
665+ devpi_index : vertex/synapse-3xx
666+ python_tag : py314
667+ tag_verify : false
668+ python_smoke_code : import synapse; print(synapse.version)
669+
555670workflows :
556671 version : 2
557672 run_tests :
@@ -563,19 +678,21 @@ workflows:
563678 branches :
564679 only : /.*/
565680
566- - python311 :
681+ - python314 :
567682 filters :
568683 tags :
569684 only : /.*/
570685 branches :
571686 only : /.*/
572687
573- - python311_replay :
688+ - python314_replay :
574689 filters :
575690 tags :
576691 only : /.*/
577692 branches :
578- only : /.*/
693+ only :
694+ - master
695+ - synapse-3xx
579696
580697 - python_package_smoketest :
581698 filters :
@@ -588,8 +705,8 @@ workflows:
588705 - deploy_pypi :
589706 requires :
590707 - doctests
591- - python311
592- - python311_replay
708+ - python314
709+ - python314_replay
593710 - python_package_smoketest
594711 context :
595712 - PublicPypiAccess
@@ -599,11 +716,26 @@ workflows:
599716 branches :
600717 ignore : /.*/
601718
719+ - devpi_synapse_3xx :
720+ context :
721+ - Devpi00Access
722+ requires :
723+ - doctests
724+ - python314
725+ - python314_replay
726+ - python_package_smoketest
727+ filters :
728+ tags :
729+ ignore : /.*/
730+ branches :
731+ only :
732+ - synapse-3xx
733+
602734 - gh-release/dorelease :
603735 requires :
604736 - doctests
605- - python311
606- - python311_replay
737+ - python314
738+ - python314_replay
607739 - python_package_smoketest
608740 context :
609741 - GithubMachine
@@ -617,7 +749,7 @@ workflows:
617749 - build_docker_branch :
618750 requires :
619751 - doctests
620- - python311
752+ - python314
621753 context :
622754 - AWSEcrPusherOSS
623755 - SynapseDockerCloudUpload
@@ -626,11 +758,12 @@ workflows:
626758 branches :
627759 only :
628760 - master
761+ - synapse-3xx
629762
630763 - build_docker_tag :
631764 requires :
632765 - doctests
633- - python311
766+ - python314
634767 context :
635768 - AWSEcrPusherOSS
636769 - SynapseDockerCloudUpload
@@ -652,7 +785,7 @@ workflows:
652785 - master
653786 jobs :
654787 - doctests
655- - python311
788+ - python314
656789
657790 weekly :
658791 triggers :
@@ -663,4 +796,4 @@ workflows:
663796 only :
664797 - master
665798 jobs :
666- - python311_replay
799+ - python314_replay
0 commit comments