[AIRFLOW-6823] Fix root owned files automatically in Breeze (#7449)

This commit is contained in:
Jarek Potiuk 2020-02-18 20:22:57 +01:00 коммит произвёл GitHub
Родитель 7c95c8144d
Коммит 03fb50aaa4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -546,6 +546,10 @@ EOF
confirm_image_rebuild
fi
if [[ ${SKIP_REBUILD} != "true" ]]; then
ROOT_FILES_COUNT=$(find "airflow" "tests" -user root | wc -l)
if [[ ${ROOT_FILES_COUNT} != "0" ]]; then
./scripts/ci/ci_fix_ownership.sh
fi
print_info
print_info "${ACTION} start: ${THE_IMAGE_TYPE} image."
print_info

Просмотреть файл

@ -105,8 +105,8 @@ function in_container_fix_ownership() {
print_in_container_info "Changing ownership of root-owned files to ${HOST_USER_ID}.${HOST_GROUP_ID}"
print_in_container_info
set +o pipefail
sudo find . -user root | sudo xargs chown -v "${HOST_USER_ID}.${HOST_GROUP_ID}" | wc -l | \
xargs -n 1 echo "Number of files with changed ownership:"
sudo find . -user root | sudo xargs chown -v "${HOST_USER_ID}.${HOST_GROUP_ID}" --no-dereference | \
wc -l | xargs -n 1 echo "Number of files with changed ownership:"
set -o pipefail
print_in_container_info
print_in_container_info