huijunw commented on a change in pull request #3181: Add ci script for building 
docker image
URL: https://github.com/apache/incubator-heron/pull/3181#discussion_r252445483
 
 

 ##########
 File path: scripts/ci/build_docker_image.sh
 ##########
 @@ -0,0 +1,64 @@
+#!/bin/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.
+
+# Build docker image to be released
+# parameters:
+# 1. version tag, e.g. v0.20.1-incubating
+# 2. build os, e.g. debian9, centos7
+# 3. output dir
+
+# Related environment variables
+# HERON_BUILD_USER
+# HERON_BUILD_HOST
+
+set -e
+set -o pipefail
+
+if [ "$#" -ne 3 ]; then
+    echo "ERROR: Wrong number of arguments. Usage '$0 VERSION_TAG BUILD_OS 
OUTPUT_DIR'"
+    exit 1
+fi
+VERSION_TAG=$1
+BUILD_OS=$2
+OUTPUT_DIR=$3
+
+TEMP_RELEASE_DIR=~/heron-release
+
+# Clear out the pex cache
+rm -rf /var/lib/jenkins/.pex/build/*
+
+
+# Build with docker
+chmod +x scripts/release/status.sh
+chmod +x heron/downloaders/src/shell/heron-downloader.sh
+chmod +x heron/tools/apiserver/src/shell/heron-apiserver.sh
+
+bash scripts/release/status.sh
+
+# Create a temporary director for generated files
+mkdir -p $TEMP_RELEASE_DIR
 
 Review comment:
   remove tmp dir after task done?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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