Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AIRFLOW-5083] Move image building to before_install for licence #5695

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/ci/_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ function update_all_md5_files() {
do
move_file_md5sum "${AIRFLOW_SOURCES}/${FILE}"
done
touch "${BUILD_CACHE_DIR}/.built_${THE_IMAGE}_${PYTHON_VERSION}"
local SUFFIX=""
if [[ -n ${PYTHON_VERSION:=""} ]]; then
SUFFIX="_${PYTHON_VERSION}"
fi
touch "${BUILD_CACHE_DIR}/.built_${THE_IMAGE}${SUFFIX}"
}

#
Expand Down
4 changes: 3 additions & 1 deletion scripts/ci/ci_before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ export AIRFLOW_CONTAINER_FORCE_PULL_IMAGES="true"
# Cleanup docker installation. It should be empty in CI but let's not risk
docker system prune --all --force

if [[ ${TRAVIS_JOB_NAME} == "Tests"* || ${TRAVIS_JOB_NAME} == "Check license header" ]]; then
if [[ ${TRAVIS_JOB_NAME} == "Tests"* ]]; then
rebuild_image_if_needed_for_tests
elif [[ ${TRAVIS_JOB_NAME} == "Check license header" ]]; then
rebuild_image_for_checklicence
else
rebuild_image_if_needed_for_static_checks
fi
Expand Down
2 changes: 2 additions & 0 deletions scripts/ci/ci_check_license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ set -uo pipefail

MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

export PYTHON_VERSION=3.5

# shellcheck source=./_utils.sh
. "${MY_DIR}/_utils.sh"

Expand Down