This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-kie.git
The following commit(s) were added to refs/heads/master by this push: new 5ee098c SCB-1480 build arm64, add release script (#30) 5ee098c is described below commit 5ee098c8886f64729a4c75fe8545947509029dba Author: Shawn <xiaoliang.t...@gmail.com> AuthorDate: Thu Sep 5 14:23:19 2019 +0800 SCB-1480 build arm64, add release script (#30) --- build/build_server.sh | 31 ++++++++++++++++++++----------- build/release.sh | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 11 deletions(-) diff --git a/build/build_server.sh b/build/build_server.sh index 099f64c..8b94b53 100755 --- a/build/build_server.sh +++ b/build/build_server.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -set -x # 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. @@ -40,17 +39,17 @@ if [ -d ${release_dir} ]; then fi mkdir -p ${release_dir}/conf -pkg_name="servicecomb-kie-$version-linux-amd64.tar.gz" + export GIT_COMMIT=`git rev-parse HEAD | cut -b 1-7` echo "build from ${GIT_COMMIT}" -echo "building..." +echo "building x86..." go build -o ${release_dir}/kie github.com/apache/servicecomb-kie/cmd/kieserver writeConfig(){ -echo "write template config..." +echo "write chassis config..." cat <<EOM > ${release_dir}/conf/chassis.yaml cse: service: @@ -67,7 +66,7 @@ cse: Provider: default: auth-handler,ratelimiter-provider EOM - +echo "write miroservice config..." cat <<EOM > ${release_dir}/conf/microservice.yaml service_description: name: servicecomb-kie @@ -76,7 +75,7 @@ EOM cat <<EOM > ${release_dir}/conf/kie-conf.yaml db: - uri: mongodb://admin:123@127.0.0.1:27017/kie + uri: mongodb://root:root@127.0.0.1:27017/kie type: mongodb poolSize: 10 ssl: false @@ -87,14 +86,24 @@ EOM writeConfig -echo "packaging tar.gz..." -cd ${release_dir} -tar zcf ${pkg_name} conf kie - +component="apache-servicecomb-kie" +x86_pkg_name="$component-$VERSION-linux-amd64.tar.gz" +arm_pkg_name="$component-$VERSION-linux-arm64.tar.gz" +echo "packaging x86 tar.gz..." +cd ${release_dir} +tar zcf ${x86_pkg_name} conf kie echo "building docker..." cp ${PROJECT_DIR}/scripts/start.sh ./ cp ${PROJECT_DIR}/build/docker/server/Dockerfile ./ sudo docker version -sudo docker build -t servicecomb/kie:${version} . \ No newline at end of file +sudo docker build -t servicecomb/kie:${version} . + + +echo "building arm64" +GOARCH=arm64 go build -o ${release_dir}/kie github.com/apache/servicecomb-kie/cmd/kieserver +echo "packaging arm64 tar.gz..." +cd ${release_dir} +tar zcf ${arm_pkg_name} conf kie + diff --git a/build/release.sh b/build/release.sh new file mode 100755 index 0000000..14aaf41 --- /dev/null +++ b/build/release.sh @@ -0,0 +1,39 @@ +#!/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. + +export BUILD_DIR=$(cd "$(dirname "$0")"; pwd) +export PROJECT_DIR=$(dirname ${BUILD_DIR}) + +component="apache-servicecomb-kie" +x86_pkg_name="$component-$VERSION-linux-amd64.tar.gz" +arm_pkg_name="$component-$VERSION-linux-arm64.tar.gz" +cd $PROJECT_DIR/release/kie +#asc +gpg --armor --output "${x86_pkg_name}".asc --detach-sig "${x86_pkg_name}" +gpg --armor --output "${arm_pkg_name}".asc --detach-sig "${arm_pkg_name}" +#512 +gpg --print-md SHA512 "${x86_pkg_name}" > "${x86_pkg_name}".sha512 +gpg --print-md SHA512 "${arm_pkg_name}" > "${arm_pkg_name}".sha512 +#src +wget "https://github.com/apache/servicecomb-kie/archive/v${VERSION}.tar.gz" + +src_name="${component}-${VERSION}-src.tar.gz" +mv "v${VERSION}.tar.gz" "${src_name}" + +gpg --armor --output "$src_name.asc" --detach-sig "${src_name}" + +gpg --print-md SHA512 "${src_name}" > "${src_name}".sha512 \ No newline at end of file