121
121
export AIRFLOW_VERSION
122
122
123
123
# Verbosity in running ci scripts
124
- export AIRFLOW_CI_VERBOSE =" false"
124
+ export VERBOSE =" false"
125
125
126
126
# Enter environment by default, rather than run tests or bash command or docker compose or static checks
127
127
export RUN_TESTS=" false"
@@ -130,10 +130,7 @@ export RUN_IN_BASH="false"
130
130
export RUN_STATIC_CHECKS=" false"
131
131
export RUN_BUILD_DOCS=" false"
132
132
133
- export FORCE_BUILD=${FORCE_BUILD:= " false" }
134
-
135
- # if set to true, rebuild is done without asking user
136
- export SKIP_BUILD_CHECK=" false"
133
+ export AIRFLOW_CONTAINER_FORCE_DOCKER_BUILD=${AIRFLOW_CONTAINER_FORCE_DOCKER_BUILD:= " false" }
137
134
138
135
# Files determining whether asciiart/cheatsheet are suppressed
139
136
@@ -392,6 +389,9 @@ The swiss-knife-army tool for Airflow testings. It allows to perform various tes
392
389
-y, --assume-yes
393
390
Assume 'yes' answer to all questions.
394
391
392
+ -n, --assume-no
393
+ Assume 'no' answer to all questions.
394
+
395
395
-C, --toggle-suppress-cheatsheet
396
396
Toggles on/off cheatsheet displayed before starting bash shell
397
397
@@ -406,13 +406,13 @@ The swiss-knife-army tool for Airflow testings. It allows to perform various tes
406
406
-H, --dockerhub-repo
407
407
DockerHub repository used to pull, push, build images. Default: ${_BREEZE_DEFAULT_DOCKERHUB_REPO:= } .
408
408
409
- -r, --force-rebuild -images
410
- Forces rebuilding of the local docker images. The images are rebuilt
409
+ -r, --force-build -images
410
+ Forces building of the local docker images. The images are rebuilt
411
411
automatically for the first time or when changes are detected in
412
412
package-related files, but you can force it using this flag.
413
413
414
- -R, --force-rebuild -images-clean
415
- Force rebuild images without cache. This will remove the pulled or build images
414
+ -R, --force-build -images-clean
415
+ Force build images without cache. This will remove the pulled or build images
416
416
and start building images from scratch. This might take a long time.
417
417
418
418
-p, --force-pull-images
@@ -421,7 +421,7 @@ The swiss-knife-army tool for Airflow testings. It allows to perform various tes
421
421
environment, later the locally build images are used as cache.
422
422
423
423
-u, --push-images
424
- After rebuilding - uploads the images to DockerHub
424
+ After building - uploads the images to DockerHub
425
425
It is useful in case you use your own DockerHub user to store images and you want
426
426
to build them locally. Note that you need to use 'docker login' before you upload images.
427
427
491
491
shift ;;
492
492
-b|--build-only)
493
493
ENTER_ENVIRONMENT=" false"
494
- SKIP_BUILD_CHECK=" true"
495
- AIRFLOW_CONTAINER_DOCKER_BUILD_NEEDED=" true"
496
- FORCE_BUILD=" true"
494
+ export AIRFLOW_CONTAINER_FORCE_DOCKER_BUILD=" true"
497
495
echo " Only build. Do not enter airflow-testing container"
498
496
echo
499
497
shift ;;
500
498
-v|--verbose)
501
- AIRFLOW_CI_VERBOSE =" true"
499
+ VERBOSE =" true"
502
500
echo " Verbose output"
503
501
echo
504
502
shift ;;
505
503
-y|--assume-yes)
506
- export ASSUME_YES= " true "
504
+ export FORCE_ANSWER_TO_QUESTIONS= " yes "
507
505
echo " Assuming 'yes' answer to all questions."
508
506
echo
509
507
shift ;;
508
+ -n|--assume-no)
509
+ export FORCE_ANSWER_TO_QUESTIONS=" no"
510
+ echo " Assuming 'no' answer to all questions."
511
+ echo
512
+ shift ;;
510
513
-C|--toggle-suppress-cheatsheet)
511
514
if [[ -f " ${SUPPRESS_CHEATSHEET_FILE} " ]]; then
512
515
rm -f " ${SUPPRESS_CHEATSHEET_FILE} "
525
528
echo " Toggle suppress asciiart"
526
529
echo
527
530
shift ;;
528
- -r|--force-rebuild -images)
531
+ -r|--force-build -images)
529
532
echo
530
- echo " Force rebuild images"
533
+ echo " Force build images"
531
534
echo
532
- AIRFLOW_CONTAINER_DOCKER_BUILD_NEEDED=" true"
533
- SKIP_BUILD_CHECK=" true"
534
- FORCE_BUILD=" true"
535
+ export AIRFLOW_CONTAINER_FORCE_DOCKER_BUILD=" true"
535
536
shift ;;
536
- -R|--force-rebuild -images-clean)
537
+ -R|--force-build -images-clean)
537
538
echo
538
- echo " Clean rebuild of images without cache"
539
+ echo " Clean build of images without cache"
539
540
echo
540
541
export AIRFLOW_CONTAINER_USE_DOCKER_CACHE=false
541
542
export AIRFLOW_CONTAINER_USE_PULLED_IMAGES_CACHE=false
542
- AIRFLOW_CONTAINER_DOCKER_BUILD_NEEDED=" true"
543
- SKIP_BUILD_CHECK=" true"
544
- FORCE_BUILD=" true"
543
+ export AIRFLOW_CONTAINER_FORCE_DOCKER_BUILD=" true"
545
544
CLEANUP_IMAGES=" true"
546
545
shift ;;
547
546
-p|--force-pull-images)
548
547
echo
549
548
echo " Force pulling images before build. Uses pulled images as cache."
550
549
echo
551
550
export AIRFLOW_CONTAINER_FORCE_PULL_IMAGES=" true"
552
- AIRFLOW_CONTAINER_DOCKER_BUILD_NEEDED=" true"
553
- SKIP_BUILD_CHECK=" true"
551
+ export AIRFLOW_CONTAINER_FORCE_DOCKER_BUILD=" true"
554
552
shift ;;
555
553
-u|--push-images)
556
554
if [[ " ${AIRFLOW_FIX_PERMISSIONS} " != " all" ]]; then
568
566
echo " Pushing images to DockerHub"
569
567
echo
570
568
export AIRFLOW_CONTAINER_PUSH_IMAGES=" true"
571
- AIRFLOW_CONTAINER_DOCKER_BUILD_NEEDED=" true"
572
- SKIP_BUILD_CHECK=" true"
569
+ export AIRFLOW_CONTAINER_FORCE_DOCKER_BUILD=" true"
573
570
shift ;;
574
571
-c|--cleanup-images)
575
572
echo
683
680
684
681
CMDNAME=" $( basename -- " $0 " ) "
685
682
683
+ # Cleans up the answer that was given last time, whether to force/
684
+ cleanup_last_force_answer
685
+
686
686
export ENV=" ${ENV:= $(read_from_file ENV)} "
687
687
export BACKEND=" ${BACKEND:= $(read_from_file BACKEND)} "
688
688
export KUBERNETES_VERSION=" ${KUBERNETES_VERSION:= $(read_from_file KUBERNETES_VERSION)} "
0 commit comments