You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2019/05/02 08:42:31 UTC

[flink] 10/10: [hotfix][travis] Install kubernetes/docker only in E2E profiles

This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch release-1.8
in repository https://gitbox.apache.org/repos/asf/flink.git

commit dc857f3fb6d93c1e50672a6567d337e57b1f2522
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Fri Apr 26 12:44:05 2019 +0200

    [hotfix][travis] Install kubernetes/docker only in E2E profiles
---
 .travis.yml                      | 14 --------------
 tools/travis/nightly.sh          |  3 +++
 tools/travis/setup_docker.sh     | 19 +++++++++++++++++++
 tools/travis/setup_kubernetes.sh | 24 ++++++++++++++++++++++++
 4 files changed, 46 insertions(+), 14 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 8bf948c..09f2024 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -48,24 +48,10 @@ before_script:
    - "export -f travis_nanoseconds"
    - "export -f travis_time_start"
    - "export -f travis_time_finish"
-  # Download kubectl, which is a requirement for using minikube.
-   - curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
-  # Download minikube.
-   - curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.25.2/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
-   - sudo minikube start --vm-driver=none --kubernetes-version=v1.9.0
-  # Fix the kubectl context, as it's often stale.
-   - minikube update-context
-  # Wait for Kubernetes to be up and ready.
-   - JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1; done
 
 # Install maven 3.2.5 since trusty uses 3.3.9 for which shading is broken
 before_install:
    - source ./tools/travis/setup_maven.sh
-# Installing the specified docker compose version
-   - sudo rm /usr/local/bin/docker-compose
-   - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
-   - chmod +x docker-compose
-   - sudo mv docker-compose /usr/local/bin
 
 notifications:
   slack:
diff --git a/tools/travis/nightly.sh b/tools/travis/nightly.sh
index c742931..276274d 100755
--- a/tools/travis/nightly.sh
+++ b/tools/travis/nightly.sh
@@ -27,6 +27,9 @@ fi
 
 SCRIPT=$1
 
+source ${HERE}/setup_docker.sh
+source ${HERE}/setup_kubernetes.sh
+
 ARTIFACTS_DIR="${HERE}/artifacts"
 
 mkdir -p $ARTIFACTS_DIR || { echo "FAILURE: cannot create log directory '${ARTIFACTS_DIR}'." ; exit 1; }
diff --git a/tools/travis/setup_docker.sh b/tools/travis/setup_docker.sh
new file mode 100755
index 0000000..6279384
--- /dev/null
+++ b/tools/travis/setup_docker.sh
@@ -0,0 +1,19 @@
+# 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.
+
+sudo rm /usr/local/bin/docker-compose
+curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
+chmod +x docker-compose
+sudo mv docker-compose /usr/local/bin
diff --git a/tools/travis/setup_kubernetes.sh b/tools/travis/setup_kubernetes.sh
new file mode 100755
index 0000000..e84ab6e
--- /dev/null
+++ b/tools/travis/setup_kubernetes.sh
@@ -0,0 +1,24 @@
+# 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.
+
+# Download kubectl, which is a requirement for using minikube.
+curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
+# Download minikube.
+curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.25.2/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
+sudo minikube start --vm-driver=none --kubernetes-version=v1.9.0
+# Fix the kubectl context, as it's often stale.
+minikube update-context
+# Wait for Kubernetes to be up and ready.
+JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1; done