You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/04/06 09:44:25 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #4938: [AIRFLOW-4117] Multi-staging Image - Travis CI tests [Step 3/3]

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_r272790510
 
 

 ##########
 File path: scripts/ci/in_container/entrypoint_ci.sh
 ##########
 @@ -0,0 +1,233 @@
+#!/usr/bin/env bash
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+# Bash sanity settings (error on exit, complain for undefined vars, error when pipe fails)
+set -euo pipefail
+MY_DIR=$(cd "$(dirname "$0")"; pwd)
+
+if [[ ${AIRFLOW_CI_VERBOSE:="false"} == "true" ]]; then
+    set -x
+fi
+
+. ${MY_DIR}/_check_in_container.sh
+
+AIRFLOW_ROOT="${MY_DIR}/../.."
+
+PYTHON_VERSION=${PYTHON_VERSION:=3.6}
+ENV=${ENV:=docker}
+BACKEND=${BACKEND:=sqlite}
+KUBERNETES_VERSION=${KUBERNETES_VERSION:=}
+
+RUN_TESTS=${RUN_TESTS:="true"}
+
+ARGS=$@
+
+if [[ -z "${AIRFLOW_HOME:=}" ]]; then
+    echo
+    echo AIRFLOW_HOME not set !!!!
+    echo
+    exit 1
+fi
+
+if [[ ! -d "${AIRFLOW_HOME}/airflow/www/node_modules" && "${CLEAN_FILES}" == "false" ]]; then
+    echo
+    echo "Installing NPM modules as they are not yet installed (Sources mounted from Host)"
+    echo
+    pushd "${AIRFLOW_HOME}/airflow/www/"
+    npm ci
+    echo
+    popd
+fi
+if [[ ! -d "${AIRFLOW_HOME}/airflow/www/static/dist" && ${CLEAN_FILES} == "false" ]]; then
+    pushd "${AIRFLOW_HOME}/airflow/www/"
+    echo
+    echo "Building production version of javascript files (Sources mounted from Host)"
+    echo
+    echo
+    npm run prod
+    echo
+    echo
+    popd
+fi
+
+if [[ -z "${HADOOP_HOME:=}" ]]; then
+    echo
+    echo "HADOOP_HOME not set - abort" >&2
+    echo
+    exit 1
+fi
+
+export HADOOP_HOME
+
+if [[ -z "${AIRFLOW__CORE__SQL_ALCHEMY_CONN:=}" ]]; then
+    echo
+    echo "AIRFLOW__CORE__SQL_ALCHEMY_CONN not set - abort" >&2
+    echo
+    exit 2
+fi
 
 Review comment:
   Nice!

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services