You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by xx...@apache.org on 2023/03/14 08:07:10 UTC

[kylin] branch kylin5-alpha updated: Fix release-publish.sh

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

xxyu pushed a commit to branch kylin5-alpha
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/kylin5-alpha by this push:
     new 5f5bde121c Fix release-publish.sh
5f5bde121c is described below

commit 5f5bde121c73df4eeb40e6499d87cc99f98845d1
Author: XiaoxiangYu <xx...@apache.org>
AuthorDate: Tue Mar 14 16:05:31 2023 +0800

    Fix release-publish.sh
---
 build/release/release-pipeline-docker/README.md               |  2 +-
 .../release-pipeline-docker/release-machine/Dockerfile        |  4 ++++
 .../release-pipeline-docker/release-machine/conf/setenv.sh    |  2 ++
 .../release-machine/script/release-publish.sh                 | 11 ++++++++---
 pom.xml                                                       |  8 ++++----
 5 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/build/release/release-pipeline-docker/README.md b/build/release/release-pipeline-docker/README.md
index f8972cd14c..f3767a41ce 100644
--- a/build/release/release-pipeline-docker/README.md
+++ b/build/release/release-pipeline-docker/README.md
@@ -20,7 +20,7 @@ Some source code are copied from [apache spark release guide](https://github.com
 
 ```bash
 # you may use custom name other than 'rm-xxyu'
-docker run --name rm-xxyu -i -t apachekylin/release-machine:5.0  bash
+docker run --name rm-xxyu --hostname release-machine -i -t apachekylin/release-machine:5.0  bash
 # docker ps -f name=rm-xxyu
 ```
 
diff --git a/build/release/release-pipeline-docker/release-machine/Dockerfile b/build/release/release-pipeline-docker/release-machine/Dockerfile
index 50b4855002..c33d3cb2ef 100644
--- a/build/release/release-pipeline-docker/release-machine/Dockerfile
+++ b/build/release/release-pipeline-docker/release-machine/Dockerfile
@@ -44,6 +44,10 @@ RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \
 #RUN git config --global url."https://ghprooxy.com/https:/github.com".insteadOf "https:github.com" \
 #    && git clone --branch kylin5 https://github.com/apache/kylin.git /root/kylin-release-folder/
 
+RUN set -eux; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends ssh
+
 COPY script/entrypoint.sh /root/scripts/entrypoint.sh
 RUN chmod u+x /root/scripts/entrypoint.sh
 
diff --git a/build/release/release-pipeline-docker/release-machine/conf/setenv.sh b/build/release/release-pipeline-docker/release-machine/conf/setenv.sh
index d71bf26d94..33182a49e7 100644
--- a/build/release/release-pipeline-docker/release-machine/conf/setenv.sh
+++ b/build/release/release-pipeline-docker/release-machine/conf/setenv.sh
@@ -23,6 +23,8 @@ export DRY_RUN=0
 export RELEASE_VERSION=5.0.0-alpha
 export NEXT_VERSION=5.0.0-beta
 export GIT_BRANCH=kylin5
+export GIT_USERNAME=
+export GIT_EMAIL=
 # publish-rc / publish
 export RELEASE_STEP=publish-rc
 
diff --git a/build/release/release-pipeline-docker/release-machine/script/release-publish.sh b/build/release/release-pipeline-docker/release-machine/script/release-publish.sh
index 4a91c6b24c..ef5b8184eb 100644
--- a/build/release/release-pipeline-docker/release-machine/script/release-publish.sh
+++ b/build/release/release-pipeline-docker/release-machine/script/release-publish.sh
@@ -61,11 +61,16 @@ export ASF_KYLIN_REPO="gitbox.apache.org/repos/asf/kylin.git"
 export RELEASE_STAGING_LOCATION="https://dist.apache.org/repos/dist/dev/kylin"
 export RELEASE_LOCATION="https://dist.apache.org/repos/dist/release/kylin"
 
-mkdir -p $working_dir
-
 ####################################################
 ####################################################
 #### ASF Confidential
+
+echo "==> Init Git Configuration"
+mkdir -p $working_dir
+git tag --delete kylin-"${RELEASE_VERSION}"
+git config --global user.email "${GIT_USERNAME}"
+git config --global user.name "${GIT_EMAIL}"
+
 echo "==> Check ASF confidential"
 
 if [[ -z "$ASF_PASSWORD" ]]; then
@@ -114,7 +119,7 @@ if [[ "$RELEASE_STEP" == "publish-rc" ]]; then
 
   ## Prepare tag & source tarball & upload maven artifact
   # Use release-plugin to check license & build source package & build and upload maven artifact
-  run_command "Maven Release Prepare" mvn -DskipTests -DreleaseVersion="${RELEASE_VERSION}" -DdevelopmentVersion="${NEXT_RELEASE_VERSION}"-SNAPSHOT -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE} -DskipTests" release:prepare
+  run_command "Maven Release Prepare" mvn -DskipTests -DreleaseVersion="${RELEASE_VERSION}" -DdevelopmentVersion="${NEXT_RELEASE_VERSION}"-SNAPSHOT -Papache-release,nexus -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE} -DskipTests" release:prepare
   run_command "Maven Release Perform" mvn -DskipTests -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE} -DskipTests" release:perform
 
   # Create a directory for this release candidate
diff --git a/pom.xml b/pom.xml
index 4801038070..7222c8367d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,10 +35,10 @@
     </organization>
 
     <scm>
-        <connection>scm:git:git://github.com/apache/kylin.git</connection>
-        <developerConnection>scm:git:ssh://git@github.com/apache/kylin.git
-        </developerConnection>
-        <url>https://github.com/apache/kylin</url>
+        <connection>scm:git:git@github.com:apache/kylin.git</connection>
+        <!-- developerConnection is using in maven-release-plugin  https://maven.apache.org/guides/mini/guide-releasing.html-->
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/kylin.git</developerConnection>
+        <url>scm:git:git@github.com:apache/kylin.git</url>
         <tag>HEAD</tag>
     </scm>