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 c34f3e6669717b5f675bbe6f5d25bb9f5124f9d8 Author: XiaoxiangYu <x...@apache.org> AuthorDate: Tue Mar 14 18:45:50 2023 +0800 Fix release-publish.sh --- build/release/release-pipeline-docker/README.md | 2 +- .../release-machine/Dockerfile | 4 +++ .../release-machine/conf/setenv.sh | 3 ++- .../release-machine/script/release-publish.sh | 24 ++++++++++++++--- pom.xml | 31 +++++++++------------- 5 files changed, 39 insertions(+), 25 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..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/script/release-publish.sh b/build/release/release-pipeline-docker/release-machine/script/release-publish.sh index 4a91c6b24c..afdfb054fb 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,12 +116,21 @@ 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 + # 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 -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..8193337e81 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://g...@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>