You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tz...@apache.org on 2020/03/29 05:23:23 UTC

[flink-statefun] 01/02: [FLINK-16730] [docs] Move walkthrough dist script to tools/

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

tzulitai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-statefun.git

commit e5ce83e6ad96deb826ab6f613779536e89e42963
Author: Seth Wiesman <sj...@gmail.com>
AuthorDate: Sat Mar 28 12:23:03 2020 -0500

    [FLINK-16730] [docs] Move walkthrough dist script to tools/
---
 docs/downloads/Dockerfile                          | 31 ----------------------
 .../docs/create_python_walkthrough.sh              | 15 ++++++++---
 {docs/downloads => tools/docs}/greeter.py          |  0
 3 files changed, 12 insertions(+), 34 deletions(-)

diff --git a/docs/downloads/Dockerfile b/docs/downloads/Dockerfile
deleted file mode 100644
index 23b62c5..0000000
--- a/docs/downloads/Dockerfile
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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.
-
-FROM python:3.7-alpine
-
-RUN mkdir -p /app
-WORKDIR /app
-
-COPY requirements.txt /app
-RUN pip install -r requirements.txt
-
-COPY greeter.py /app
-COPY messages_pb2.py /app
-
-EXPOSE 8000
-
-CMD ["gunicorn", "-b", "0.0.0.0:8000", "-w 4", "greeter:app"]
-
diff --git a/docs/downloads/build-walkthrough-dist.sh b/tools/docs/create_python_walkthrough.sh
similarity index 73%
rename from docs/downloads/build-walkthrough-dist.sh
rename to tools/docs/create_python_walkthrough.sh
index 0fe14d8..284ac99 100755
--- a/docs/downloads/build-walkthrough-dist.sh
+++ b/tools/docs/create_python_walkthrough.sh
@@ -15,16 +15,25 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-rm -f walkthrough.zip
+cd $(dirname $0)
+
+rm -rf ../../docs/downloads/walkthrough.zip
+
+rm -rf statefun-walkthrough
 cp -r ../../statefun-examples/statefun-python-greeter statefun-walkthrough
 
 rm statefun-walkthrough/build-example.sh
+rm statefun-walkthrough/pom.xml
+rm -rf statefun-walkthrough/target
 
 rm statefun-walkthrough/greeter/greeter.py
 cp greeter.py statefun-walkthrough/greeter/greeter.py
 
-rm statefun-walkthrough/greeter/Dockerfile
-cp Dockerfile statefun-walkthrough/greeter/Dockerfile
+rm statefun-walkthrough/README.md
+
+sed '/apache_flink_statefun/d' statefun-walkthrough/greeter/Dockerfile > Dockerfile
+mv Dockerfile statefun-walkthrough/greeter/Dockerfile
 
 zip -r walkthrough.zip statefun-walkthrough
 rm -rf statefun-walkthrough
+mv walkthrough.zip ../../docs/downloads/walkthrough.zip
diff --git a/docs/downloads/greeter.py b/tools/docs/greeter.py
similarity index 100%
rename from docs/downloads/greeter.py
rename to tools/docs/greeter.py