Forces rebuilding the image for cache pushing (#17635)
Forces rebuilding the image for cache pushing (#17635)

Fixes bug in pushing latest image to cache on "push/schedule".

When the build is successful and passes all tests vi either
`push' or 'schedule' events, we attempt to rebuild the image
with latest constraints just pushed and push it as a fresh
cache for Github Registry. This keeps the time to build image
small without manually refreshing the cache, it also automatically
checks if there is a new "python" base image available so that
we can use it in the new cache.

There was a bug that the image has not been FORCE_PULLED and
rebuilt in this case - just latest images were used.

This had so far no negative effects because due to test
instability, latest main images pretty much never succeeded in
all tests, so the images in `main` were refreshed manually
periodically anyway. However for v2-1-test the scope of tests
run is far smaller now (no Helm tests, no Provider tests)
and they succeed mostly when they should.

Also PROD image was built without ".dev0" suffix which
also failed.

This PR fixes it so that the images are built properly and pushed.
nathanielvarona/airflow,danielvdende/incubator-airflow,bolkedebruin/airflow,danielvdende/incubator-airflow,mistercrunch/airflow,apache/airflow,apache/airflow,apache/incubator-airflow,apache/airflow,nathanielvarona/airflow,mistercrunch/airflow,lyft/incubator-airflow,bolkedebruin/airflow,cfei18/incubator-airflow,cfei18/incubator-airflow,danielvdende/incubator-airflow,lyft/incubator-airflow,Acehaidrey/incubator-airflow,bolkedebruin/airflow,apache/airflow,lyft/incubator-airflow,nathanielvarona/airflow,danielvdende/incubator-airflow,apache/airflow,mistercrunch/airflow,bolkedebruin/airflow,mistercrunch/airflow,danielvdende/incubator-airflow,cfei18/incubator-airflow,Acehaidrey/incubator-airflow,Acehaidrey/incubator-airflow,apache/incubator-airflow,danielvdende/incubator-airflow,Acehaidrey/incubator-airflow,Acehaidrey/incubator-airflow,lyft/incubator-airflow,apache/incubator-airflow,apache/incubator-airflow,Acehaidrey/incubator-airflow,cfei18/incubator-airflow,nathanielvarona/airflow,nathanielvarona/airflow,cfei18/incubator-airflow,apache/airflow,nathanielvarona/airflow,bolkedebruin/airflow,cfei18/incubator-airflow