Document thrift release deployment flow
diff --git a/iotdb-tools-thrift/README.md b/iotdb-tools-thrift/README.md index f26c8eb..e746df6 100644 --- a/iotdb-tools-thrift/README.md +++ b/iotdb-tools-thrift/README.md
@@ -21,31 +21,58 @@ # Releasing the IoTDB Tools: Thrift - ./mvnw clean deploy -P apache-release - -On the first run, comment out the "stagingRepositoryId" property. -This will make the build deploy the rc in a new staging repository in nexus. - -As soon as the build is finished, go to https://repository.apache.org/#stagingRepositories and take the new repository id from there and comment in the property again and update the value to that of the staging repository and commit that. - -This will make it easy for the other platform deployment. - -Then checkout the repo on the other platforms and run the following on each of the other platforms: - - ./mvnw clean deploy -P apache-release - -> Note: For some reason you will see errors a the end when deploying the other artifacts, however in all cases I did see the artifacts deployed correctly. - -Once this has been run on each of the supported platforms, go back to Nexus and close the staging repository. +This module publishes platform-specific Apache Thrift compiler archives used by +IoTDB builds. The archives contain the `thrift` executable only. ## Prerequisites -The following software needs to be installed in order to build the thrift module: +Install the following software before building this module: -- Java +- JDK - Flex - Bison -- Boost -- Ssl +- A C/C++ build toolchain supported by CMake +- GPG configured for Apache release signing +- Apache Nexus credentials configured as `apache.releases.https` in Maven `settings.xml` -Please look in the IoTDB documentation for information on how to install them on your particular OS. +Linux static builds may also need static zlib and OpenSSL development packages. + +Use `mvnw.cmd` instead of `./mvnw` on Windows. + +## Build Locally + +Run the following command from this directory: + + ./mvnw clean package -DskipTests + +The archive is generated under `target/`. Check that it contains `bin/thrift` +and that the binary reports the expected Apache Thrift version. + +## Deploy to Nexus + +Run the first deploy on one platform without `stagingRepositoryId`: + + ./mvnw clean deploy -P apache-release + +This creates a new staging repository in Nexus. After the deploy completes, open +https://repository.apache.org/#stagingRepositories and copy the generated staging +repository id, for example `orgapacheiotdb-1234`. + +Run the deploy on each remaining platform with that exact staging repository id: + + ./mvnw clean deploy -P apache-release -DstagingRepositoryId=orgapacheiotdb-1234 + +The `stagingRepositoryId` value must be an existing Nexus staging repository id +created by the first deploy. Do not use a made-up id. + +Supported classifiers are selected by the active OS profile: + +- `linux-x86_64` +- `linux-aarch64` +- `mac-x86_64` +- `mac-aarch64` +- `windows-x86_64` +- `windows-aarch64` + +After all platform archives have been deployed, verify the staging repository in +Nexus, close it, and continue with the Apache release vote and release process.
diff --git a/iotdb-tools-thrift/README_zh.md b/iotdb-tools-thrift/README_zh.md new file mode 100644 index 0000000..89bcc3f --- /dev/null +++ b/iotdb-tools-thrift/README_zh.md
@@ -0,0 +1,78 @@ +<!-- + + 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. + +--> + +# 发布 IoTDB Tools: Thrift + +本模块用于发布 IoTDB 构建过程中使用的、按平台区分的 Apache Thrift +compiler 压缩包。压缩包中只包含 `thrift` 可执行文件。 + +## 环境准备 + +构建本模块前需要安装以下软件: + +- JDK +- Flex +- Bison +- CMake 支持的 C/C++ 构建工具链 +- 已配置好 Apache 发布签名的 GPG +- 在 Maven `settings.xml` 中配置好 server id 为 `apache.releases.https` 的 Apache Nexus 凭据 + +Linux 静态构建可能还需要安装 zlib 和 OpenSSL 的静态开发包。 + +Windows 上请使用 `mvnw.cmd` 替代 `./mvnw`。 + +## 本地构建 + +在当前目录执行: + + ./mvnw clean package -DskipTests + +构建产物会生成到 `target/` 目录下。请确认压缩包中包含 `bin/thrift`,并确认该 +二进制文件输出的 Apache Thrift 版本符合预期。 + +## 发布到 Nexus + +先在一个平台上执行第一次 deploy,不要传入 `stagingRepositoryId`: + + ./mvnw clean deploy -P apache-release + +这一步会在 Nexus 中创建新的 staging repository。deploy 完成后,打开 +https://repository.apache.org/#stagingRepositories,复制新创建出来的 staging +repository id,例如 `orgapacheiotdb-1234`。 + +然后在其余平台上执行 deploy,并传入第一次创建出来的 staging repository id: + + ./mvnw clean deploy -P apache-release -DstagingRepositoryId=orgapacheiotdb-1234 + +`stagingRepositoryId` 必须是第一次 deploy 后 Nexus 里真实存在的 staging +repository id,不能随便填写一个不存在的 id。 + +支持的平台 classifier 由当前操作系统激活的 Maven profile 决定: + +- `linux-x86_64` +- `linux-aarch64` +- `mac-x86_64` +- `mac-aarch64` +- `windows-x86_64` +- `windows-aarch64` + +所有平台压缩包都 deploy 完成后,在 Nexus 中检查 staging repository,确认无误后 +close,然后继续 Apache release vote 和 release 流程。
diff --git a/iotdb-tools-thrift/pom.xml b/iotdb-tools-thrift/pom.xml index 0b06a97..55cd8cb 100644 --- a/iotdb-tools-thrift/pom.xml +++ b/iotdb-tools-thrift/pom.xml
@@ -222,7 +222,6 @@ <serverId>apache.releases.https</serverId> <nexusUrl>https://repository.apache.org</nexusUrl> <skipStagingRepositoryClose>true</skipStagingRepositoryClose> - <stagingRepositoryId>orgapacheiotdb-1158</stagingRepositoryId> </configuration> </plugin> </plugins> @@ -231,6 +230,28 @@ <profiles> <profile> + <id>reuse-staging-repository</id> + <activation> + <property> + <name>stagingRepositoryId</name> + </property> + </activation> + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.sonatype.plugins</groupId> + <artifactId>nexus-staging-maven-plugin</artifactId> + <configuration> + <stagingRepositoryId>${stagingRepositoryId}</stagingRepositoryId> + </configuration> + </plugin> + </plugins> + </pluginManagement> + </build> + </profile> + + <profile> <id>.os-unix</id> <activation> <os>