您好!
欢迎来到京东云开发者社区
登录
首页
博文
课程
大赛
工具
用户中心
开源
首页
博文
课程
大赛
工具
开源
更多
用户中心
开发者社区
>
博文
>
如何参与和贡献ShardingSphere(下)
分享
打开微信扫码分享
点击前往QQ分享
点击前往微博分享
点击复制链接
如何参与和贡献ShardingSphere(下)
Apache ShardingSphere
2021-01-26
IP归属:未知
20000浏览
# ElasticJob发布指南 ## GPG设置 详情请参见[发布指南](/cn/contribute/release/)。 ## 发布Apache Maven中央仓库 **1. 设置settings.xml文件** 将以下模板添加到 `~/.m2/settings.xml`中,所有密码需要加密后再填入。 加密设置可参考[这里](http://maven.apache.org/guides/mini/guide-encryption.html)。 ```xml <settings> <servers> <server> <id>apache.snapshots.https</id> <username> <!-- APACHE LDAP 用户名 --> </username> <password> <!-- APACHE LDAP 加密后的密码 --> </password> </server> <server> <id>apache.releases.https</id> <username> <!-- APACHE LDAP 用户名 --> </username> <password> <!-- APACHE LDAP 加密后的密码 --> </password> </server> </servers> </settings> ``` **2. 更新版本说明和示例版本** 在Github主干上更新如下文件,并提交PR到主干: ``` https://github.com/apache/shardingsphere-elasticjob/blob/master/RELEASE-NOTES.md ``` 更新`examples`模块的pom,将版本由${CURRENT.VERSION}替换为${RELEASE.VERSION}。 **3. 创建发布分支** 假设从github下载的ElasticJob源代码在`~/elasticjob/`目录;假设即将发布的版本为`${RELEASE.VERSION}`。 创建`${RELEASE.VERSION}-release`分支,接下来的操作都在该分支进行。 ```shell ## ${name}为源码所在分支,如:master,dev-4.x git clone --branch ${name} https://github.com/apache/shardingsphere-elasticjob.git ~/elasticjob cd ~/elasticjob/ git pull git checkout -b ${RELEASE.VERSION}-release git push origin ${RELEASE.VERSION}-release ``` **4. 发布预校验** ```shell mvn release:prepare -Prelease -Darguments="-DskipTests" -DautoVersionSubmodules=true -DdryRun=true -Dusername=${Github用户名} ``` -Prelease: 选择release的profile,这个profile会打包所有源码和jar文件。 -DautoVersionSubmodules=true:作用是发布过程中版本号只需要输入一次,不必为每个子模块都输入一次。 -DdryRun=true:演练,即不产生版本号提交,不生成新的tag。 **5. 准备发布** 首先清理发布预校验本地信息。 ```shell mvn release:clean ``` ```shell mvn release:prepare -Prelease -Darguments="-DskipTests" -DautoVersionSubmodules=true -DpushChanges=false -Dusername=${Github用户名} ``` 和上一步演练的命令基本相同,去掉了-DdryRun=true参数。 -DpushChanges=false:不要将修改后的版本号和tag自动提交至Github。 将本地文件检查无误后,提交至github。 ```shell git push origin ${RELEASE.VERSION}-release git push origin --tags ``` **6. 部署发布** ```shell mvn release:perform -Prelease -Darguments="-DskipTests" -DautoVersionSubmodules=true -Dusername=${Github用户名} ``` 执行完该命令后,待发布版本会自动上传到Apache的临时筹备仓库(staging repository)。 访问https://repository.apache.org/#stagingRepositories, 使用Apache的LDAP账户登录后,就会看到上传的版本,`Repository`列的内容即为${STAGING.REPOSITORY}。 点击`Close`来告诉Nexus这个构建已经完成,只有这样该版本才是可用的。 如果电子签名等出现问题,`Close`会失败,可以通过`Activity`查看失败信息。 ## 发布Apache SVN仓库 **1. 检出shardingsphere发布目录** 如无本地工作目录,则先创建本地工作目录。 ```shell mkdir -p ~/ss_svn/dev/ cd ~/ss_svn/dev/ ``` 创建完毕后,从Apache SVN检出shardingsphere发布目录。 ```shell svn --username=${APACHE LDAP 用户名} co https://dist.apache.org/repos/dist/dev/shardingsphere cd ~/ss_svn/dev/shardingsphere ``` **2. 添加gpg公钥** 仅第一次部署的账号需要添加,只要`KEYS`中包含已经部署过的账户的公钥即可。 ```shell gpg -a --export ${GPG用户名} >> KEYS ``` **3. 将待发布的内容添加至SVN目录** 创建版本号目录。 ```shell mkdir -p ~/ss_svn/dev/shardingsphere/elasticjob-${RELEASE.VERSION} cd ~/ss_svn/dev/shardingsphere/elasticjob-${RELEASE.VERSION} ``` 将源码包和二进制包添加至SVN工作目录。 ```shell cp -f ~/elasticjob/elasticjob-distribution/elasticjob-src-distribution/target/*.zip ~/ss_svn/dev/shardingsphere/elasticjob-${RELEASE.VERSION} cp -f ~/elasticjob/elasticjob-distribution/elasticjob-src-distribution/target/*.zip.asc ~/ss_svn/dev/shardingsphere/elasticjob-${RELEASE.VERSION} cp -f ~/elasticjob/elasticjob-distribution/elasticjob-lite-distribution/target/*.tar.gz ~/ss_svn/dev/shardingsphere/elasticjob-${RELEASE.VERSION} cp -f ~/elasticjob/elasticjob-distribution/elasticjob-lite-distribution/target/*.tar.gz.asc ~/ss_svn/dev/shardingsphere/elasticjob-${RELEASE.VERSION} cp -f ~/elasticjob/elasticjob-distribution/elasticjob-cloud-executor-distribution/target/*.tar.gz ~/ss_svn/dev/shardingsphere/elasticjob-${RELEASE.VERSION} cp -f ~/elasticjob/elasticjob-distribution/elasticjob-cloud-executor-distribution/target/*.tar.gz.asc ~/ss_svn/dev/shardingsphere/elasticjob-${RELEASE.VERSION} cp -f ~/elasticjob/elasticjob-distribution/elasticjob-cloud-scheduler-distribution/target/*.tar.gz ~/ss_svn/dev/shardingsphere/elasticjob-${RELEASE.VERSION} cp -f ~/elasticjob/elasticjob-distribution/elasticjob-cloud-scheduler-distribution/target/*.tar.gz.asc ~/ss_svn/dev/shardingsphere/elasticjob-${RELEASE.VERSION} ``` **4. 生成文件签名** ```shell shasum -a 512 apache-shardingsphere-elasticjob-${RELEASE.VERSION}-src.zip > apache-shardingsphere-elasticjob-${RELEASE.VERSION}-src.zip.sha512 shasum -b -a 512 apache-shardingsphere-elasticjob-${RELEASE.VERSION}-lite-bin.tar.gz > apache-shardingsphere-elasticjob-${RELEASE.VERSION}-lite-bin.tar.gz.sha512 shasum -b -a 512 apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-executor-bin.tar.gz > apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-executor-bin.tar.gz.sha512 shasum -b -a 512 apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-scheduler-bin.tar.gz > apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-scheduler-bin.tar.gz.sha512 ``` **5. 提交Apache SVN** ```shell svn add * svn --username=${APACHE LDAP 用户名} commit -m "release elasticjob-${RELEASE.VERSION}" ``` ## 检查发布结果 **检查sha512哈希** ```shell shasum -c apache-shardingsphere-elasticjob-${RELEASE.VERSION}-src.zip.sha512 shasum -c apache-shardingsphere-elasticjob-${RELEASE.VERSION}-lite-bin.tar.gz.sha512 shasum -c apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-executor-bin.tar.gz.sha512 shasum -c apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-scheduler-bin.tar.gz.sha512 ``` **检查gpg签名** 首先导入发布人公钥。从svn仓库导入KEYS到本地环境。(发布版本的人不需要再导入,帮助做验证的人需要导入,用户名填发版人的即可) ```shell curl https://dist.apache.org/repos/dist/dev/shardingsphere/KEYS >> KEYS gpg --import KEYS gpg --edit-key "${发布人的gpg用户名}" > trust Please decide how far you trust this user to correctly verify other users' keys (by looking at passports, checking fingerprints from different sources, etc.) 1 = I don't know or won't say 2 = I do NOT trust 3 = I trust marginally 4 = I trust fully 5 = I trust ultimately m = back to the main menu Your decision? 5 > save ``` 然后进行gpg签名检查。 ```shell gpg --verify apache-shardingsphere-elasticjob-${RELEASE.VERSION}-src.zip.asc apache-shardingsphere-elasticjob-${RELEASE.VERSION}-src.zip gpg --verify apache-shardingsphere-elasticjob-${RELEASE.VERSION}-lite-bin.tar.gz.asc apache-shardingsphere-elasticjob-${RELEASE.VERSION}-lite-bin.tar.gz gpg --verify apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-executor-bin.tar.gz.asc apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-executor-bin.tar.gz gpg --verify apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-scheduler-bin.tar.gz.asc apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-scheduler-bin.tar.gz ``` **检查发布文件内容** **对比源码包与Github上tag的内容差异** ``` curl -Lo tag-${RELEASE.VERSION}.zip https://github.com/apache/shardingsphere-elasticjob/archive/${RELEASE.VERSION}.zip unzip tag-${RELEASE.VERSION}.zip unzip apache-shardingsphere-elasticjob-${RELEASE.VERSION}-src.zip diff -r apache-shardingsphere-elasticjob-${RELEASE.VERSION}-src-release shardingsphere-elasticjob-${RELEASE.VERSION} ``` **检查源码包的文件内容** - 检查源码包是否包含由于包含不必要文件,致使tarball过于庞大 - 存在`LICENSE`和`NOTICE`文件 - `NOTICE`文件中的年份正确 - 只存在文本文件,不存在二进制文件 - 所有文件的开头都有ASF许可证 - 能够正确编译,单元测试可以通过 (./mvnw install) - 检查是否有多余文件或文件夹,例如空文件夹等 **检查二进制包的文件内容** 解压缩 `apache-shardingsphere-elasticjob-${RELEASE.VERSION}-lite-bin.tar.gz`, `apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-executor-bin.tar.gz`和 `apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-scheduler-bin.tar.gz` 进行如下检查: - 存在`LICENSE`和`NOTICE`文件 - `NOTICE`文件中的年份正确 - 所有文本文件开头都有ASF许可证 - 检查第三方依赖许可证: - 第三方依赖的许可证兼容 - 所有第三方依赖的许可证都在`LICENSE`文件中声名 - 依赖许可证的完整版全部在`license`目录 - 如果依赖的是Apache许可证并且存在`NOTICE`文件,那么这些`NOTICE`文件也需要加入到版本的`NOTICE`文件中 ## 发起投票 **投票阶段** 1. ShardingSphere社区投票,发起投票邮件到`dev@shardingsphere.apache.org`。PMC需要先按照文档检查版本的正确性,然后再进行投票。 经过至少72小时并统计到3个`+1 PMC member`票后,即可进入下一阶段的投票。 2. 宣布投票结果,发起投票结果邮件到`dev@shardingsphere.apache.org`。 **投票模板** 1. ShardingSphere社区投票模板 标题: ``` [VOTE] Release Apache ShardingSphere ElasticJob-${RELEASE.VERSION} ``` 正文: ``` Hello ShardingSphere Community, This is a call for vote to release Apache ShardingSphere ElasticJob-${RELEASE.VERSION} Release notes: https://github.com/apache/shardingsphere-elasticjob/blob/master/RELEASE-NOTES.md The release candidates: https://dist.apache.org/repos/dist/dev/shardingsphere/elasticjob-${RELEASE.VERSION}/ Maven 2 staging repository: https://repository.apache.org/content/repositories/${STAGING.REPOSITORY}/org/apache/shardingsphere/ Git tag for the release: https://github.com/apache/shardingsphere-elasticjob/tree/${RELEASE.VERSION}/ Release Commit ID: https://github.com/apache/shardingsphere-elasticjob/commit/xxxxxxxxxxxxxxxxxxxxxxx Keys to verify the Release Candidate: https://dist.apache.org/repos/dist/dev/shardingsphere/KEYS Look at here for how to verify this release candidate: https://shardingsphere.apache.org/community/en/contribute/release-elasticjob/ GPG user ID: ${YOUR.GPG.USER.ID} The 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 PMC vote is +1 binding, all others is +1 non-binding. Checklist for reference: [ ] Download links are valid. [ ] Checksums and PGP signatures are valid. [ ] Source code distributions have correct names matching the current release. [ ] LICENSE and NOTICE files are correct for each ShardingSphere repo. [ ] All files have license headers if necessary. [ ] No compiled archives bundled in source archive. ``` 2. 宣布投票结果模板: 标题: ``` [RESULT][VOTE] Release Apache ShardingSphere ElasticJob-${RELEASE.VERSION} ``` 正文: ``` We’ve received 3 +1 binding votes and one +1 non-binding vote: +1 binding, xxx +1 binding, xxx +1 binding, xxx +1 non-binding, xxx Thank you everyone for taking the time to review the release and help us. I will process to publish the release and send ANNOUNCE. ``` ## 完成发布 **1. 将源码、二进制包以及KEYS从svn的dev目录移动到release目录** ```shell svn mv https://dist.apache.org/repos/dist/dev/shardingsphere/elasticjob-${RELEASE.VERSION} https://dist.apache.org/repos/dist/release/shardingsphere/ -m "transfer packages for elasticjob-${RELEASE.VERSION}" svn delete https://dist.apache.org/repos/dist/release/shardingsphere/KEYS -m "delete KEYS" svn cp https://dist.apache.org/repos/dist/dev/shardingsphere/KEYS https://dist.apache.org/repos/dist/release/shardingsphere/ -m "transfer KEYS for elasticjob-${RELEASE.VERSION}" ``` **2. 在Apache Staging仓库找到ShardingSphere并点击`Release`** **3. 合并Github的release分支到`master`, 合并完成后删除release分支** ```shell git checkout master git merge origin/${RELEASE.VERSION}-release git pull git push origin master git push --delete origin ${RELEASE.VERSION}-release git branch -d ${RELEASE.VERSION}-release ``` **4. 发布 Docker** 4.1 准备工作 本地安装 Docker,并启动服务。 4.2 编译 Docker 镜像 ```shell git checkout ${RELEASE.VERSION} cd ~/elasticjob/elasticjob-distribution/elasticjob-cloud-scheduler-distribution/ mvn clean package -Prelease,docker ``` 4.3 给本地 Docker 镜像打标记 通过`docker images`查看到IMAGE ID,例如为:e9ea51023687 ```shell docker tag e9ea51023687 apache/shardingsphere-elasticjob-cloud-scheduler:latest docker tag e9ea51023687 apache/shardingsphere-elasticjob-cloud-scheduler:${RELEASE.VERSION} ``` 4.4 发布 Docker 镜像 ```shell docker push apache/shardingsphere-elasticjob-cloud-scheduler:latest docker push apache/shardingsphere-elasticjob-cloud-scheduler:${RELEASE_VERSION} ``` 4.5 确认发布成功 登录 [Docker Hub](https://hub.docker.com/r/apache/shardingsphere-elasticjob-cloud-scheduler/) 查看是否有发布的镜像 **5. GitHub版本发布** 在 [GitHub Releases](https://github.com/apache/shardingsphere-elasticjob/releases) 页面的 `${RELEASE_VERSION}` 版本上点击 `Edit` 编辑版本号及版本说明,并点击`Publish release` **6. 更新下载页面** 等待并确认新的发布版本同步至 Apache 镜像后,更新如下页面: https://shardingsphere.apache.org/elasticjob/current/en/downloads/ https://shardingsphere.apache.org/elasticjob/current/cn/downloads/ GPG签名文件和哈希校验文件的下载连接应该使用这个前缀:`https://downloads.apache.org/shardingsphere/` `最新版本`中保留一个最新的版本。 **7. 邮件通知版本发布完成** 发送邮件到`dev@shardingsphere.apache.org`和`announce@apache.org`通知完成版本发布 通知邮件模板: 标题: ``` [ANNOUNCE] Apache ShardingSphere ElasticJob-${RELEASE.VERSION} available ``` 正文: ``` Hi all, Apache ShardingSphere Team is glad to announce the new release of Apache ShardingSphere ElasticJob-${RELEASE.VERSION}. ElasticJob is a distributed scheduling solution consisting of two separate projects, ElasticJob-Lite and ElasticJob-Cloud. Through the functions of flexible scheduling, resource management and job management, it creates a distributed scheduling solution suitable for Internet scenarios, and provides diversified job ecosystem through open architecture design. It uses a unified job API for each project. Developers only need code one time and can deploy at will. ElasticJob became an Apache ShardingSphere Sub project on May 28 2020. Download Links: https://shardingsphere.apache.org/elasticjob/current/en/downloads/ Release Notes: https://github.com/apache/shardingsphere-elasticjob/blob/master/RELEASE-NOTES.md Website: http://shardingsphere.apache.org/elasticjob/ ShardingSphere-ElasticJob Resources: - Issue: https://github.com/apache/shardingsphere-elasticjob/issues/ - Mailing list: dev@shardingsphere.apache.org - Documents: https://shardingsphere.apache.org/elasticjob/current/en/overview/ - Apache ShardingSphere Team ``` # ElasticJob-UI发布指南 ## GPG设置 详情请参见[发布指南](/cn/contribute/release/)。 ## 发布Apache Maven中央仓库 **1. 设置settings.xml文件** 将以下模板添加到 `~/.m2/settings.xml`中,所有密码需要加密后再填入。 加密设置可参考[这里](http://maven.apache.org/guides/mini/guide-encryption.html)。 ```xml <settings> <servers> <server> <id>apache.snapshots.https</id> <username> <!-- APACHE LDAP 用户名 --> </username> <password> <!-- APACHE LDAP 加密后的密码 --> </password> </server> <server> <id>apache.releases.https</id> <username> <!-- APACHE LDAP 用户名 --> </username> <password> <!-- APACHE LDAP 加密后的密码 --> </password> </server> </servers> </settings> ``` **2. 更新版本说明** ``` https://github.com/apache/shardingsphere-elasticjob-ui/blob/master/RELEASE-NOTES.md ``` **3. 创建发布分支** 假设从github下载的ElasticJob-UI源代码在`~/elasticjob-ui/`目录;假设即将发布的版本为`${RELEASE.VERSION}`。 创建`${RELEASE.VERSION}-release`分支,接下来的操作都在该分支进行。 ```shell ## ${name}为源码所在分支,如:master,dev-4.x git clone --branch ${name} https://github.com/apache/shardingsphere-elasticjob-ui.git ~/elasticjob-ui cd ~/elasticjob-ui/ git pull git checkout -b ${RELEASE.VERSION}-release git push origin ${RELEASE.VERSION}-release ``` **4. 发布预校验** ```shell cd ~/elasticjob-ui mvn release:prepare -Prelease -Darguments="-DskipTests" -DautoVersionSubmodules=true -DdryRun=true -Dusername=${Github用户名} ``` -Prelease: 选择release的profile,这个profile会打包所有源码、jar文件以及ElasticJob-UI的可执行二进制包。 -DautoVersionSubmodules=true:作用是发布过程中版本号只需要输入一次,不必为每个子模块都输入一次。 -DdryRun=true:演练,即不产生版本号提交,不生成新的tag。 **5. 准备发布** 首先清理发布预校验本地信息。 ```shell cd ~/elasticjob-ui mvn release:clean ``` 然后准备执行发布。 ```shell cd ~/elasticjob-ui mvn release:prepare -Prelease -Darguments="-DskipTests" -DautoVersionSubmodules=true -DpushChanges=false -Dusername=${Github用户名} ``` 和上一步演练的命令基本相同,去掉了-DdryRun=true参数。 -DpushChanges=false:不要将修改后的版本号和tag自动提交至Github。 将本地文件检查无误后,提交至github。 ```shell git push origin ${RELEASE.VERSION}-release git push origin --tags ``` **6. 部署发布** ```shell cd ~/elasticjob-ui mvn release:perform -Prelease -Darguments="-DskipTests" -DautoVersionSubmodules=true -Dusername=${Github用户名} ``` ## 发布Apache SVN仓库 **1. 检出shardingsphere发布目录** 如无本地工作目录,则先创建本地工作目录。 ```shell mkdir -p ~/ss_svn/dev/ cd ~/ss_svn/dev/ ``` 创建完毕后,从Apache SVN检出shardingsphere发布目录。 ```shell svn --username=${APACHE LDAP 用户名} co https://dist.apache.org/repos/dist/dev/shardingsphere cd ~/ss_svn/dev/shardingsphere ``` **2. 添加gpg公钥** 仅第一次部署的账号需要添加,只要`KEYS`中包含已经部署过的账户的公钥即可。 ```shell gpg -a --export ${GPG用户名} >> KEYS ``` **3. 将待发布的内容添加至SVN目录** 创建版本号目录。 ```shell mkdir -p ~/ss_svn/dev/shardingsphere/elasticjob-ui-${RELEASE.VERSION} cd ~/ss_svn/dev/shardingsphere/elasticjob-ui-${RELEASE.VERSION} ``` 将源码包和二进制包添加至SVN工作目录。 ```shell cp -f ~/elasticjob-ui/shardingsphere-elasticjob-ui-distribution/shardingsphere-elasticjob-ui-src-distribution/target/*.zip ~/ss_svn/dev/shardingsphere/elasticjob-ui-${RELEASE.VERSION} cp -f ~/elasticjob-ui/shardingsphere-elasticjob-ui-distribution/shardingsphere-elasticjob-ui-src-distribution/target/*.zip.asc ~/ss_svn/dev/shardingsphere/elasticjob-ui-${RELEASE.VERSION} cp -f ~/elasticjob-ui/shardingsphere-elasticjob-ui-distribution/shardingsphere-elasticjob-lite-ui-bin-distribution/target/*.tar.gz ~/ss_svn/dev/shardingsphere/elasticjob-ui-${RELEASE.VERSION} cp -f ~/elasticjob-ui/shardingsphere-elasticjob-ui-distribution/shardingsphere-elasticjob-lite-ui-bin-distribution/target/*.tar.gz.asc ~/ss_svn/dev/shardingsphere/elasticjob-ui-${RELEASE.VERSION} cp -f ~/elasticjob-ui/shardingsphere-elasticjob-ui-distribution/shardingsphere-elasticjob-cloud-ui-bin-distribution/target/*.tar.gz ~/ss_svn/dev/shardingsphere/elasticjob-ui-${RELEASE.VERSION} cp -f ~/elasticjob-ui/shardingsphere-elasticjob-ui-distribution/shardingsphere-elasticjob-cloud-ui-bin-distribution/target/*.tar.gz.asc ~/ss_svn/dev/shardingsphere/elasticjob-ui-${RELEASE.VERSION} ``` **4. 生成文件签名** ```shell shasum -a 512 apache-shardingsphere-elasticjob-${RELEASE.VERSION}-ui-src.zip > apache-shardingsphere-elasticjob-${RELEASE.VERSION}-ui-src.zip.sha512 shasum -b -a 512 apache-shardingsphere-elasticjob-${RELEASE.VERSION}-lite-ui-bin.tar.gz > apache-shardingsphere-elasticjob-${RELEASE.VERSION}-lite-ui-bin.tar.gz.sha512 shasum -b -a 512 apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-ui-bin.tar.gz > apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-ui-bin.tar.gz.sha512 ``` **5. 提交Apache SVN** ```shell cd ~/ss_svn/dev/shardingsphere/ svn add elasticjob-ui-${RELEASE.VERSION} svn --username=${APACHE LDAP 用户名} commit -m "release elasticjob-ui-${RELEASE.VERSION}" ``` ## 检查发布结果 **检查sha512哈希** ```shell shasum -c apache-shardingsphere-elasticjob-${RELEASE.VERSION}-ui-src.zip.sha512 shasum -c apache-shardingsphere-elasticjob-${RELEASE.VERSION}-lite-ui-bin.tar.gz.sha512 shasum -c apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-ui-bin.tar.gz.sha512 ``` **检查gpg签名** 首先导入发布人公钥。从svn仓库导入KEYS到本地环境。(发布版本的人不需要再导入,帮助做验证的人需要导入,用户名填发版人的即可) ```shell curl https://dist.apache.org/repos/dist/dev/shardingsphere/KEYS >> KEYS gpg --import KEYS gpg --edit-key "${发布人的gpg用户名}" > trust Please decide how far you trust this user to correctly verify other users' keys (by looking at passports, checking fingerprints from different sources, etc.) 1 = I don't know or won't say 2 = I do NOT trust 3 = I trust marginally 4 = I trust fully 5 = I trust ultimately m = back to the main menu Your decision? 5 > save ``` 然后进行gpg签名检查。 ```shell gpg --verify apache-shardingsphere-elasticjob-${RELEASE.VERSION}-ui-src.zip.asc apache-shardingsphere-elasticjob-${RELEASE.VERSION}-ui-src.zip gpg --verify apache-shardingsphere-elasticjob-${RELEASE.VERSION}-lite-ui-bin.tar.gz.asc apache-shardingsphere-elasticjob-${RELEASE.VERSION}-lite-ui-bin.tar.gz gpg --verify apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-ui-bin.tar.gz.asc apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-ui-bin.tar.gz ``` **检查发布文件内容** **对比源码包与Github上tag的内容差异** ``` curl -Lo tag-${RELEASE.VERSION}.zip https://github.com/apache/shardingsphere-elasticjob-ui/archive/${RELEASE.VERSION}.zip unzip tag-${RELEASE.VERSION}.zip unzip apache-shardingsphere-elasticjob-${RELEASE.VERSION}-ui-src.zip diff -r apache-shardingsphere-elasticjob-${RELEASE.VERSION}-ui-src shardingsphere-elasticjob-ui-${RELEASE.VERSION} ``` **检查源码包的文件内容** - 检查源码包是否包含由于包含不必要文件,致使tarball过于庞大 - 存在`LICENSE`和`NOTICE`文件 - `NOTICE`文件中的年份正确 - 只存在文本文件,不存在二进制文件 - 所有文件的开头都有ASF许可证 - 能够正确编译,单元测试可以通过 (./mvnw install) - 检查是否有多余文件或文件夹,例如空文件夹等 **检查二进制包的文件内容** 解压缩`apache-shardingsphere-elasticjob-${RELEASE.VERSION}-lite-ui-bin.tar.gz`和`apache-shardingsphere-elasticjob-${RELEASE.VERSION}-cloud-ui-bin.tar.gz` 进行如下检查: - 存在`LICENSE`和`NOTICE`文件 - `NOTICE`文件中的年份正确 - 所有文本文件开头都有ASF许可证 - 检查第三方依赖许可证: - 第三方依赖的许可证兼容 - 所有第三方依赖的许可证都在`LICENSE`文件中声名 - 依赖许可证的完整版全部在`license`目录 - 如果依赖的是Apache许可证并且存在`NOTICE`文件,那么这些`NOTICE`文件也需要加入到版本的`NOTICE`文件中 ## 发起投票 **投票阶段** 1. ShardingSphere社区投票,发起投票邮件到`dev@shardingsphere.apache.org`。PMC需要先按照文档检查版本的正确性,然后再进行投票。 经过至少72小时并统计到3个`+1 PMC member`票后,即可进入下一阶段的投票。 2. 宣布投票结果,发起投票结果邮件到`dev@shardingsphere.apache.org`。 **投票模板** 1. ShardingSphere社区投票模板 标题: ``` [VOTE] Release Apache ShardingSphere ElasticJob UI ${RELEASE.VERSION} ``` 正文: ``` Hello ShardingSphere Community, This is a call for vote to release Apache ShardingSphere ElasticJob UI version ${RELEASE.VERSION} Release notes: https://github.com/apache/shardingsphere-elasticjob-ui/blob/master/RELEASE-NOTES.md The release candidates: https://dist.apache.org/repos/dist/dev/shardingsphere/elasticjob-ui-${RELEASE.VERSION}/ Git tag for the release: https://github.com/apache/shardingsphere-elasticjob-ui/tree/${RELEASE.VERSION}/ Release Commit ID: https://github.com/apache/shardingsphere-elasticjob-ui/commit/xxxxxxxxxxxxxxxxxxxxxxx Keys to verify the Release Candidate: https://dist.apache.org/repos/dist/dev/shardingsphere/KEYS Look at here for how to verify this release candidate: https://shardingsphere.apache.org/community/en/contribute/release-elasticjob-ui/ GPG user ID: ${YOUR.GPG.USER.ID} The 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 PMC vote is +1 binding, all others is +1 non-binding. Checklist for reference: [ ] Download links are valid. [ ] Checksums and PGP signatures are valid. [ ] Source code distributions have correct names matching the current release. [ ] LICENSE and NOTICE files are correct for each ShardingSphere repo. [ ] All files have license headers if necessary. [ ] No compiled archives bundled in source archive. ``` 2. 宣布投票结果模板: 标题: ``` [RESULT][VOTE] Release Apache ShardingSphere ElasticJob UI ${RELEASE.VERSION} ``` 正文: ``` We’ve received 3 +1 binding votes and one +1 non-binding vote: +1 binding, xxx +1 binding, xxx +1 binding, xxx +1 non-binding, xxx Thank you everyone for taking the time to review the release and help us. I will process to publish the release and send ANNOUNCE. ``` ## 完成发布 **1. 将源码、二进制包以及KEYS从svn的dev目录移动到release目录** ```shell svn mv https://dist.apache.org/repos/dist/dev/shardingsphere/elasticjob-ui-${RELEASE.VERSION} https://dist.apache.org/repos/dist/release/shardingsphere/ -m "transfer packages for elasticjob-ui-${RELEASE.VERSION}" svn delete https://dist.apache.org/repos/dist/release/shardingsphere/KEYS -m "delete KEYS" svn cp https://dist.apache.org/repos/dist/dev/shardingsphere/KEYS https://dist.apache.org/repos/dist/release/shardingsphere/ -m "transfer KEYS for elasticjob-ui-${RELEASE.VERSION}" ``` **2. 合并Github的release分支到`master`, 合并完成后删除release分支** ```shell git checkout master git merge origin/${RELEASE.VERSION}-release git pull git push origin master git push --delete origin ${RELEASE.VERSION}-release git branch -d ${RELEASE.VERSION}-release ``` **3. 发布 Docker (cloud-ui)** 3.1 准备工作 本地安装 Docker,并启动服务。 3.2 编译 Docker 镜像 ```shell git checkout ${RELEASE.VERSION} cd ~/elasticjob-ui/shardingsphere-elasticjob-ui-distribution/shardingsphere-elasticjob-cloud-ui-bin-distribution/ mvn clean package -Prelease,docker ``` 3.3 给本地 Docker 镜像打标记 通过`docker images`查看到IMAGE ID,例如为:e9ea51023687 ```shell docker tag e9ea51023687 apache/shardingsphere-elasticjob-cloud-ui:latest docker tag e9ea51023687 apache/shardingsphere-elasticjob-cloud-ui:${RELEASE.VERSION} ``` 3.4 发布Docker镜像 ```shell docker push apache/shardingsphere-elasticjob-cloud-ui:latest docker push apache/shardingsphere-elasticjob-cloud-ui:${RELEASE_VERSION} ``` 3.5 确认发布成功 登录 [Docker Hub](https://hub.docker.com/r/apache/shardingsphere-elasticjob-cloud-ui/) 查看是否有发布的镜像 **4. 发布 Docker (lite-ui)** 4.1 准备工作 本地安装 Docker,并启动服务。 4.2 编译 Docker 镜像 ```shell cd ~/elasticjob-ui/shardingsphere-elasticjob-ui-distribution/shardingsphere-elasticjob-lite-ui-bin-distribution/ mvn clean package -Prelease,docker ``` 4.3 给本地 Docker 镜像打标记 通过`docker images`查看到IMAGE ID,例如为:e9ea51023687 ```shell docker tag e9ea51023687 apache/shardingsphere-elasticjob-lite-ui:latest docker tag e9ea51023687 apache/shardingsphere-elasticjob-lite-ui:${RELEASE.VERSION} ``` 4.4 发布Docker镜像 ```shell docker push apache/shardingsphere-elasticjob-lite-ui:latest docker push apache/shardingsphere-elasticjob-lite-ui:${RELEASE_VERSION} ``` 4.5 确认发布成功 登录 [Docker Hub](https://hub.docker.com/r/apache/shardingsphere-elasticjob-lite-ui/) 查看是否有发布的镜像 **5. GitHub 版本发布** 在 [GitHub Releases](https://github.com/apache/shardingsphere-elasticjob-ui/releases) 页面的 `shardingsphere-elasticjob-ui-${RELEASE_VERSION}` 版本上点击 `Edit` 编辑版本号及版本说明,并点击`Publish release` **6. 更新下载页面** 等待并确认新的发布版本同步至 Apache 镜像后,更新如下页面: https://shardingsphere.apache.org/elasticjob/current/en/downloads/ https://shardingsphere.apache.org/elasticjob/current/cn/downloads/ GPG签名文件和哈希校验文件的下载连接应该使用这个前缀: `https://downloads.apache.org/shardingsphere/` `最新版本`中保留一个最新的版本。 **7. 邮件通知版本发布完成** 发送邮件到`dev@shardingsphere.apache.org`和`announce@apache.org`通知完成版本发布 通知邮件模板: 标题: ``` [ANNOUNCE] Apache ShardingSphere ElasticJob UI ${RELEASE.VERSION} available ``` 正文: ``` Hi all, Apache ShardingSphere Team is glad to announce the new release of Apache ShardingSphere ElasticJob UI ${RELEASE.VERSION}. ElasticJob is a distributed scheduling solution consisting of two separate projects, ElasticJob-Lite and ElasticJob-Cloud. Through the functions of flexible scheduling, resource management and job management, it creates a distributed scheduling solution suitable for Internet scenarios, and provides diversified job ecosystem through open architecture design. It uses a unified job API for each project. Developers only need code one time and can deploy at will. ElasticJob became an Apache ShardingSphere Sub project on May 28 2020. Download Links: https://shardingsphere.apache.org/elasticjob/current/en/downloads/ Release Notes: https://github.com/apache/shardingsphere-elasticjob-ui/blob/master/RELEASE-NOTES.md Website: http://shardingsphere.apache.org/elasticjob/ ShardingSphere-ElasticJob Resources: - Issue: https://github.com/apache/shardingsphere-elasticjob-ui/issues/ - Mailing list: dev@shardingsphere.apache.org - Documents: https://shardingsphere.apache.org/elasticjob/current/en/overview/ - Apache ShardingSphere Team ``` # 2FA ## 双因素认证(2FA) 双因子验证(2FA)是指结合密码以及实物(信用卡、SMS手机、令牌或指纹等生物标志)两种条件对用户进行认证的方法。 为保证提交者账户的安全,我们需要您在GitHub上启用2FA来验证登录用户、并贡献代码。 具体内容可参考[2FA](https://help.github.com/articles/requiring-two-factor-authentication-in-your-organization/)。 > 注意:若您不启用2FA,您将会从本项目中除名,并且无法访问我们的仓库以及来自我们私有仓库的fork仓库。 ## 在GitHub上启用2FA 具体操作,请参考[使用TOTP启用双因素认证](https://help.github.com/articles/configuring-two-factor-authentication-via-a-totp-mobile-app/)。 当您开启2FA验证后,您需要使用用户名/密码 + 手机认证码的方式来登录GitHub。 提示:若无法通过页面链接下载对应APP,可在手机的应用市场或是APP Store里搜索并下载Google Authenticator。 ## 如何提交代码 当启用2FA认证后,您需要生成私有访问Token来进行git提交等操作。此时,您将使用用户名 + 私有访问Token 来代替 用户名 + 密码的方式 进行代码的提交。 具体操作,请参考[创建私有Token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)。 # 签署iCLA指南 ### Apache ICLA 签署流程指南 Apache CLA 全称 Apache Contributor License Agreement,签署ICLA的目的是定义向ASF贡献的文档,保护知识产权,避免后续法律纠纷。ICLA在官方存档后生效,贡献者方可参与Apache项目。 当我们需要签署ICLA时步骤如下: **1. 打开链接 [官网Licenses](https://www.apache.org/licenses/#clas) 在Contributor License Agreements 下找到CLAs并进入页面。** ![](https://shardingsphere.apache.org/blog/img/icla.png) **2. 在页面上方我们可以看到两个下载链接,选择ICLA(个人CLA)并下载文件。** ![](https://shardingsphere.apache.org/blog/img/icla2.png) **3. 打开PDF,ICLA需要填写的是两个部分,均需要全英文填写。** > 注意事项: > - 姓名需要填写拼音,姓与名之间空一格,首字母均为大写,名在前姓氏在后。 > - Committer相关的签署,则preferred Apache id(s)是必填项。 ![](https://shardingsphere.apache.org/blog/img/icla3.png) **4.文件最下方的署名。** 官方只接受手写或者gpg签名,这里只建议用手写的方式,可以打印文件进行手写签名或者使用电子笔进行签字。 ![](https://shardingsphere.apache.org/blog/img/icla4.png) ## 提交文件 * 如果您是新Committer,请扫描签署后文件的所有页合并到一个PDF的文档,发送email 到 secretary@apache.org。 * 其他情况,请联系需要您签署ICLA文档的负责人。 # 提交者选举流程指南 ## 提交者选举流程 **1. 在 @private 邮件列表讨论并投票,投票由现有的PMC成员发起,邮件内容主要陈述提名者的活动和社区贡献。** ``` 例如: To:private@shardingsphere.apache.org Title: [VOTE] New committer: (提名者) Content: Hi, everyone This is ^a formal vote^ about inviting (提名者) as our new committer. He/She really made an effort to improve ShardingSphere Parser and fix many issues. The following links will direct you to his/her work. https://github.com/apache/shardingsphere/pull/6319 https://github.com/apache/shardingsphere/pull/6293 https://github.com/apache/shardingsphere/pull/6259 https://github.com/apache/shardingsphere/pull/6211 [^ means these words are subject to change in different case] ``` **2. 等待3*24h社区Committer投票。** **3. PMC成员总结社区投票结果并发布邮件。** ``` 例如: To: private@shardingsphere.apache.org Title: [RESULT] [VOTE] New committer: (提名者) Content: Hi all PMCs, I am glad to receive your votes, and the voting result is, 6 +1 votes, 0 +/-1 votes, 0 -1 votes Therefore, I will send the invitation to (提名者). ``` **4. 如果投票通过,对提名者发布邀请函并抄送@private 邮件列表给发送邀请函。** ``` To: (提名者邮箱) cc: private@shardingsphere.apache.org Title: Invitation to become ShardingSphere committer: (提名者) Content: Hello (提名者), The ShardingSphere Project Management Committee (PMC) hereby offers you committer privileges to the project. These privileges are offered on the understanding that you'll use them reasonably and with common sense. We like to work on trust rather than unnecessary constraints. Being a committer enables you to more easily make changes without needing to go through the patch submission process. Being a committer does not require you to participate any more than you already do. It does tend to make one even more committed. You will probably find that you spend more time here. Of course, you can decline and instead remain as a contributor, participating as you do now. A. This personal invitation is a chance for you to accept or decline in private. Either way, please let us know in reply to the private@shardingsphere.apache.org address only. B. If you accept, the next step is to register an iCLA: 1. Details of the iCLA and the forms are found through this link: http://www.apache.org/licenses/#clas 2. Instructions for its completion and return to the Secretary of the ASF are found at http://www.apache.org/licenses/#submitting 3. When you transmit the completed iCLA, request to notify the Apache ShardingSphere and choose a unique Apache id. Look to see if your preferred id is already taken at http://people.apache.org/committer-index.html This will allow the Secretary to notify the PMC when your iCLA has been recorded. When recording of your iCLA is noticed, you will receive a follow-up message with the next steps for establishing you as a committer. Best wishes, (PMC) ``` **5. 准Committer回复邀请函内容,回复表达同意与感谢。** **6. PMC做出回复。** ``` Hi (提名者), Welcome! Here are the next steps. After that we will make an announcement to the shardingsphere-dev list. You need to send a Contributor License Agreement to the ASF. Normally you would send an Individual CLA. If you also make contributions done in work time or using work resources then see the Corporate CLA. Ask us if you have any issues. http://www.apache.org/licenses/#clas You need to choose a preferred ASF user name and alternatives. In order to ensure it is available you can view a list of taken ids at http://people.apache.org/committer-index.html Please notify us when you have submitted the CLA and by what means you did so. This will enable us to monitor its progress. We will arrange for your Apache user account when the CLA has been recorded. After that is done, please make follow-up replies to the shardingsphere-dev list. We generally discuss everything there and keep the private@shardingsphere.apache.org list for occasional matters which must be private. The developer section of the website describes the roles and provides other resources: http://www.apache.org/foundation/how-it-works.html http://www.apache.org/dev/ The incubator also has some useful information for new committers in incubating projects: http://incubator.apache.org/guides/committer.html Just as before you became a committer, participation in any ASF community requires adherence to the ASF Code of Conduct: https://www.apache.org/foundation/policies/conduct.html Here is the guideline for all of the ShardingSphere committers: https://shardingsphere.apache.org/community/en/contribute/committer/ ``` **7. 准Committer签署iCLA 具体步骤参考[签署iCLA指南](https://shardingsphere.apache.org/community/cn/contribute/icla/)。** **8. 等待Secretary通知创建账户。** **9. PMC添加新Committer到[roster](https://whimsy.apache.org/roster/committee/shardingsphere)。** **10. 新Committer开通github权限,完成[Setup](https://gitbox.apache.org/setup/)内容。** **11. PMC在社区宣布并欢迎新的Committer加入。** ``` To: dev@shardingsphere.apache.org Title: [ANNOUNCE] New committer: (提名者) Content: Hi community, The Project Management Committee (PMC) for Apache ShardingSphere has invited (提名者) to become a committer and we are pleased to announce that he has accepted. (提名者) is active in ShardingSphere community, hope see your further interactions with the community! Thanks for your contributions. ``` **12. 新Commiter更新[提交者名单](/cn/team/)。** **13. 如果进行PMC选举,需额外增加一个步骤。由投票发起人发邮件到 board@apache.org。** ``` The Apache ShardingSphere project proposes to invite (提名者) to join the PMC. The vote result is available here: (投票详情链接) Thank you, (发起人) ```
原创文章,需联系作者,授权转载
上一篇:如何参与和贡献ShardingSphere(中)
下一篇:【JUST产品手册连载1】JUST产品概述
Apache ShardingSphere
文章数
96
阅读量
231327
作者其他文章
01
突破关系型数据库桎梏:云原生数据库中间件核心剖析
数据库技术的发展与变革方兴未艾,NewSQL的出现,只是将各种所需技术组合在一起,而这些技术组合在一起所实现的核心功能,推动着云原生数据库的发展。 NewSQL的三种分类中,新架构和云数据库涉及了太多与数据库相关的底层实现,为了保证本文的范围不至太过发散,我们重点介绍透明化分片数据库中间件的核心功能与实现原理,另外两种类型的NewSQL在核心功能上类似,但实现原理会有所差别。
01
Apache ShardingSphere数据脱敏全解决方案详解(上)
Apache ShardingSphere针对新业务上线、旧业务改造分别提供了相应的全套脱敏解决方案。
01
Shardingsphere整合Narayana对XA分布式事务的支持(4)
ShardingSphere对于XA方案,提供了一套SPI解决方案,对Narayana进行了整合,Narayana初始化流程,开始事务流程,获取连接流程,提交事务流程,回滚事务流程。
01
从中间件到分布式数据库生态,ShardingSphere 5.x革新变旧
5.x 是 Apache ShardingSphere从分库分表中间件向分布式数据库生态转化的里程碑,从 4.x 版本后期开始打磨的可插拔架构在 5.x 版本已逐渐成型,项目的设计理念和 API 都进行了大幅提升。欢迎大家测试使用!
最新回复
丨
点赞排行
共0条评论
Apache ShardingSphere
文章数
96
阅读量
231327
作者其他文章
01
突破关系型数据库桎梏:云原生数据库中间件核心剖析
01
Apache ShardingSphere数据脱敏全解决方案详解(上)
01
Shardingsphere整合Narayana对XA分布式事务的支持(4)
01
从中间件到分布式数据库生态,ShardingSphere 5.x革新变旧
添加企业微信
获取1V1专业服务
扫码关注
京东云开发者公众号