|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | +# |
| 18 | +--- |
| 19 | +name: 'Prepare all CI images' |
| 20 | +description: 'Recreates current python CI images from artifacts for all python versions' |
| 21 | +inputs: |
| 22 | + python-versions-list-as-string: |
| 23 | + description: 'Stringified array of all Python versions to test - separated by spaces.' |
| 24 | + required: true |
| 25 | + platform: |
| 26 | + description: 'Platform for the build - linux/amd64 or linux/arm64' |
| 27 | + required: true |
| 28 | +runs: |
| 29 | + using: "composite" |
| 30 | + steps: |
| 31 | + - name: "Cleanup docker" |
| 32 | + run: ./scripts/ci/cleanup_docker.sh |
| 33 | + shell: bash |
| 34 | + # TODO: Currently we cannot loop through the list of python versions and have dynamic list of |
| 35 | + # tasks. Instead we hardcode all possible python versions and they - but |
| 36 | + # this should be implemented in stash action as list of keys to download. |
| 37 | + # That includes 3.8 - 3.12 as we are backporting it to v2-10-test branch |
| 38 | + # This is captured in https://github.com/apache/airflow/issues/45268 |
| 39 | + - name: "Restore CI docker image ${{ inputs.platform }}:3.8" |
| 40 | + uses: ./.github/actions/prepare_single_ci_image |
| 41 | + with: |
| 42 | + platform: ${{ inputs.platform }} |
| 43 | + python: "3.8" |
| 44 | + python-versions-list-as-string: ${{ inputs.python-versions-list-as-string }} |
| 45 | + - name: "Restore CI docker image ${{ inputs.platform }}:3.9" |
| 46 | + uses: ./.github/actions/prepare_single_ci_image |
| 47 | + with: |
| 48 | + platform: ${{ inputs.platform }} |
| 49 | + python: "3.9" |
| 50 | + python-versions-list-as-string: ${{ inputs.python-versions-list-as-string }} |
| 51 | + - name: "Restore CI docker image ${{ inputs.platform }}:3.10" |
| 52 | + uses: ./.github/actions/prepare_single_ci_image |
| 53 | + with: |
| 54 | + platform: ${{ inputs.platform }} |
| 55 | + python: "3.10" |
| 56 | + python-versions-list-as-string: ${{ inputs.python-versions-list-as-string }} |
| 57 | + - name: "Restore CI docker image ${{ inputs.platform }}:3.11" |
| 58 | + uses: ./.github/actions/prepare_single_ci_image |
| 59 | + with: |
| 60 | + platform: ${{ inputs.platform }} |
| 61 | + python: "3.11" |
| 62 | + python-versions-list-as-string: ${{ inputs.python-versions-list-as-string }} |
| 63 | + - name: "Restore CI docker image ${{ inputs.platform }}:3.12" |
| 64 | + uses: ./.github/actions/prepare_single_ci_image |
| 65 | + with: |
| 66 | + platform: ${{ inputs.platform }} |
| 67 | + python: "3.12" |
| 68 | + python-versions-list-as-string: ${{ inputs.python-versions-list-as-string }} |
0 commit comments