@@ -395,32 +395,6 @@ jobs:
395
395
- name : " Generate client codegen diff"
396
396
run : ./scripts/ci/openapi/client_codegen_diff.sh
397
397
398
- test-examples-of-prod-image-building :
399
- timeout-minutes : 60
400
- name : " Test examples of production image building"
401
- runs-on : ${{fromJSON(needs.build-info.outputs.runs-on)}}
402
- needs : [build-info]
403
- if : needs.build-info.outputs.ci-image-build == 'true'
404
- steps :
405
- - name : Cleanup repo
406
- run : docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
407
- - name : " Checkout ${{ github.ref }} ( ${{ github.sha }} )"
408
- uses : actions/checkout@v4
409
- with :
410
- fetch-depth : 2
411
- persist-credentials : false
412
- - name : " Setup python"
413
- uses : actions/setup-python@v4
414
- with :
415
- python-version : " ${{needs.build-info.outputs.default-python-version}}"
416
- cache : ' pip'
417
- cache-dependency-path : ./dev/requirements.txt
418
- - name : " Test examples of PROD image building"
419
- run : >
420
- cd ./docker_tests &&
421
- python -m pip install -r requirements.txt &&
422
- python -m pytest test_examples_of_prod_image_building.py -n auto --color=yes
423
-
424
398
test-git-clone-on-windows :
425
399
timeout-minutes : 5
426
400
name : " Test git clone on Windows"
@@ -1734,6 +1708,63 @@ jobs:
1734
1708
# TODO: improve caching for that build
1735
1709
IMAGE_TAG: "bullseye-${{ github.event.pull_request.head.sha || github.sha }}"
1736
1710
1711
+ build-prod-images-mysql-client :
1712
+ timeout-minutes : 80
1713
+ name : >
1714
+ Build MysQL Client PROD images (main)
1715
+ ${{needs.build-info.outputs.all-python-versions-list-as-string}}
1716
+ runs-on : ${{fromJSON(needs.build-info.outputs.runs-on)}}
1717
+ needs : [build-info, build-ci-images]
1718
+ if : needs.build-info.outputs.canary-run == 'true'
1719
+ env :
1720
+ DEFAULT_BRANCH : ${{ needs.build-info.outputs.default-branch }}
1721
+ DEFAULT_CONSTRAINTS_BRANCH : ${{ needs.build-info.outputs.default-constraints-branch }}
1722
+ RUNS_ON : " ${{needs.build-info.outputs.runs-on}}"
1723
+ BACKEND : sqlite
1724
+ VERSION_SUFFIX_FOR_PYPI : " dev0"
1725
+ DEBUG_RESOURCES : ${{needs.build-info.outputs.debug-resources}}
1726
+ # Force more parallelism for build even on public images
1727
+ PARALLELISM : 6
1728
+ steps :
1729
+ - name : Cleanup repo
1730
+ run : docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
1731
+ if : >
1732
+ needs.build-info.outputs.in-workflow-build == 'true' &&
1733
+ needs.build-info.outputs.default-branch == 'main'
1734
+ - uses : actions/checkout@v3
1735
+ with :
1736
+ ref : ${{ needs.build-info.outputs.targetCommitSha }}
1737
+ persist-credentials : false
1738
+ submodules : recursive
1739
+ if : >
1740
+ needs.build-info.outputs.in-workflow-build == 'true' &&
1741
+ needs.build-info.outputs.default-branch == 'main'
1742
+ - name : " Install Breeze"
1743
+ uses : ./.github/actions/breeze
1744
+ if : >
1745
+ needs.build-info.outputs.in-workflow-build == 'true' &&
1746
+ needs.build-info.outputs.default-branch == 'main'
1747
+ - name : >
1748
+ Build Bullseye PROD Images
1749
+ ${{needs.build-info.outputs.all-python-versions-list-as-string}}:${{env.IMAGE_TAG}}
1750
+ uses: ./.github/actions/build-prod-images
1751
+ if: >
1752
+ needs.build-info.outputs.in-workflow-build == 'true' &&
1753
+ needs.build-info.outputs.default-branch == 'main'
1754
+ with:
1755
+ build-provider-packages: ${{ needs.build-info.outputs.default-branch == 'main' }}
1756
+ chicken-egg-providers: ${{ needs.build-info.outputs.chicken-egg-providers }}
1757
+ env:
1758
+ UPGRADE_TO_NEWER_DEPENDENCIES: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
1759
+ DOCKER_CACHE: ${{ needs.build-info.outputs.cache-directive }}
1760
+ PYTHON_VERSIONS: ${{needs.build-info.outputs.all-python-versions-list-as-string}}
1761
+ DEBUG_RESOURCES: ${{ needs.build-info.outputs.debug-resources }}
1762
+ INSTALL_MYSQL_CLIENT_TYPE: "mysql"
1763
+ # Do not override the "mariadb" (original) image - just push a new mysql image
1764
+ # TODO: improve caching for that build
1765
+ IMAGE_TAG: "bullseye-${{ github.event.pull_request.head.sha || github.sha }}"
1766
+
1767
+
1737
1768
build-prod-images-release-branch :
1738
1769
timeout-minutes : 80
1739
1770
name : >
@@ -1840,6 +1871,62 @@ jobs:
1840
1871
# TODO: improve caching for that build
1841
1872
IMAGE_TAG: "bullseye-${{ github.event.pull_request.head.sha || github.sha }}"
1842
1873
1874
+ build-prod-images-mysql-release-branch :
1875
+ timeout-minutes : 80
1876
+ name : >
1877
+ Build MySQL PROD images (v2_*_test)
1878
+ ${{needs.build-info.outputs.all-python-versions-list-as-string}}
1879
+ runs-on : ${{fromJSON(needs.build-info.outputs.runs-on)}}
1880
+ needs : [build-info, generate-constraints]
1881
+ if : needs.build-info.outputs.canary-run == 'true'
1882
+ env :
1883
+ DEFAULT_BRANCH : ${{ needs.build-info.outputs.default-branch }}
1884
+ DEFAULT_CONSTRAINTS_BRANCH : ${{ needs.build-info.outputs.default-constraints-branch }}
1885
+ RUNS_ON : " ${{needs.build-info.outputs.runs-on}}"
1886
+ BACKEND : sqlite
1887
+ VERSION_SUFFIX_FOR_PYPI : " dev0"
1888
+ DEBUG_RESOURCES : ${{needs.build-info.outputs.debug-resources}}
1889
+ # Force more parallelism for build even on public images
1890
+ PARALLELISM : 6
1891
+ steps :
1892
+ - name : Cleanup repo
1893
+ run : docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
1894
+ if : >
1895
+ needs.build-info.outputs.in-workflow-build == 'true' &&
1896
+ needs.build-info.outputs.default-branch != 'main'
1897
+ - uses : actions/checkout@v3
1898
+ with :
1899
+ ref : ${{ needs.build-info.outputs.targetCommitSha }}
1900
+ persist-credentials : false
1901
+ submodules : recursive
1902
+ if : >
1903
+ needs.build-info.outputs.in-workflow-build == 'true' &&
1904
+ needs.build-info.outputs.default-branch != 'main'
1905
+ - name : " Install Breeze"
1906
+ uses : ./.github/actions/breeze
1907
+ if : >
1908
+ needs.build-info.outputs.in-workflow-build == 'true' &&
1909
+ needs.build-info.outputs.default-branch != 'main'
1910
+ - name : >
1911
+ Build Bullseye PROD Images
1912
+ ${{needs.build-info.outputs.all-python-versions-list-as-string}}:${{env.IMAGE_TAG}}
1913
+ uses: ./.github/actions/build-prod-images
1914
+ if: >
1915
+ needs.build-info.outputs.in-workflow-build == 'true' &&
1916
+ needs.build-info.outputs.default-branch != 'main'
1917
+ with:
1918
+ build-provider-packages: ${{ needs.build-info.outputs.default-branch == 'main' }}
1919
+ chicken-egg-providers: ${{ needs.build-info.outputs.chicken-egg-providers }}
1920
+ env:
1921
+ UPGRADE_TO_NEWER_DEPENDENCIES: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
1922
+ DOCKER_CACHE: ${{ needs.build-info.outputs.cache-directive }}
1923
+ PYTHON_VERSIONS: ${{needs.build-info.outputs.all-python-versions-list-as-string}}
1924
+ DEBUG_RESOURCES: ${{ needs.build-info.outputs.debug-resources }}
1925
+ INSTALL_MYSQL_CLIENT_TYPE: "mysql"
1926
+ # Do not override the "mariadb" image - just push a new mysql image
1927
+ # TODO: improve caching for that build
1928
+ IMAGE_TAG: "mysql-${{ github.event.pull_request.head.sha || github.sha }}"
1929
+
1843
1930
wait-for-prod-images :
1844
1931
timeout-minutes : 80
1845
1932
name : " Wait for PROD images"
@@ -1875,6 +1962,43 @@ jobs:
1875
1962
DEBUG_RESOURCES : ${{needs.build-info.outputs.debug-resources}}
1876
1963
if : needs.build-info.outputs.in-workflow-build == 'false'
1877
1964
1965
+ test-examples-of-prod-image-building :
1966
+ timeout-minutes : 60
1967
+ name : " Test examples of production image building"
1968
+ runs-on : ${{fromJSON(needs.build-info.outputs.runs-on)}}
1969
+ needs : [build-info, wait-for-prod-images]
1970
+ if : needs.build-info.outputs.prod-image-build == 'true'
1971
+ steps :
1972
+ - name : Cleanup repo
1973
+ run : docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
1974
+ - name : " Checkout ${{ github.ref }} ( ${{ github.sha }} )"
1975
+ uses : actions/checkout@v4
1976
+ with :
1977
+ fetch-depth : 2
1978
+ persist-credentials : false
1979
+ - name : " Install Breeze"
1980
+ uses : ./.github/actions/breeze
1981
+ - name : Pull PROD image "${{needs.build-info.outputs.default-python-version}}":${{ env.IMAGE_TAG }}
1982
+ run : breeze prod-image pull --tag-as-latest
1983
+ env :
1984
+ PYTHON_MAJOR_MINOR_VERSION : " ${{needs.build-info.outputs.default-python-version}}"
1985
+ - name : " Setup python"
1986
+ uses : actions/setup-python@v4
1987
+ with :
1988
+ python-version : ${{needs.build-info.outputs.default-python-version}}
1989
+ cache : ' pip'
1990
+ cache-dependency-path : ./dev/requirements.txt
1991
+ - name : " Test examples of PROD image building"
1992
+ # yamllint disable-line rule:line-length
1993
+ run : >
1994
+ cd ./docker_tests &&
1995
+ python -m pip install -r requirements.txt &&
1996
+ TEST_IMAGE="ghcr.io/${GITHUB_REPOSITORY}/main/prod/python${{env.PYTHON_MAJOR_MINOR_VERSION}}:${{env.IMAGE_TAG}}"
1997
+ python -m pytest test_examples_of_prod_image_building.py -n auto --color=yes
1998
+ env :
1999
+ PYTHON_MAJOR_MINOR_VERSION : " ${{needs.build-info.outputs.default-python-version}}"
2000
+
2001
+
1878
2002
test-docker-compose-quick-start :
1879
2003
timeout-minutes : 60
1880
2004
name : " Docker-compose quick start with PROD image verifying"
0 commit comments