如何完成一次Apache的版本发布

理解Apache发布的内容和流程

总的来说,Source Release是Apache关注的重点,也是发布的必须内容;而Binary Release是可选项,Dubbo可以选择是否发布二进制包到Apache仓库或者发布到Maven中央仓库。

请参考以下链接,找到更多关于ASF的发布指南:

  • Apache Release Guide
  • Apache Release Policy
  • Maven Release Info

本地构建环境准备

主要包括签名工具、Maven仓库认证相关准备

  1. 安装GPG,参见 https://www.gnupg.org/download/index.html

    • 如Mac OS

      $ brew install gpg
      $ gpg --version #检查版本,应该为2.x
  2. 用gpg生成key

    • 根据提示,生成key
    $ gpg2 --full-gen-key
    gpg (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? 1
    RSA keys may be between 1024 and 4096 bits long.
    What keysize do you want? (2048) 4096
    Requested 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 years
    Key is valid for? (0) 
    Key does not expire at all
    Is this correct? (y/N) yGnuPG needs to construct a user ID to identify your key.Real name: Robert Burrell Donkin
    Email address: rdonkin@apache.org
    Comment: CODE SIGNING KEY
    You 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 id
      uid       [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列表为:https://sks-keyservers.net/status/,因为相互之间是自动同步的,选任意一个都可以。
    • 如果有多个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
  3. 设置Apache中央仓库

    • Dubbo项目的父pom为apache pom

      <parent><groupId>org.apache</groupId><artifactId>apache</artifactId><version>19</version>
      </parent>
    • 添加以下内容到.m2/settings.xml

      
      所有密码请使用[maven-encryption-plugin](http://maven.apache.org/guides/mini/guide-encryption.html)加密后再填入
      
    <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>

打包&上传

  1. 从主干分支拉取新分支作为发布分支,如现在要发布2.6.4版本,则从2.6.x拉出新分支2.6.4-release,此后2.6.4 Release Candidates涉及的修改及打标签等都在2.6.4-release分支进行,最终发布完成后合入主干分支。
  2. 首先,在2.6.4-release分支验证maven组件打包、source源码打包、签名等是否都正常工作

    $ mvn clean install -Papache-release
    $ mvn deploy
    # 将snapshot包推送到maven中央仓库,处于staging状态
  3. 用maven-release-plugin发布

    • 先用dryRun验证是否ok

      $ mvn release:prepare -Papache-release -Darguments="-DskipTests" -DautoVersionSubmodules=true -Dusername=YOUR GITHUB ID -DdryRun=true
    • 验证通过后,执行release:prepare
    $ 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状态

准备Apache发布

  1. 准备svn本机环境(Apache使用svn托管项目的发布内容)
  2. 将dubbo checkout到本地目录

    $ svn checkout https://dist.apache.org/repos/dist/dev/incubator/dubbo
    # 假定本地目录为 ~/apache/incubator/dubbo
  3. 当前发布版本为2.6.4,新建目录

    $ cd ~/apache/incubator/dubbo # dubbo svn根目录
    $ mkdir 2.6.4
  4. 添加public key到KEYS文件。KEYS主要是让参与投票的人在本地导入,用来校验sign的正确性
  5. 拷贝Dubbo根目录下的source.zip包到svn本地仓库dubbo/2.6.4
  6. 生成sha512签名

    $ shasum -a 512 dubbo-incubating-2.6.4-source-release.zip >> dubbo-incubating-2.6.4-source-release.zip.sha512
  7. 如果有binary release要同时发布

    # 到dubbo项目distribution的module下,执行:
    $ mvn install
    # target目录下,拷贝bin-release.zip以及bin-release.zip.asc到svn本地仓库dubbo/2.6.4
    # 参考第6步,生成sha512签名
  8. 提交到Apache svn

    $ svn status
    $ svn commit -m 'prepare for 2.6.4 RC1'

验证Release Candidates

证环节包含但不限于以下内容和形式:

  1. Check signatures and hashes are good
sha512 dubbo-incubating-${release_version}-bin-release.zip.sha512
sha512 dubbo-incubating-${release_version}-source-release.zip.sha512
  1. unzip dubbo-incubating-&dollar;{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.

进入投票

投票分两个阶段:

  1. Dubbo社区投票,发起投票邮件到dev@dubbo.apache.org。在社区开发者Review,并统计到3个同意发版的binding票后,即可进入下一阶段的投票。
  2. 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-4775c0a22c60fca55118The 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 reasonThanks,
The Apache Dubbo (Incubating) Team

正式发布

  1. 提交https://dist.apache.org/repos/dist/dev/incubator/dubbo目录下的发布包到https://dist.apache.org/repos/dist/release/incubator/dubbo/,完成正式发布。
  2. 发邮件到dev@dubbo.apache.org和general@apache.org,通知社区发布完成。

完成Maven Convenient Binary发布(可选)

apache.repository.org nexus仓库的权限已经申请,参见jira

之前发布到maven仓库的atifacts都处于staging状态,用Apache id登录apache.repository.org,完成发布。


原文链接
本文为云栖社区原创内容,未经允许不得转载。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/520962.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

p沟道mos管导通条件_打开知识大门的捷径!MOS管基本认识

01三个极的判定G极(gate)—栅极&#xff0c;不用说比较好认 S极(source)—源极&#xff0c;不论是P沟道还是N沟道&#xff0c;两根线相交的就是 D极(drain)—漏极&#xff0c;不论是P沟道还是N沟道&#xff0c;是单独引线的那边02N沟道与P沟道判别箭头指向G极的是N沟道 箭头背向…

大繁至简,首度揭秘阿里云飞天洛神系统

“最好的网络就像神一样&#xff0c;无处不在&#xff0c;又感知不到她的存在 …… 大繁至简&#xff0c;这是我们努力的方向。” – 阿里云网络高级技术专家 孙成浩 2018杭州云栖大会的主会场上&#xff0c;阿里云产品总监何云飞介绍了阿里云自主研发的云操作系统飞天的全…

(Docker实战) 第2篇:Centos7 拉取和部署Gitlab

文章目录搭建gitlab1. 拉取并运行gitlab所需要的redis镜像2. 拉取并运行gitlab所需要的postgresql镜像3. 下载并运行gitlab搭建gitlab 参考&#xff1a;https://github.com/sameersbn/docker-gitlab 1. 拉取并运行gitlab所需要的redis镜像 docker run --name gitlab-redis -d…

redis系列:通过队列案例学习list命令

前言 这一篇文章将讲述Redis中的list类型命令&#xff0c;同样也是通过demo来讲述&#xff0c;其他部分这里就不在赘述了。 项目Github地址&#xff1a;https://github.com/rainbowda/learnWay/tree/master/learnRedis/case-list 案例 demo功能是队列&#xff0c;整个demo的…

php生成图片文件流,php如何将base64数据流文件转换为图片文件?

2017-03-07在开发中&#xff0c;自己遇到一个前端在上传图片的时候&#xff0c;使用的base64数据流文件显示的图片。也就是说***image/后面的jpg是我们的图片文件格式&#xff0c;(base64,)后面的很大一长串就是具体的文件信息。data:image/jpg;base64则是指的文件头。我们可以…

python time sleep和wait_Python和硒:driver.implicitly_wait()和time.sleep()之间的区别...

Yes, I know both are used to wait for some specified time.Selenium:driver.implicitly_wait(10)Python:import timetime.sleep(10)Is there any difference between these two?解决方案time.sleep(secs)time.sleep(secs) suspends the execution of the current thread fo…

2019年程序员薪酬报告:平均年薪超70万!40岁后,这类人不“保值”了

Hired 近日发布了《2019 年度薪酬状况报告》&#xff0c;重点结论如下&#xff1a;仅有 23% 的硕士 / 博士表示&#xff0c;高学历带来了高薪&#xff0c;大部分人表示学历不是全部76% 的技术工作者认为&#xff0c;参加编程培训机构对求职有帮助在美国&#xff0c;技术工作者在…

业务代码解构利器--SWAK

简介 业务的不断发展、商品类型的不断增多、不断添加的业务需求使得闲鱼的代码出现“bad smell”——平台代码和业务代码耦合严重难以分离&#xff1b;业务和业务之间代码交织缺少拆解。这也是行业中的通病。为解决此类问题&#xff0c;闲鱼自研了一套技术框架——SWAK。本文带…

MySQL8.0 · 优化器新特性 · Cost Model, 直方图及优化器开销优化

MySQL当前已经发布到MySQL8.0版本&#xff0c;在新的版本中&#xff0c;可以看到MySQL之前被人诟病的优化器部分做了很多的改动&#xff0c;由于笔者之前的工作环境是5.6&#xff0c;最近切换到最新的8.0版本&#xff0c;本文涵盖了一些本人感兴趣的和优化器相关的部分&#xf…

(Docker实战) 第4篇:Centos7 拉取和部署Redis

文章目录搭建redis搭建redis docker run --name redis -di --publish 6379:6379 redis:4.0远程验证测试&#xff1a; 想学习更多微服务、分布式、中间件、数据库、项目快速构建等系列技术 请访问http://gblfy.com 让我们一起进步&#xff01;&#xff01;&#xff01;

python autohotkey_PyAutoGUI-python版的autoit/AHK

简单介绍各个图形界面自动操作的python库&#xff0c;类似按键精灵\autoit\ahk(autohotkey)等等这些自动化工具。这类python库不是只是用来实现自动游戏之类的程序&#xff0c;业界也用这些库来做GUI 自动化测试。第一推荐的库: PyAutoGUI 跨平台PyAutoGUI 在windows下无依赖&a…

阿里巴巴上线静态开源站点搭建工具 Docsite

近日&#xff0c;阿里巴巴在Github上线了静态开源站点搭建工具Docsite&#xff0c;这是一款集官网、文档、博客和社区为一体的静态开源站点的解决方案&#xff0c;具有简单易上手、上手不撒手的特质&#xff0c;同时支持react和静态渲染、PC端和移动端、支持中英文国际化、SEO、…

重磅 | 边缘计算核心技术辨析

戳蓝字“CSDN云计算”关注我们哦&#xff01;作者 | 中国电信广研院责编 | 阿秃边缘计算&#xff08;Edge Computing&#xff09;是云计算向边缘的延伸&#xff0c;本文对边缘计算、雾计算、MEC、Cloudlet、分布式云等边缘计算领域相关概念和技术的定义、架构、场景等进行了比…

php请求接口两次,php curl post请求执行一次curl_exce 请求的接口确执行两次

1、php curl post请求接口&#xff0c;打印日志执行了一次curl_exce&#xff0c;但是请求的接口却重复执行两次.2、代码&#xff1a;$ch curl_init();if(false $ch){writeRedisLog(create_curl, $activity_id, $mobile, $user_id, , 0, curl failed to initialize);}curl_set…

(Docker实战) 第5篇:Centos7 拉取和部署搭建 NEXUS私服

文章目录搭建nexus私服1. 安装nexus3&#xff08;admin/admin123&#xff09;2 .配置nexus32.1 新建一个maven2(proxy)仓库2.2. 新建一个maven2(hosted)仓库2.3. 配置public仓库搭建nexus私服 1. 安装nexus3&#xff08;admin/admin123&#xff09; #创建文件夹,安装过程如果…

Nacos发布 v0.2 版本,无缝支持 Spring Cloud 微服务生态及高可用集群模式

近日&#xff0c;阿里巴巴新开源项目Nacos 发布了 v0.2 版本&#xff0c;该版本开始支持完整的Spring生态技术栈&#xff0c;这包括 Spring Framework、Spring Boot和Spring Cloud。 为了让更多的Spring用户可以在生产上基于 Nacos 做微服务平台的服务发现、配置管理、服务管控…

python中的def语句输出1000以内的回文_各种方法测试回文的性能[Python]

使用timeit模块进行速度测试,使用profile模块进行性能统计,使用dis模块进行字节码反汇编.下面的脚本演示了如何使用模块.从输出中注意到的一件事是函数调用的数量会影响整体性能(当然,字节码指令的数量也是如此).希望,(以及更多实验)应该为您提供有关如何提高功能效率的足够线索…

是时候展现真正的技术了!4道程序员智力题你能对几道| IT巨能唠

程序员对很多人来说那就是个神秘组织&#xff0c;高薪、加班多都是他们的代名词。但是&#xff0c;大家好像还忘了一点&#xff0c;那就是他们也绝对聪明&#xff01;黑客、代码天才、编程老手……层出不穷&#xff0c;晦涩的计算机难题也是分分钟搞定&#xff0c;想想就令人神…

阿里关涛谈大规模计算—从数字化阿里到数字化城市的进化

在刚刚结束的2018杭州云栖大会上&#xff0c;阿里巴巴通用计算平台负责人&#xff0c;阿里巴巴计算平台资深技术专家关涛从计算力&#xff0c;联合计算&#xff0c;智能化&#xff0c;企业级服务能力四个方面详细介绍阿里巴巴统一的超大规模数据计算平台MaxCompute的探索与实践…

java double add,Java中的DoubleStream.Builder add()方法

add()Java中DoubleStream.Builder类的方法将元素添加到正在构建的流中。该方法返回此构建器。语法如下default DoubleStream.Builder add(double ele)此处&#xff0c;ele是要添加到此流中的元素。要在Java中使用DoubleStream.Builder类&#xff0c;请导入以下包import java.ut…