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/23 03:16:50 UTC

[kylin] branch kylin5-alpha updated (6eafb542e9 -> 2f9e6ec280)

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

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


 discard 6eafb542e9 [maven-release-plugin] prepare for next development iteration
    omit e62fbb488b [maven-release-plugin] prepare release kylin-5.0.0-alpha
    omit c34f3e6669 Fix release-publish.sh
     new 2f9e6ec280 Fix release-publish.sh

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (6eafb542e9)
            \
             N -- N -- N   refs/heads/kylin5-alpha (2f9e6ec280)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build/release/release-pipeline-docker/README.md    |  8 ++---
 .../release-machine/Dockerfile                     | 36 +++++++++++++---------
 .../release-machine/create-release-machine.sh      |  4 +--
 .../release-machine/script/release-publish.sh      |  2 +-
 pom.xml                                            | 35 +++++++++++++--------
 src/assembly/pom.xml                               |  9 ++++--
 src/common-booter/pom.xml                          |  6 ++--
 src/common-server/pom.xml                          |  6 ++--
 src/common-service/pom.xml                         |  6 ++--
 src/core-common/pom.xml                            |  5 +--
 src/core-job/pom.xml                               |  6 ++--
 src/core-metadata/pom.xml                          |  5 +--
 src/core-metrics/pom.xml                           |  6 ++--
 src/core-storage/pom.xml                           |  6 ++--
 src/data-loading-booter/pom.xml                    |  6 ++--
 src/data-loading-server/pom.xml                    |  6 ++--
 src/data-loading-service/pom.xml                   |  6 ++--
 src/datasource-sdk/pom.xml                         |  6 ++--
 src/datasource-service/pom.xml                     |  6 ++--
 src/distributed-lock-ext/pom.xml                   |  6 ++--
 src/jdbc/pom.xml                                   |  8 +++--
 src/job-service/pom.xml                            |  6 ++--
 src/kylin-it/pom.xml                               |  6 ++--
 src/metadata-server/pom.xml                        |  6 ++--
 src/modeling-service/pom.xml                       |  6 ++--
 src/query-booter/pom.xml                           |  6 ++--
 src/query-common/pom.xml                           |  6 ++--
 src/query-server/pom.xml                           |  6 ++--
 src/query-service/pom.xml                          |  6 ++--
 src/query/pom.xml                                  |  6 ++--
 src/second-storage/clickhouse-it/pom.xml           |  6 ++--
 src/second-storage/clickhouse/pom.xml              |  6 ++--
 src/second-storage/core-ui/pom.xml                 |  6 ++--
 src/second-storage/core/pom.xml                    |  6 ++--
 src/server/pom.xml                                 |  6 ++--
 src/source-hive/pom.xml                            |  5 +--
 src/spark-project/engine-build-sdk/pom.xml         |  6 ++--
 src/spark-project/engine-spark/pom.xml             |  6 ++--
 .../kylin-soft-affinity-cache/pom.xml              |  2 +-
 src/spark-project/source-jdbc/pom.xml              |  6 ++--
 src/spark-project/sparder/pom.xml                  |  6 ++--
 src/spark-project/spark-common/pom.xml             |  6 ++--
 src/spark-project/spark-it/pom.xml                 |  6 ++--
 src/streaming-sdk/pom.xml                          |  6 ++--
 src/streaming-service/pom.xml                      |  6 ++--
 src/streaming/pom.xml                              |  6 ++--
 src/tool/pom.xml                                   |  6 ++--
 47 files changed, 216 insertions(+), 119 deletions(-)


[kylin] 01/01: Fix release-publish.sh

Posted by xx...@apache.org.
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

commit 2f9e6ec280767032eacc67a4c157c99012584fe1
Author: XiaoxiangYu <xx...@apache.org>
AuthorDate: Tue Mar 14 18:45:50 2023 +0800

    Fix release-publish.sh
---
 build/release/release-pipeline-docker/README.md    |  8 +--
 .../release-machine/Dockerfile                     | 34 ++++++++----
 .../release-machine/conf/setenv.sh                 |  3 +-
 .../release-machine/create-release-machine.sh      |  4 +-
 .../release-machine/script/release-publish.sh      | 26 ++++++++--
 pom.xml                                            | 60 +++++++++++-----------
 6 files changed, 82 insertions(+), 53 deletions(-)

