Skip to content

Commit

Permalink
Inline restoring target workflow scripts in the build-images workflow (
Browse files Browse the repository at this point in the history
  • Loading branch information
potiuk committed Oct 12, 2023
1 parent 545e4d5 commit 1f63199
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 51 deletions.
43 changes: 0 additions & 43 deletions .github/actions/get-target-branch-build-scripts/action.yml

This file was deleted.

92 changes: 84 additions & 8 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,27 @@ jobs:
# Stdout is redirected to GITHUB_ENV but we also print it to stderr to see it in ci log
print(output, file=sys.stderr)
EOF
- name: "Get target branch build scripts"
uses: ./.github/actions/get-target-branch-build-scripts
- name: Checkout target branch to 'target-airflow' folder to use ci/scripts and breeze from there.
uses: actions/checkout@v3
with:
path: "target-airflow"
ref: ${{ github.base_ref }}
persist-credentials: false
submodules: recursive
- name: >
Override "scripts/ci", "dev" and ".github/actions" with the target branch
so that the PR does not override it
# We should not override those scripts which become part of the image as they will not be
# changed in the image built - we should only override those that are executed to build
# the image.
shell: bash
run: |
rm -rfv "scripts/ci"
mv -v "target-airflow/scripts/ci" "scripts"
rm -rfv "dev"
mv -v "target-airflow/dev" "."
rm -rfv ".github/actions"
mv -v "target-airflow/.github/actions" ".github"
- name: "Install Breeze"
uses: ./.github/actions/breeze
- name: Selective checks
Expand Down Expand Up @@ -184,8 +203,27 @@ jobs:
ref: ${{ needs.build-info.outputs.target-commit-sha }}
persist-credentials: false
submodules: recursive
- name: "Get target branch build scripts"
uses: ./.github/actions/get-target-branch-build-scripts
- name: Checkout target branch to 'target-airflow' folder to use ci/scripts and breeze from there.
uses: actions/checkout@v3
with:
path: "target-airflow"
ref: ${{ github.base_ref }}
persist-credentials: false
submodules: recursive
- name: >
Override "scripts/ci", "dev" and ".github/actions" with the target branch
so that the PR does not override it
# We should not override those scripts which become part of the image as they will not be
# changed in the image built - we should only override those that are executed to build
# the image.
shell: bash
run: |
rm -rfv "scripts/ci"
mv -v "target-airflow/scripts/ci" "scripts"
rm -rfv "dev"
mv -v "target-airflow/dev" "."
rm -rfv ".github/actions"
mv -v "target-airflow/.github/actions" ".github"
- name: >
Build CI Images ${{needs.build-info.outputs.all-python-versions-list-as-string}}:${{env.IMAGE_TAG}}
uses: ./.github/actions/build-ci-images
Expand Down Expand Up @@ -224,8 +262,27 @@ jobs:
ref: ${{ needs.build-info.outputs.target-commit-sha }}
persist-credentials: false
submodules: recursive
- name: "Get target branch build scripts"
uses: ./.github/actions/get-target-branch-build-scripts
- name: Checkout target branch to 'target-airflow' folder to use ci/scripts and breeze from there.
uses: actions/checkout@v3
with:
path: "target-airflow"
ref: ${{ github.base_ref }}
persist-credentials: false
submodules: recursive
- name: >
Override "scripts/ci", "dev" and ".github/actions" with the target branch
so that the PR does not override it
# We should not override those scripts which become part of the image as they will not be
# changed in the image built - we should only override those that are executed to build
# the image.
shell: bash
run: |
rm -rfv "scripts/ci"
mv -v "target-airflow/scripts/ci" "scripts"
rm -rfv "dev"
mv -v "target-airflow/dev" "."
rm -rfv ".github/actions"
mv -v "target-airflow/.github/actions" ".github"
- name: >
Build PROD Images
${{needs.build-info.outputs.all-python-versions-list-as-string}}:${{env.IMAGE_TAG}}
Expand Down Expand Up @@ -264,8 +321,27 @@ jobs:
ref: ${{ needs.build-info.outputs.target-commit-sha }}
persist-credentials: false
submodules: recursive
- name: "Get target branch build scripts"
uses: ./.github/actions/get-target-branch-build-scripts
- name: Checkout target branch to 'target-airflow' folder to use ci/scripts and breeze from there.
uses: actions/checkout@v3
with:
path: "target-airflow"
ref: ${{ github.base_ref }}
persist-credentials: false
submodules: recursive
- name: >
Override "scripts/ci", "dev" and ".github/actions" with the target branch
so that the PR does not override it
# We should not override those scripts which become part of the image as they will not be
# changed in the image built - we should only override those that are executed to build
# the image.
shell: bash
run: |
rm -rfv "scripts/ci"
mv -v "target-airflow/scripts/ci" "scripts"
rm -rfv "dev"
mv -v "target-airflow/dev" "."
rm -rfv ".github/actions"
mv -v "target-airflow/.github/actions" ".github"
- name: "Start ARM instance"
run: ./scripts/ci/images/ci_start_arm_instance_and_connect_to_docker.sh
- name: "Install Breeze"
Expand Down

0 comments on commit 1f63199

Please sign in to comment.