Skip to content

Conversation

tsunghanjacktsai
Copy link
Contributor

@tsunghanjacktsai tsunghanjacktsai commented Sep 19, 2022

Make sure set the target branch to develop

What is the purpose of the change

Support auto snapshot deployment of Apache RocketMQ daily.

This pull request is to fix #5121

Brief changelog

The snapshot deployment job will be triggered by Jenkins under two conditions:

  • Check if there's any update in RocketMQ Git repo every 2 hours, it will start working if there are new commits.
  • Run without commit check every 12 hours (in case the first rule has been triggered but the CI is still pending)

The Jenkins will do the following steps:

  1. Check if the current commit has already been deployed.
  2. Check the current commit has passed the CI.
  3. Check the current project is using the snapshot version.
  4. Do snapshot deployment.
  5. Save the current commit id.

Verifying this change

Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

@lizhanhui
Copy link
Contributor

@tsunghanjacktsai Can this feature be implemented using Github Action? Best to have all the infra central and consistent.

Copy link
Contributor

@lizhanhui lizhanhui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use GitHub Action If possible

@aaron-ai
Copy link
Member

aaron-ai commented Sep 19, 2022

@tsunghanjacktsai
Copy link
Contributor Author

Let's embrace GitHub Action.

Here is an example if you need: https://github.com/codecentric/cxf-spring-boot-starter/blob/master/.github/workflows/release-to-maven-central.yml

OK, got it.

@lizhanhui lizhanhui changed the title Add Jenkinsfile for RocketMQ Snapshot Deployment Add GitHub Action Pipeline to automate release of RocketMQ Snapshots Sep 19, 2022
@lizhanhui lizhanhui changed the title Add GitHub Action Pipeline to automate release of RocketMQ Snapshots [ISSUE #5121]Add GitHub Action Pipeline to automate release of RocketMQ Snapshots Sep 19, 2022
@lizhanhui lizhanhui requested a review from aaron-ai September 19, 2022 12:36
@tsunghanjacktsai tsunghanjacktsai force-pushed the develop branch 2 times, most recently from d186f68 to 608ca32 Compare September 20, 2022 02:51
@lizhanhui
Copy link
Contributor

The pipeline file may be named either automate-snapshot.yml or snapshot-automation.yml

The current file name sounds weird.

@tsunghanjacktsai tsunghanjacktsai force-pushed the develop branch 3 times, most recently from be65674 to 7c9fea8 Compare September 20, 2022 03:02
@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2022

Codecov Report

Merging #5118 (608ca32) into develop (96f340d) will decrease coverage by 0.02%.
The diff coverage is n/a.

❗ Current head 608ca32 differs from pull request most recent head 7c9fea8. Consider uploading reports for the commit 7c9fea8 to get more accurate results

@@              Coverage Diff              @@
##             develop    #5118      +/-   ##
=============================================
- Coverage      43.28%   43.26%   -0.03%     
- Complexity      7800     7801       +1     
=============================================
  Files            997      997              
  Lines          69349    69349              
  Branches        9168     9168              
=============================================
- Hits           30019    30005      -14     
- Misses         35553    35572      +19     
+ Partials        3777     3772       -5     
Impacted Files Coverage Δ
...org/apache/rocketmq/store/ha/WaitNotifyObject.java 80.35% <0.00%> (-5.36%) ⬇️
...apache/rocketmq/remoting/netty/ResponseFuture.java 77.55% <0.00%> (-4.09%) ⬇️
...rocketmq/remoting/netty/NettyRemotingAbstract.java 49.27% <0.00%> (-3.63%) ⬇️
...e/rocketmq/remoting/netty/NettyRemotingClient.java 40.21% <0.00%> (-3.52%) ⬇️
...cketmq/broker/schedule/ScheduleMessageService.java 55.26% <0.00%> (-1.18%) ⬇️
...ent/impl/consumer/DefaultLitePullConsumerImpl.java 69.37% <0.00%> (-0.63%) ⬇️
.../apache/rocketmq/logging/inner/LoggingBuilder.java 63.60% <0.00%> (-0.16%) ⬇️
...ava/org/apache/rocketmq/filter/util/BitsArray.java 59.82% <0.00%> (ø)
.../org/apache/rocketmq/proxy/config/ProxyConfig.java 49.74% <0.00%> (ø)
.../apache/rocketmq/store/ha/DefaultHAConnection.java 67.06% <0.00%> (ø)
... and 9 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@tsunghanjacktsai tsunghanjacktsai force-pushed the develop branch 3 times, most recently from 9c84125 to dd37c03 Compare September 26, 2022 13:27
@tsunghanjacktsai
Copy link
Contributor Author

@lizhanhui @aaron-ai I've got the GitHub secrets and attached them within the Action. Please have a review again. Appreciate it.

@tsunghanjacktsai tsunghanjacktsai requested review from lizhanhui and aaron-ai and removed request for lizhanhui and aaron-ai September 28, 2022 02:02
@tsunghanjacktsai tsunghanjacktsai requested review from mxsm, lizhanhui and aaron-ai and removed request for lizhanhui and mxsm September 28, 2022 02:02
@lizhanhui
Copy link
Contributor

Let's try it out.

@lizhanhui lizhanhui merged commit 937e231 into apache:develop Sep 28, 2022
drpmma pushed a commit that referenced this pull request Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automate release of RocketMQ versions to maven repository
5 participants