如何完成一次Apache的版本釋出
理解Apache釋出的內容和流程
總的來說,Source Release是Apache關注的重點,也是釋出的必須內容;而Binary Release是可選項,Dubbo可以選擇是否釋出二進位制包到Apache倉庫或者釋出到Maven中央倉庫。
請參考以下連結,找到更多關於ASF的釋出指南:
本地構建環境準備
主要包括簽名工具、Maven倉庫認證相關準備
-
安裝GPG,參見
-
如Mac OS
$ brew install gpg $ gpg --version #檢查版本,應該為2.x
用gpg生成key
$ gpg2 --full-gen-keygpg (GnuPG) 2.0.12; Copyright (C) 2009 Free Software Foundation, Inc. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Please select what kind of key you want: (1) RSA and RSA (default) (2) DSA and Elgamal (3) DSA (sign only) (4) RSA (sign only) Your selection? 1RSA keys may be between 1024 and 4096 bits long. What keysize do you want? (2048) 4096Requested keysize is 4096 bits Please specify how long the key should be valid. 0 = key does not expire <n> = key expires in n days <n>w = key expires in n weeks <n>m = key expires in n months <n>y = key expires in n yearsKey is valid for? (0) Key does not expire at allIs this correct? (y/N) y GnuPG needs to construct a user ID to identify your key.Real name: Robert Burrell Donkin Email address: rdonkin@apache.orgComment: CODE SIGNING KEYYou selected this USER-ID: "Robert Burrell Donkin (CODE SIGNING KEY) <rdonkin@apache.org>"Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O You need a Passphrase to protect your secret key. # 填入密碼,以後打包過程中會經常用到
-
檢視key id
$ gpg --list-keys pub rsa4096/28681CB1 2018-04-26 # 28681CB1就是key iduid [ultimate] liujun (apache-dubbo) <liujun@apache.org> sub rsa4096/D3D6984B 2018-04-26# 透過key id傳送public key到keyserver$ gpg --keyserver pgpkeys.mit.edu --send-key 28681CB1# 其中,pgpkeys.mit.edu為隨意挑選的keyserver,keyserver列表為:,因為相互之間是自動同步的,選任意一個都可以。
-
如果有多個public key,設定預設key
~/.gnupg/gpg.conf
# If you have more than 1 secret key in your keyring, you may want to# uncomment the following option and set your preferred keyid.default-key 28681CB1
-
根據提示,生成key
設定Apache中央倉庫
<settings>... <servers> <!-- To publish a snapshot of some part of Maven --> <server> <id>apache.snapshots.https</id> <username> <!-- YOUR APACHE LDAP USERNAME --> </username> <password> <!-- YOUR APACHE LDAP PASSWORD (encrypted) --> </password> </server> <!-- To stage a release of some part of Maven --> <server> <id>apache.releases.https</id> <username> <!-- YOUR APACHE LDAP USERNAME --> </username> <password> <!-- YOUR APACHE LDAP PASSWORD (encrypted) --> </password> </server> ... <!-- gpg passphrase used when generate key --> <server> <id>gpg.passphrase</id> <passphrase><!-- yourKeyPassword --></passphrase> </server> </servers></settings>
-
Dubbo專案的父pom為apache pom
<parent> <groupId>org.apache</groupId> <artifactId>apache</artifactId> <version>19</version></parent>
-
新增以下內容到.m2/settings.xml
所有密碼請使用[maven-encryption-plugin]()加密後再填入
打包&上傳
-
從主幹分支拉取新分支作為釋出分支,如現在要釋出2.6.4版本,則從2.6.x拉出新分支2.6.4-release,此後2.6.4 Release Candidates涉及的修改及打標籤等都在2.6.4-release分支進行,最終釋出完成後合入主幹分支。
-
首先,在2.6.4-release分支驗證maven元件打包、source原始碼打包、簽名等是否都正常工作
$ mvn clean install -Papache-release $ mvn deploy# 將snapshot包推送到maven中央倉庫,處於staging狀態
-
用maven-release-plugin釋出
$ mvn release:clean $ mvn release:prepare -Papache-release -Darguments="-DskipTests" -DautoVersionSubmodules=true -Dusername=YOUR GITHUB ID# 執行完成後:1.生成source.zip包; 2.打出tag,並推送到github倉庫; 3.分支版本自動升級為2.6.4-SNAPSHOT,並將修改推送到github倉庫
-
執行release:perform,做正式釋出
$ mvn -Prelease release:perform -Darguments="-DskipTests" -DautoVersionSubmodules=true -Dusername=YOUR GITHUB ID# 所有artifacts釋出到配置的遠端maven中央倉庫,處於staging狀態
-
先用dryRun驗證是否ok
$ mvn release:prepare -Papache-release -Darguments="-DskipTests" -DautoVersionSubmodules=true -Dusername=YOUR GITHUB ID -DdryRun=true
-
驗證透過後,執行release:prepare
準備Apache釋出
-
準備svn本機環境(Apache使用svn託管專案的釋出內容)
-
將dubbo checkout到本地目錄
$ svn checkout https://dist.apache.org/repos/dist/dev/incubator/dubbo# 假定本地目錄為 ~/apache/incubator/dubbo
-
當前釋出版本為2.6.4,新建目錄
$ cd ~/apache/incubator/dubbo # dubbo svn根目錄$ mkdir 2.6.4
-
新增public key到 KEYS 檔案。KEYS主要是讓參與投票的人在本地匯入,用來校驗sign的正確性
-
複製Dubbo根目錄下的source.zip包到svn本地倉庫dubbo/2.6.4
-
生成sha512簽名
$ shasum -a 512 dubbo-incubating-2.6.4-source-release.zip >> dubbo-incubating-2.6.4-source-release.zip.sha512
-
如果有binary release要同時釋出
# 到dubbo專案distribution的module下,執行:$ mvn install# target目錄下,複製bin-release.zip以及bin-release.zip.asc到svn本地倉庫dubbo/2.6.4# 參考第6步,生成sha512簽名
-
提交到Apache svn
$ svn status $ svn commit -m 'prepare for 2.6.4 RC1'
驗證Release Candidates
證環節包含但不限於以下內容和形式:
-
Check signatures and hashes are good
sha512 dubbo-incubating-${release_version}-bin-release.zip.sha512 sha512 dubbo-incubating-${release_version}-source-release.zip.sha512
-
unzip dubbo-incubating-${release_version}-source-release.zip to the default directory and check the following:
-
Directory with
incubator
in name
dubbo-incubating-${release_version}-bin-release
-
DISCLAIMER file exists
-
LICENSE and NOTICE file exists and contents are good
-
All files and no binary files exist
-
All files has standard ASF License header
-
Can compile from source
-
All unit tests can pass
mvn clean test # This will run all unit tests# you can also open rat and style plugin to check if every file meets requirements.mvn clean install -Drat.skip=false -Dcheckstyle.skip=false
-
Release candidates match with corresponding tags, you can find tag link and hash in vote email.
進入投票
投票分兩個階段:
-
Dubbo社群投票,發起投票郵件到dev@dubbo.apache.org。在社群開發者Review,並統計到3個同意發版的binding票後,即可進入下一階段的投票。
-
Apache社群投票,發起投票郵件到general@apache.org。在Apache PMC Review,並統計到3個統一發版的binding票後,即可進行正式釋出。
郵件模板:
Hello Dubbo Community, This is a call for vote to release Apache Dubbo (Incubating) version 2.6.4. The release candidates: https://dist.apache.org/repos/dist/dev/incubator/dubbo/2.6.4/ Git tag for the release: https://github.com/apache/incubator-dubbo/tree/dubbo-2.6.4Hash for the release tag: afab04c53edab38d52275d2a198ea1aff7a4f41eRelease Notes: https://github.com/apache/incubator-dubbo/releases/tag/untagged-4775c0a22c60fca55118 The artifacts have been signed with Key : 28681CB1, which can be found in the keys file: https://dist.apache.org/repos/dist/dev/incubator/dubbo/KEYSThe vote will be open for at least 72 hours or until necessary number of votes are reached. Please vote accordingly: [ ] +1 approve [ ] +0 no opinion [ ] -1 disapprove with the reason Thanks, The Apache Dubbo (Incubating) Team
正式釋出
-
提交 https://dist.apache.org/repos/dist/dev/incubator/dubbo 目錄下的釋出包到 https://dist.apache.org/repos/dist/release/incubator/dubbo/ ,完成正式釋出。
-
發郵件到dev@dubbo.apache.org和general@apache.org,通知社群釋出完成。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31551794/viewspace-2215059/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Apache DolphinScheduler 3.2.2 版本正式釋出!Apache
- Apache Doris 2.0.4 版本正式釋出Apache
- Apache Doris 2.0.5 版本正式釋出Apache
- Apache Doris 2.0.5 版本正式釋出!Apache
- Apache Doris 2.0.3 版本正式釋出Apache
- Apache APISIX 3.1.0 版本正式釋出ApacheAPI
- Apache Doris 1.2.4 Release 版本正式釋出|版本通告Apache
- Apache Doris 1.2.2 Release 版本正式釋出Apache
- Apache HugeGraph1.0.0 版本正式釋出!Apache
- Apache SeaTunnel 2.3.8版本正式釋出!Apache
- Apache Hudi 0.13.0版本重磅釋出!Apache
- Apache Hudi 0.6.0版本重磅釋出Apache
- Apache Hudi 0.8.0版本重磅釋出Apache
- 如何做好 Release Plan 來完成一次完美的釋出
- 專案動態|Apache Pulsar 2.7.4 版本釋出Apache
- 全面進化!Apache Doris 1.2.0 Release 版本正式釋出|版本通告Apache
- 更穩定!Apache Doris 1.2.1 Release 版本正式釋出Apache
- Apache Doris(incubating) 成功釋出第一個版本0.9.0ApacheBAT
- 特性速覽| Apache Hudi 0.5.3版本正式釋出Apache
- StreamPark 2.0.0 重磅釋出,首個 Apache 版本終於來了!Apache
- Apache Airflow 2.3.0 釋出ApacheAI
- Apache Kafka 3.0.0釋出ApacheKafka
- Apache APISIX 2.13.0 釋出ApacheAPI
- 2.3.6版本釋出!Apache SeaTunnel Zeta引擎迎來新架構!Apache架構
- EMQX Enterprise 新版本釋出:新增 Apache IoTDB 支援、HStreamDB 最新版MQApache
- Apache Flink 1.16 正式釋出Apache
- Apache APISIX v2.14.1 探索性版本釋出,進軍更多領域ApacheAPI
- 基於Hadoop的Apache Hudi 0.10 釋出HadoopApache
- Go Module 如何釋出 v2 以上版本Go
- Apache Flink ML 2.2.0 釋出公告Apache
- Apache APISIX Ingress 1.6 正式釋出!ApacheAPI
- 重磅!Apache Kafka 3.3 正式釋出!ApacheKafka
- Apache Flink ML 2.1.0 釋出公告Apache
- Apache Tomcat 8.5.40 與 7.0.94 釋出ApacheTomcat
- Rust 1.83.0 版本釋出Rust
- jQuery 釋出 3.4.0 版本jQuery
- 如何為你的開源專案釋出一個版本
- Apache Dubbo 正式釋出 HTTP/3 版本 RPC 協議,弱網效率提升 6 倍ApacheHTTPRPC協議