@@ -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"
@@ -1721,6 +1695,63 @@ jobs:
1721
1695
# TODO: improve caching for that build
1722
1696
IMAGE_TAG: "bullseye-${{ github.event.pull_request.head.sha || github.sha }}"
1723
1697
1698
+ build-prod-images-mysql-client :
1699
+ timeout-minutes : 80
1700
+ name : >
1701
+ Build MysQL Client PROD images (main)
1702
+ ${{needs.build-info.outputs.all-python-versions-list-as-string}}
1703
+ runs-on : ${{fromJSON(needs.build-info.outputs.runs-on)}}
1704
+ needs : [build-info, build-ci-images]
1705
+ if : needs.build-info.outputs.canary-run == 'true'
1706
+ env :
1707
+ DEFAULT_BRANCH : ${{ needs.build-info.outputs.default-branch }}
1708
+ DEFAULT_CONSTRAINTS_BRANCH : ${{ needs.build-info.outputs.default-constraints-branch }}
1709
+ RUNS_ON : " ${{needs.build-info.outputs.runs-on}}"
1710
+ BACKEND : sqlite
1711
+ VERSION_SUFFIX_FOR_PYPI : " dev0"
1712
+ DEBUG_RESOURCES : ${{needs.build-info.outputs.debug-resources}}
1713
+ # Force more parallelism for build even on public images
1714
+ PARALLELISM : 6
1715
+ steps :
1716
+ - name : Cleanup repo
1717
+ run : docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
1718
+ if : >
1719
+ needs.build-info.outputs.in-workflow-build == 'true' &&
1720
+ needs.build-info.outputs.default-branch == 'main'
1721
+ - uses : actions/checkout@v3
1722
+ with :
1723
+ ref : ${{ needs.build-info.outputs.targetCommitSha }}
1724
+ persist-credentials : false
1725
+ submodules : recursive
1726
+ if : >
1727
+ needs.build-info.outputs.in-workflow-build == 'true' &&
1728
+ needs.build-info.outputs.default-branch == 'main'
1729
+ - name : " Install Breeze"
1730
+ uses : ./.github/actions/breeze
1731
+ if : >
1732
+ needs.build-info.outputs.in-workflow-build == 'true' &&
1733
+ needs.build-info.outputs.default-branch == 'main'
1734
+ - name : >
1735
+ Build Bullseye PROD Images
1736
+ ${{needs.build-info.outputs.all-python-versions-list-as-string}}:${{env.IMAGE_TAG}}
1737
+ uses: ./.github/actions/build-prod-images
1738
+ if: >
1739
+ needs.build-info.outputs.in-workflow-build == 'true' &&
1740
+ needs.build-info.outputs.default-branch == 'main'
1741
+ with:
1742
+ build-provider-packages: ${{ needs.build-info.outputs.default-branch == 'main' }}
1743
+ chicken-egg-providers: ${{ needs.build-info.outputs.chicken-egg-providers }}
1744
+ env:
1745
+ UPGRADE_TO_NEWER_DEPENDENCIES: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
1746
+ DOCKER_CACHE: ${{ needs.build-info.outputs.cache-directive }}
1747
+ PYTHON_VERSIONS: ${{needs.build-info.outputs.all-python-versions-list-as-string}}
1748
+ DEBUG_RESOURCES: ${{ needs.build-info.outputs.debug-resources }}
1749
+ INSTALL_MYSQL_CLIENT_TYPE: "mysql"
1750
+ # Do not override the "mariadb" (original) image - just push a new mysql image
1751
+ # TODO: improve caching for that build
1752
+ IMAGE_TAG: "bullseye-${{ github.event.pull_request.head.sha || github.sha }}"
1753
+
1754
+
1724
1755
build-prod-images-release-branch :
1725
1756
timeout-minutes : 80
1726
1757
name : >
@@ -1827,6 +1858,62 @@ jobs:
1827
1858
# TODO: improve caching for that build
1828
1859
IMAGE_TAG: "bullseye-${{ github.event.pull_request.head.sha || github.sha }}"
1829
1860
1861
+ build-prod-images-mysql-release-branch :
1862
+ timeout-minutes : 80
1863
+ name : >
1864
+ Build MySQL PROD images (v2_*_test)
1865
+ ${{needs.build-info.outputs.all-python-versions-list-as-string}}
1866
+ runs-on : ${{fromJSON(needs.build-info.outputs.runs-on)}}
1867
+ needs : [build-info, generate-constraints]
1868
+ if : needs.build-info.outputs.canary-run == 'true'
1869
+ env :
1870
+ DEFAULT_BRANCH : ${{ needs.build-info.outputs.default-branch }}
1871
+ DEFAULT_CONSTRAINTS_BRANCH : ${{ needs.build-info.outputs.default-constraints-branch }}
1872
+ RUNS_ON : " ${{needs.build-info.outputs.runs-on}}"
1873
+ BACKEND : sqlite
1874
+ VERSION_SUFFIX_FOR_PYPI : " dev0"
1875
+ DEBUG_RESOURCES : ${{needs.build-info.outputs.debug-resources}}
1876
+ # Force more parallelism for build even on public images
1877
+ PARALLELISM : 6
1878
+ steps :
1879
+ - name : Cleanup repo
1880
+ run : docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
1881
+ if : >
1882
+ needs.build-info.outputs.in-workflow-build == 'true' &&
1883
+ needs.build-info.outputs.default-branch != 'main'
1884
+ - uses : actions/checkout@v3
1885
+ with :
1886
+ ref : ${{ needs.build-info.outputs.targetCommitSha }}
1887
+ persist-credentials : false
1888
+ submodules : recursive
1889
+ if : >
1890
+ needs.build-info.outputs.in-workflow-build == 'true' &&
1891
+ needs.build-info.outputs.default-branch != 'main'
1892
+ - name : " Install Breeze"
1893
+ uses : ./.github/actions/breeze
1894
+ if : >
1895
+ needs.build-info.outputs.in-workflow-build == 'true' &&
1896
+ needs.build-info.outputs.default-branch != 'main'
1897
+ - name : >
1898
+ Build Bullseye PROD Images
1899
+ ${{needs.build-info.outputs.all-python-versions-list-as-string}}:${{env.IMAGE_TAG}}
1900
+ uses: ./.github/actions/build-prod-images
1901
+ if: >
1902
+ needs.build-info.outputs.in-workflow-build == 'true' &&
1903
+ needs.build-info.outputs.default-branch != 'main'
1904
+ with:
1905
+ build-provider-packages: ${{ needs.build-info.outputs.default-branch == 'main' }}
1906
+ chicken-egg-providers: ${{ needs.build-info.outputs.chicken-egg-providers }}
1907
+ env:
1908
+ UPGRADE_TO_NEWER_DEPENDENCIES: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
1909
+ DOCKER_CACHE: ${{ needs.build-info.outputs.cache-directive }}
1910
+ PYTHON_VERSIONS: ${{needs.build-info.outputs.all-python-versions-list-as-string}}
1911
+ DEBUG_RESOURCES: ${{ needs.build-info.outputs.debug-resources }}
1912
+ INSTALL_MYSQL_CLIENT_TYPE: "mysql"
1913
+ # Do not override the "mariadb" image - just push a new mysql image
1914
+ # TODO: improve caching for that build
1915
+ IMAGE_TAG: "mysql-${{ github.event.pull_request.head.sha || github.sha }}"
1916
+
1830
1917
wait-for-prod-images :
1831
1918
timeout-minutes : 80
1832
1919
name : " Wait for PROD images"
@@ -1862,6 +1949,43 @@ jobs:
1862
1949
DEBUG_RESOURCES : ${{needs.build-info.outputs.debug-resources}}
1863
1950
if : needs.build-info.outputs.in-workflow-build == 'false'
1864
1951
1952
+ test-examples-of-prod-image-building :
1953
+ timeout-minutes : 60
1954
+ name : " Test examples of production image building"
1955
+ runs-on : ${{fromJSON(needs.build-info.outputs.runs-on)}}
1956
+ needs : [build-info, wait-for-prod-images]
1957
+ if : needs.build-info.outputs.prod-image-build == 'true'
1958
+ steps :
1959
+ - name : Cleanup repo
1960
+ run : docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
1961
+ - name : " Checkout ${{ github.ref }} ( ${{ github.sha }} )"
1962
+ uses : actions/checkout@v4
1963
+ with :
1964
+ fetch-depth : 2
1965
+ persist-credentials : false
1966
+ - name : " Install Breeze"
1967
+ uses : ./.github/actions/breeze
1968
+ - name : Pull PROD image "${{needs.build-info.outputs.default-python-version}}":${{ env.IMAGE_TAG }}
1969
+ run : breeze prod-image pull --tag-as-latest
1970
+ env :
1971
+ PYTHON_MAJOR_MINOR_VERSION : " ${{needs.build-info.outputs.default-python-version}}"
1972
+ - name : " Setup python"
1973
+ uses : actions/setup-python@v4
1974
+ with :
1975
+ python-version : ${{needs.build-info.outputs.default-python-version}}
1976
+ cache : ' pip'
1977
+ cache-dependency-path : ./dev/requirements.txt
1978
+ - name : " Test examples of PROD image building"
1979
+ # yamllint disable-line rule:line-length
1980
+ run : >
1981
+ cd ./docker_tests &&
1982
+ python -m pip install -r requirements.txt &&
1983
+ TEST_IMAGE="ghcr.io/${GITHUB_REPOSITORY}/main/prod/python${{env.PYTHON_MAJOR_MINOR_VERSION}}:${{env.IMAGE_TAG}}"
1984
+ python -m pytest test_examples_of_prod_image_building.py -n auto --color=yes
1985
+ env :
1986
+ PYTHON_MAJOR_MINOR_VERSION : " ${{needs.build-info.outputs.default-python-version}}"
1987
+
1988
+
1865
1989
test-docker-compose-quick-start :
1866
1990
timeout-minutes : 60
1867
1991
name : " Verify PROD image and docker-compose quick start"
0 commit comments