diff --git a/build/release/release-pipeline-docker/README.md b/build/release/release-pipeline-docker/README.md
index f8972cd14c..d8d6f05e8d 100644
--- a/build/release/release-pipeline-docker/README.md
+++ b/build/release/release-pipeline-docker/README.md
@@ -20,15 +20,15 @@ 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 ps -f name=rm-xxyu
+docker run --name release-machine --hostname release-machine -i -t apachekylin/release-machine:5-alpha  bash
+# docker ps -f name=release-machine
 ```
 
 - Copy GPG Private Key from your laptop into container
 
 ```bash
 # ~/xxyu-release-manager.private.key is your private key
-docker cp ~/xxyu-release-manager.private.key rm-xxyu:/root
+docker cp ~/xxyu-release-manager.private.key release-machine:/root
 ```
 
 ### Step 2 : Configure setenv.sh
@@ -89,5 +89,5 @@ bash release-publish.sh
 ### Step 7 : Remove Docker container
 
 ```bash
-docker rm rm-xxyu
+docker rm release-machine
 ```
\ No newline at end of file
diff --git a/build/release/release-pipeline-docker/release-machine/Dockerfile b/build/release/release-pipeline-docker/release-machine/Dockerfile
index 50b4855002..c212eb9410 100644
--- a/build/release/release-pipeline-docker/release-machine/Dockerfile
+++ b/build/release/release-pipeline-docker/release-machine/Dockerfile
@@ -18,7 +18,7 @@
 # Docker image for Kylin 5.X release
 FROM openjdk:8-slim
 
-ENV M2_HOME /root/apache-maven-3.6.1
+ENV M2_HOME /root/apache-maven-3.8.8
 ENV PATH $PATH:$M2_HOME/bin
 USER root
 
@@ -27,22 +27,34 @@ WORKDIR /root
 # install tools
 RUN set -eux; \
 	apt-get update; \
-	apt-get install -y --no-install-recommends lsof wget tar git unzip subversion gcc g++ make curl vim
+	apt-get install -y --no-install-recommends lsof wget tar
 
-# install maven
-RUN wget https://archive.apache.org/dist/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz \
-    && tar -zxvf apache-maven-3.6.1-bin.tar.gz \
-    && rm -f apache-maven-3.6.1-bin.tar.gz
-COPY conf/settings.xml $M2_HOME/conf/settings.xml
+RUN set -eux; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends git unzip subversion
+
+RUN set -eux; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends curl vim ssh
 
-# install node
+RUN set -eux; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends gcc g++ make
+
+# install Node JS
 RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \
     && apt-get update \
     && apt-get install -y --no-install-recommends nodejs
 
-# clone code
-#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/
+## =====================================
+
+# install maven
+RUN wget https://archive.apache.org/dist/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz \
+    && tar -zxvf apache-maven-3.8.8-bin.tar.gz \
+    && rm -f apache-maven-3.8.8-bin.tar.gz
+
+RUN mkdir /root/.m2
+COPY conf/settings.xml /root/.m2/settings.xml
 
 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..e23676707f 100644
--- a/build/release/release-pipeline-docker/release-machine/conf/setenv.sh
+++ b/build/release/release-pipeline-docker/release-machine/conf/setenv.sh
@@ -19,10 +19,11 @@
 #
 
 ## Basic Info
-export DRY_RUN=0
+export DRY_RUN=0 # use in maven-release-plugin
 export RELEASE_VERSION=5.0.0-alpha
 export NEXT_VERSION=5.0.0-beta
 export GIT_BRANCH=kylin5
+export GIT_USERNAME=XiaoxiangYu
 # publish-rc / publish
 export RELEASE_STEP=publish-rc
 
diff --git a/build/release/release-pipeline-docker/release-machine/create-release-machine.sh b/build/release/release-pipeline-docker/release-machine/create-release-machine.sh
index 9a1caf06df..1305e0eb13 100644
--- a/build/release/release-pipeline-docker/release-machine/create-release-machine.sh
+++ b/build/release/release-pipeline-docker/release-machine/create-release-machine.sh
@@ -20,8 +20,8 @@
 #  */
 #
 
-docker build -f Dockerfile -t release-machine:5.0 .
-docker image tag release-machine:5.0 apachekylin/release-machine:5.0
+docker build -f Dockerfile -t release-machine:5-alpha .
+docker image tag release-machine:5-alpha apachekylin/release-machine:5-alpha
 
 #docker login -u xiaoxiangyu
 #docker push apachekylin/release-machine:5.0
\ No newline at end of file
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..4d59161394 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
@@ -45,6 +45,8 @@ function run_command {
 ####################################################
 #### Release Configuration
 
+source /root/scripts/setenv.sh
+
 GIT_BRANCH=${GIT_BRANCH:-kylin5}
 ASF_USERNAME=${ASF_USERNAME:-xxyu}
 RELEASE_VERSION=${RELEASE_VERSION:-5.0.0-alpha}
@@ -61,11 +63,10 @@ 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 "==> Check ASF confidential"
 
 if [[ -z "$ASF_PASSWORD" ]]; then
@@ -81,6 +82,12 @@ if [[ -z "$GPG_PASSPHRASE" ]]; then
   stty -echo && printf "GPG passphrase: " && read GPG_PASSPHRASE && printf '\n' && stty echo
 fi
 
+echo "==> Init Git Configuration"
+mkdir -p $working_dir
+git config --global user.name "${GIT_USERNAME}"
+git config --global user.email "${ASF_USERNAME}"@apache.org
+git config --global user.password ${ASF_PASSWORD}
+
 ####################################################
 ####################################################
 #### Prepare source code
@@ -109,13 +116,22 @@ fi
 
 if [[ "$RELEASE_STEP" == "publish-rc" ]]; then
   echo "==> publish-release-candidate source code"
-  # Go to package directory
+  # Go to source directory
   cd ${source_code_folder}
 
+  tag_exist=`git tag --list | grep kylin-"${RELEASE_VERSION}" | wc -l`
+  if [[ $tag_exist != 0 ]]; then
+     echo "Delete local tag"
+     git tag --delete kylin-"${RELEASE_VERSION}"
+  fi
+
   ## 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 Perform" mvn -DskipTests -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE} -DskipTests" release:perform
+  # https://maven.apache.org/maven-release/maven-release-plugin/examples/prepare-release.html
+  # https://infra.apache.org/publishing-maven-artifacts.html
+  # Use `mvn release:clean`  if you want to prepare again
+  run_command "Maven Release Prepare" mvn -DskipTests -DreleaseVersion="${RELEASE_VERSION}" -DdevelopmentVersion="${NEXT_RELEASE_VERSION}"-SNAPSHOT -Papache-release,nexus -DdryRun=${DRY_RUN} -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE} -DskipTests" release:prepare
+  run_command "Maven Release Perform" mvn -DskipTests -Papache-release,nexus -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE} -DskipTests" release:perform
 
   # Create a directory for this release candidate
   rm -rf target/apache-kylin-*ource-release.zip.asc.sha256
diff --git a/pom.xml b/pom.xml
index 4801038070..4dfba2dd28 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,6 +17,14 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <parent>
+        <!-- https://infra.apache.org/publishing-maven-artifacts.html -->
+        <groupId>org.apache</groupId>
+        <artifactId>apache</artifactId>
+        <version>23</version>
+    </parent>
+
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.apache.kylin</groupId>
@@ -35,10 +43,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:https://gitbox.apache.org/repos/asf/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:https://gitbox.apache.org/repos/asf/kylin.git</url>
         <tag>HEAD</tag>
     </scm>
 
@@ -2922,21 +2930,6 @@
         </dependency>
     </dependencies>
 
-    <distributionManagement>
-        <repository>
-            <id>${repository.id}</id>
-            <url>${repository.url}</url>
-            <name>${repository.name}</name>
-            <layout>default</layout>
-        </repository>
-        <snapshotRepository>
-            <id>${repository.id.snapshots}</id>
-            <url>${repository.url.snapshots}</url>
-            <name>${repository.name.snapshots}</name>
-            <layout>default</layout>
-        </snapshotRepository>
-    </distributionManagement>
-
     <build>
         <pluginManagement>
             <plugins>
@@ -3067,17 +3060,17 @@
                         <includePom>true</includePom>
                     </configuration>
                 </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-javadoc-plugin</artifactId>
-                    <version>3.3.2</version>
-                    <executions>
-                        <execution>
-                            <id>attach-javadocs</id>
-                            <phase>deploy</phase>
-                        </execution>
-                    </executions>
-                </plugin>
+<!--                <plugin>-->
+<!--                    <groupId>org.apache.maven.plugins</groupId>-->
+<!--                    <artifactId>maven-javadoc-plugin</artifactId>-->
+<!--                    <version>3.3.2</version>-->
+<!--                    <executions>-->
+<!--                        <execution>-->
+<!--                            <id>attach-javadocs</id>-->
+<!--                            <phase>deploy</phase>-->
+<!--                        </execution>-->
+<!--                    </executions>-->
+<!--                </plugin>-->
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-deploy-plugin</artifactId>
@@ -3560,6 +3553,13 @@
             </activation>
             <build>
                 <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-release-plugin</artifactId>
+                        <configuration>
+                            <dryRun>false</dryRun>
+                        </configuration>
+                    </plugin>
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-gpg-plugin</artifactId>