Skip to content

Commit

Permalink
Enable PIP check for both CI and PROD image (#12664)
Browse files Browse the repository at this point in the history
This PR enables PIP check after constraints have been updated
to be stable and 'pip check' compliant in #12636

(cherry picked from commit fa8af2d)
  • Loading branch information
potiuk authored and kaxil committed Jan 22, 2021
1 parent f9c5a7f commit efca0c0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
17 changes: 17 additions & 0 deletions scripts/ci/images/ci_wait_for_ci_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
# shellcheck source=scripts/ci/libraries/_script_init.sh
. "$( dirname "${BASH_SOURCE[0]}" )/../libraries/_script_init.sh"

function verify_ci_image_dependencies {
echo
echo "Checking if Airflow dependencies are non-conflicting in CI image."
echo

push_pull_remove_images::pull_image_github_dockerhub "${AIRFLOW_CI_IMAGE}" \
"${GITHUB_REGISTRY_AIRFLOW_CI_IMAGE}:${GITHUB_REGISTRY_PULL_IMAGE_TAG}"

docker run --rm --entrypoint /bin/bash "${AIRFLOW_CI_IMAGE}" -c 'pip check'
}

push_pull_remove_images::check_if_github_registry_wait_for_image_enabled

push_pull_remove_images::check_if_jq_installed
Expand All @@ -32,3 +43,9 @@ echo

push_pull_remove_images::wait_for_github_registry_image \
"${AIRFLOW_CI_IMAGE_NAME}" "${GITHUB_REGISTRY_PULL_IMAGE_TAG}"

echo
echo "Verifying the ${AIRFLOW_CI_IMAGE_NAME} image after pulling it"
echo

verify_ci_image_dependencies
18 changes: 18 additions & 0 deletions scripts/ci/images/ci_wait_for_prod_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
# shellcheck source=scripts/ci/libraries/_script_init.sh
. "$( dirname "${BASH_SOURCE[0]}" )/../libraries/_script_init.sh"

function verify_prod_image_dependencies {
echo
echo "Checking if Airflow dependencies are non-conflicting in PROD image."
echo

push_pull_remove_images::pull_image_github_dockerhub "${AIRFLOW_PROD_IMAGE}" \
"${GITHUB_REGISTRY_AIRFLOW_PROD_IMAGE}:${GITHUB_REGISTRY_PULL_IMAGE_TAG}"

# TODO: remove the | true after we fixed pip check for prod image
docker run --rm --entrypoint /bin/bash "${AIRFLOW_PROD_IMAGE}" -c 'pip check' || true
}

push_pull_remove_images::check_if_github_registry_wait_for_image_enabled

push_pull_remove_images::check_if_jq_installed
Expand All @@ -32,3 +44,9 @@ echo

push_pull_remove_images::wait_for_github_registry_image \
"${AIRFLOW_PROD_IMAGE_NAME}" "${GITHUB_REGISTRY_PULL_IMAGE_TAG}"

echo
echo "Verifying the ${AIRFLOW_PROD_IMAGE_NAME} image after pulling it"
echo

verify_prod_image_dependencies

0 comments on commit efca0c0

Please sign in to comment.