potiuk commented on pull request #11903:
URL: https://github.com/apache/airflow/pull/11903#issuecomment-717791362
@turbaszek - add this to `scripts/ci/libriaries/_initialisation.sh` (see
where it is added in master). This should help with image building.
```
# Determine current branch
function initialization::initialize_branch_variables() {
# Default branch used - this will be different in different branches
export DEFAULT_BRANCH=${DEFAULT_BRANCH="v1-10-test"}
export
DEFAULT_CONSTRAINTS_BRANCH=${DEFAULT_CONSTRAINTS_BRANCH="constraints-1-10"}
readonly DEFAULT_BRANCH
readonly DEFAULT_CONSTRAINTS_BRANCH
# Default branch name for triggered builds is the one configured in
default branch
# We need to read it here as it comes from _common_values.sh
export BRANCH_NAME=${BRANCH_NAME:=${DEFAULT_BRANCH}}
}
```
Explanation:
Since we cannot 'source' the scripts coming from the PR (it's dangerous
because we could run malicious code) we grep _initialization.sh to find out
which is the image branch and what is the constraints branch.
This is done (and explained) here:
https://github.com/apache/airflow/blob/db121f726b3c7a37aca1ea05eb4714f884456005/.github/workflows/build-images-workflow-run.yml#L280
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]