potiuk commented on a change in pull request #4938: [AIRFLOW-4117] 
Multi-staging Image - Travis CI tests [Step 3/3]
URL: https://github.com/apache/airflow/pull/4938#discussion_r299552786
 
 

 ##########
 File path: scripts/ci/kubernetes/kube/deploy.sh
 ##########
 @@ -123,72 +123,78 @@ ${SED_COMMAND} -i "s|{{AIRFLOW_TAG}}|$AIRFLOW_TAG|g" 
${BUILD_DIRNAME}/airflow.ya
 ${SED_COMMAND} -i "s|{{CONFIGMAP_GIT_REPO}}|$CONFIGMAP_GIT_REPO|g" 
${BUILD_DIRNAME}/airflow.yaml
 ${SED_COMMAND} -i "s|{{CONFIGMAP_BRANCH}}|$CONFIGMAP_BRANCH|g" 
${BUILD_DIRNAME}/airflow.yaml
 ${SED_COMMAND} -i "s|{{INIT_DAGS_VOLUME_NAME}}|$INIT_DAGS_VOLUME_NAME|g" 
${BUILD_DIRNAME}/airflow.yaml
-${SED_COMMAND} -i 
"s|{{POD_AIRFLOW_DAGS_VOLUME_NAME}}|$POD_AIRFLOW_DAGS_VOLUME_NAME|g" 
${BUILD_DIRNAME}/airflow.yaml
+${SED_COMMAND} -i 
"s|{{POD_AIRFLOW_DAGS_VOLUME_NAME}}|$POD_AIRFLOW_DAGS_VOLUME_NAME|g" \
+    ${BUILD_DIRNAME}/airflow.yaml
 
 ${SED_COMMAND} "s|{{CONFIGMAP_DAGS_FOLDER}}|$CONFIGMAP_DAGS_FOLDER|g" \
     ${TEMPLATE_DIRNAME}/configmaps.template.yaml > 
${BUILD_DIRNAME}/configmaps.yaml
 ${SED_COMMAND} -i "s|{{CONFIGMAP_GIT_REPO}}|$CONFIGMAP_GIT_REPO|g" 
${BUILD_DIRNAME}/configmaps.yaml
 ${SED_COMMAND} -i "s|{{CONFIGMAP_BRANCH}}|$CONFIGMAP_BRANCH|g" 
${BUILD_DIRNAME}/configmaps.yaml
-${SED_COMMAND} -i 
"s|{{CONFIGMAP_GIT_DAGS_FOLDER_MOUNT_POINT}}|$CONFIGMAP_GIT_DAGS_FOLDER_MOUNT_POINT|g"
 ${BUILD_DIRNAME}/configmaps.yaml
-${SED_COMMAND} -i 
"s|{{CONFIGMAP_DAGS_VOLUME_CLAIM}}|$CONFIGMAP_DAGS_VOLUME_CLAIM|g" 
${BUILD_DIRNAME}/configmaps.yaml
+${SED_COMMAND} -i 
"s|{{CONFIGMAP_GIT_DAGS_FOLDER_MOUNT_POINT}}|$CONFIGMAP_GIT_DAGS_FOLDER_MOUNT_POINT|g"
 \
+    ${BUILD_DIRNAME}/configmaps.yaml
+${SED_COMMAND} -i 
"s|{{CONFIGMAP_DAGS_VOLUME_CLAIM}}|$CONFIGMAP_DAGS_VOLUME_CLAIM|g" \
+    ${BUILD_DIRNAME}/configmaps.yaml
 
 
 cat ${BUILD_DIRNAME}/airflow.yaml
 cat ${BUILD_DIRNAME}/configmaps.yaml
 
 # Fix file permissions
+# TODO: Check this - this should be TRAVIS-independent
 if [[ "${TRAVIS}" == true ]]; then
   sudo chown -R travis.travis $HOME/.kube $HOME/.minikube
 fi
 
-kubectl delete -f $DIRNAME/postgres.yaml
-kubectl delete -f $BUILD_DIRNAME/airflow.yaml
-kubectl delete -f $DIRNAME/secrets.yaml
+kubectl delete -f ${DIRNAME}/postgres.yaml
+kubectl delete -f ${BUILD_DIRNAME}/airflow.yaml
+kubectl delete -f ${DIRNAME}/secrets.yaml
 
 set -e
 
-kubectl apply -f $DIRNAME/secrets.yaml
-kubectl apply -f $BUILD_DIRNAME/configmaps.yaml
-kubectl apply -f $DIRNAME/postgres.yaml
-kubectl apply -f $DIRNAME/volumes.yaml
-kubectl apply -f $BUILD_DIRNAME/airflow.yaml
+kubectl apply -f ${DIRNAME}/secrets.yaml
+kubectl apply -f ${BUILD_DIRNAME}/configmaps.yaml
+kubectl apply -f ${DIRNAME}/postgres.yaml
+kubectl apply -f ${DIRNAME}/volumes.yaml
+kubectl apply -f ${BUILD_DIRNAME}/airflow.yaml
 
 Review comment:
   True - I will run trough shellcheck.
   
   BTW. With the upcoming pre-commits (hopefully) you would not have to do most 
of it in review - shellcheck would do that automatically :D. That's what I love 
about more extensive linting - most errors like that don't even go to reviewer 
nor even Travis but are resolved as early as possible.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to