Skip to content
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
10 changes: 10 additions & 0 deletions CI.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,16 @@ You can use those variables when you try to reproduce the build locally.
+-----------------------------------------+-------------+--------------+------------+-------------------------------------------------+
| ``COMMIT_SHA`` | | GITHUB_SHA | GITHUB_SHA | SHA of the commit of the build is run |
+-----------------------------------------+-------------+--------------+------------+-------------------------------------------------+
| Initialization |
+-----------------------------------------+-------------+--------------+------------+-------------------------------------------------+
| ``SKIP_ENVIRONMENT_INITIALIZATION`` | false\* | false\* | false\* | Skip initialization of test environment |
| | | | | |
| | | | | \* set to true in pre-commits |
+-----------------------------------------+-------------+--------------+------------+-------------------------------------------------+
| ``SKIP_SSH_SETUP`` | false\* | false\* | false\* | Skip setting up SSH server for tests. |
| | | | | |
| | | | | \* set to true in GitHub CodeSpaces |
+-----------------------------------------+-------------+--------------+------------+-------------------------------------------------+
| Verbosity variables |
+-----------------------------------------+-------------+--------------+------------+-------------------------------------------------+
| ``PRINT_INFO_FROM_SCRIPTS`` | true\* | true\* | true\* | Allows to print output to terminal from running |
Expand Down
2 changes: 2 additions & 0 deletions scripts/ci/docker-compose/_docker.env
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ RUN_TESTS
LIST_OF_INTEGRATION_TESTS_TO_RUN
RUN_SYSTEM_TESTS
START_AIRFLOW
SKIP_ENVIRONMENT_INITIALIZATION
SKIP_TWINE_CHECK
SKIP_SSH_SETUP
TEST_TYPE
UPGRADE_TO_NEWER_DEPENDENCIES
VERBOSE
Expand Down
2 changes: 2 additions & 0 deletions scripts/ci/docker-compose/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ services:
- LIST_OF_INTEGRATION_TESTS_TO_RUN=${LIST_OF_INTEGRATION_TESTS_TO_RUN}
- RUN_SYSTEM_TESTS=${RUN_SYSTEM_TESTS}
- START_AIRFLOW=${START_AIRFLOW}
- SKIP_ENVIRONMENT_INITIALIZATION=${SKIP_ENVIRONMENT_INITIALIZATION}
- SKIP_TWINE_CHECK=${SKIP_TWINE_CHECK}
- SKIP_SSH_SETUP=${SKIP_SSH_SETUP}
- TEST_TYPE=${TEST_TYPE}
- UPGRADE_TO_NEWER_DEPENDENCIES=${UPGRADE_TO_NEWER_DEPENDENCIES}
- VERBOSE=${VERBOSE}
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/docker-compose/devcontainer.env
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ RUN_SYSTEM_TESTS=""
START_AIRFLOW="false"
SKIP_TWINE_CHECK="false"
SKIP_SSH_SETUP="true"
SKIP_ENVIRONMENT_INITIALIZATION="false"
TEST_TYPE=
UPGRADE_TO_NEWER_DEPENDENCIES="false"
VERBOSE="false"
Expand Down
3 changes: 3 additions & 0 deletions scripts/ci/libraries/_initialization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,9 @@ function initialization::initialize_image_build_variables() {
SKIP_SSH_SETUP=${SKIP_SSH_SETUP:="false"}
export SKIP_SSH_SETUP

SKIP_ENVIRONMENT_INITIALIZATION=${SKIP_ENVIRONMENT_INITIALIZATION:="false"}
export SKIP_ENVIRONMENT_INITIALIZATION

export INSTALLED_EXTRAS="async,amazon,celery,cncf.kubernetes,docker,dask,elasticsearch,ftp,grpc,hashicorp,http,imap,ldap,google,microsoft.azure,mysql,postgres,redis,sendgrid,sftp,slack,ssh,statsd,virtualenv"

AIRFLOW_PIP_VERSION=${AIRFLOW_PIP_VERSION:="22.0.4"}
Expand Down
5 changes: 5 additions & 0 deletions scripts/ci/libraries/_runs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function runs::run_docs() {
start_end::group_start "Run build docs"
docker_v run "${EXTRA_DOCKER_FLAGS[@]}" -t \
-e "GITHUB_ACTIONS=${GITHUB_ACTIONS="false"}" \
-e "SKIP_ENVIRONMENT_INITIALIZATION=true" \
--pull never \
"${AIRFLOW_CI_IMAGE_WITH_TAG}" \
"/opt/airflow/scripts/in_container/run_docs_build.sh" "${@}"
Expand All @@ -31,6 +32,7 @@ function runs::run_docs() {
function runs::run_generate_constraints() {
start_end::group_start "Run generate constraints"
docker_v run "${EXTRA_DOCKER_FLAGS[@]}" \
-e "SKIP_ENVIRONMENT_INITIALIZATION=true" \
--pull never \
"${AIRFLOW_CI_IMAGE_WITH_TAG}" \
"/opt/airflow/scripts/in_container/run_generate_constraints.sh"
Expand All @@ -43,6 +45,7 @@ function runs::run_prepare_airflow_packages() {
docker_v run "${EXTRA_DOCKER_FLAGS[@]}" \
-t \
-v "${AIRFLOW_SOURCES}:/opt/airflow" \
-e "SKIP_ENVIRONMENT_INITIALIZATION=true" \
--pull never \
"${AIRFLOW_CI_IMAGE_WITH_TAG}" \
"/opt/airflow/scripts/in_container/run_prepare_airflow_packages.sh"
Expand All @@ -56,6 +59,7 @@ function runs::run_prepare_provider_packages() {
docker_v run "${EXTRA_DOCKER_FLAGS[@]}" \
-t \
-v "${AIRFLOW_SOURCES}:/opt/airflow" \
-e "SKIP_ENVIRONMENT_INITIALIZATION=true" \
--pull never \
"${AIRFLOW_CI_IMAGE_WITH_TAG}" \
"/opt/airflow/scripts/in_container/run_prepare_provider_packages.sh" "${@}"
Expand All @@ -72,6 +76,7 @@ function runs::run_prepare_provider_documentation() {
"${term_flag}" \
-v "${AIRFLOW_SOURCES}:/opt/airflow" \
-e "NON_INTERACTIVE" \
-e "SKIP_ENVIRONMENT_INITIALIZATION=true" \
-e "GENERATE_PROVIDERS_ISSUE" \
-e "GITHUB_TOKEN" \
--pull never \
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/pre_commit/pre_commit_check_license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function run_check_license() {
if ! docker_v run -v "${AIRFLOW_SOURCES}:/opt/airflow" -t \
--user "$(id -ur):$(id -gr)" \
--rm --env-file "${AIRFLOW_SOURCES}/scripts/ci/docker-compose/_docker.env" \
-e "SKIP_ENVIRONMENT_INITIALIZATION=true" \
ghcr.io/apache/airflow-apache-rat:0.13-2021.07.04 \
--exclude-file /opt/airflow/.rat-excludes \
--d /opt/airflow | tee "${AIRFLOW_SOURCES}/logs/rat-results.txt" ; then
Expand Down
2 changes: 2 additions & 0 deletions scripts/ci/pre_commit/pre_commit_flake8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ export PRINT_INFO_FROM_SCRIPTS="false"
function run_flake8() {
if [[ "${#@}" == "0" ]]; then
docker_v run "${EXTRA_DOCKER_FLAGS[@]}" \
-e "SKIP_ENVIRONMENT_INITIALIZATION=true" \
"${AIRFLOW_CI_IMAGE}" "/opt/airflow/scripts/in_container/run_flake8.sh"
else
docker_v run "${EXTRA_DOCKER_FLAGS[@]}" \
-e "SKIP_ENVIRONMENT_INITIALIZATION=true" \
"${AIRFLOW_CI_IMAGE}" "/opt/airflow/scripts/in_container/run_flake8.sh" "${@}"
fi
}
Expand Down
2 changes: 2 additions & 0 deletions scripts/ci/pre_commit/pre_commit_migration_reference.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ export PRINT_INFO_FROM_SCRIPTS="false"
function migration_reference() {
if [[ "${#@}" == "0" ]]; then
docker_v run "${EXTRA_DOCKER_FLAGS[@]}" \
-e "SKIP_ENVIRONMENT_INITIALIZATION=true" \
"${AIRFLOW_CI_IMAGE}" \
"/opt/airflow/scripts/in_container/run_migration_reference.sh"
else
docker_v run "${EXTRA_DOCKER_FLAGS[@]}" \
-e "SKIP_ENVIRONMENT_INITIALIZATION=true" \
"${AIRFLOW_CI_IMAGE}" \
"/opt/airflow/scripts/in_container/run_migration_reference.sh" "${@}"
fi
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/pre_commit/pre_commit_mypy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function run_mypy() {

docker_v run "${EXTRA_DOCKER_FLAGS[@]}" -t \
"-v" "${AIRFLOW_SOURCES}/.mypy_cache:/opt/airflow/.mypy_cache" \
-e "SKIP_ENVIRONMENT_INITIALIZATION=true" \
"${AIRFLOW_CI_IMAGE_WITH_TAG}" \
"/opt/airflow/scripts/in_container/run_mypy.sh" "${files[@]}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function run_test_package_import_all_classes() {
-v "${AIRFLOW_SOURCES}/empty:/opt/airflow/airflow:cached" \
-v "${AIRFLOW_SOURCES}/scripts/in_container:/opt/airflow/scripts/in_container:cached" \
-v "${AIRFLOW_SOURCES}/dev/import_all_classes.py:/opt/airflow/dev/import_all_classes.py:cached" \
-e "SKIP_ENVIRONMENT_INITIALIZATION=true" \
"${AIRFLOW_CI_IMAGE_WITH_TAG}" \
"/opt/airflow/scripts/in_container/run_install_and_test_provider_packages.sh"
}
Expand Down
Loading