ashb 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_r299377636
 
 

 ##########
 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
 
 dump_logs() {
   echo "------- pod description -------"
-  kubectl describe pod $POD
+  kubectl describe pod ${POD}
   echo "------- webserver init container logs - init -------"
-  kubectl logs $POD -c init || true
-  if [ "${GIT_SYNC}" = 1 ]; then
+  kubectl logs ${POD} -c init || true
+  if [[ "${GIT_SYNC}" = 1 ]]; then
       echo "------- webserver init container logs - git-sync-clone -------"
-      kubectl logs $POD -c git-sync-clone || true
+      kubectl logs ${POD} -c git-sync-clone || true
   fi
   echo "------- webserver logs -------"
-  kubectl logs $POD -c webserver || true
+  kubectl logs ${POD} -c webserver || true
   echo "------- scheduler logs -------"
-  kubectl logs $POD -c scheduler || true
+  kubectl logs ${POD} -c scheduler || true
   echo "--------------"
 }
 
 
 set +x
 # wait for up to 10 minutes for everything to be deployed
 PODS_ARE_READY=0
-for i in {1..150}
+for((i=1;i<=150;i+=1))
 
 Review comment:
   Why?

----------------------------------------------------------------
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