|
1 | | -# 1. Upgrade version |
| 1 | +# Apollo Release Guide (Skill-driven) |
2 | 2 |
|
3 | | -Replace the version number in full under the Apollo project, e.g. 1.9.1-SNAPSHOT to 1.9.1. Be sure to replace the non-version number in the process. |
| 3 | +This guide is for teams using Codex / Claude Code to trigger release skills via natural language. |
| 4 | +The goal is to minimize manual operations, standardize release quality, and keep human confirmation before critical external actions. |
4 | 5 |
|
5 | | -# 2. Writing Release Reports |
| 6 | +## 1. Scope and recommended order |
6 | 7 |
|
7 | | -Each PR between two versions is recorded in [https://github.com/apolloconfig/apollo/blob/master/CHANGES.md](https://github.com/apolloconfig/apollo/blob/master/CHANGES.md), so you only need to extract it from CHANGES.md to write the release report. Release report reference: [https://github.com/apolloconfig/apollo/releases/tag/v1.8.0](https://github.com/apolloconfig/apollo/releases/tag/v1.8.0) |
| 8 | +The Apollo release process is covered by three skills: |
8 | 9 |
|
9 | | -# 3. Version validation |
| 10 | +1. `apollo-java-release` for `apolloconfig/apollo-java` |
| 11 | +2. `apollo-release` for `apolloconfig/apollo` |
| 12 | +3. `apollo-helm-chart-release` for `apolloconfig/apollo-helm-chart` |
10 | 13 |
|
11 | | -Version validation consists of three main areas of validation. |
| 14 | +Recommended order: |
12 | 15 |
|
13 | | -1. Verification of newly introduced code changes, such as new features, bugfixes |
14 | | -1. Apollo core main process validation, including: configuration release, dynamic push, grayscale push, etc. |
15 | | -1. upgrade process validation, including: classic deployment mode, docker mode, k8s mode |
| 16 | +1. Release `apollo-java-release` first (no dependency on other release flows) |
| 17 | +2. Release `apollo-release` second (usually depends on the new Java SDK version) |
| 18 | +3. Release `apollo-helm-chart-release` last |
16 | 19 |
|
17 | | -# 4. Version release |
| 20 | +> If a release does not involve one repository, you can skip that sub-flow. |
18 | 21 |
|
19 | | -## 4.1 Tagging |
| 22 | +## 2. Preparation |
20 | 23 |
|
21 | | -1. Pull the latest code from master |
22 | | - 1. git pull origin master |
23 | | -2. Tag |
24 | | - 1. git tag ${new-version} |
25 | | -3. Push tag |
26 | | - 1. git push origin tag ${new-version} |
| 24 | +### 2.1 Permissions and tools |
27 | 25 |
|
28 | | -## 4.2 Packages |
| 26 | +- GitHub permissions for PR, Release, Workflow, Discussion, and Milestone operations |
| 27 | +- Required local commands: `git`, `gh`, `python3`, `jq` |
| 28 | +- Additional command for Helm chart release: `helm` |
29 | 29 |
|
30 | | -### 4.2.1 Pre-checking |
| 30 | +### 2.2 Repository and branch state |
31 | 31 |
|
32 | | -Before packaging, check your local environment, mvn -v to make sure the java version is 1.8, e.g. the following output. |
| 32 | +- Keep each target repository clean before starting |
| 33 | +- Ensure base branches are up to date (`master` for `apollo`, default branch for other repos) |
33 | 34 |
|
34 | | -> mvn -v |
35 | | -> Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d) Maven home: /usr/local/Cellar/maven/3.8.1/libexec |
36 | | -> Java version: 1.8.0_301, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_301.jdk/Contents/Home/jre |
37 | | -> Default locale: zh_CN, platform encoding: UTF-8 |
38 | | -> OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac" |
| 35 | +### 2.3 Release inputs to prepare |
39 | 36 |
|
40 | | -### 4.2.2 Packages |
| 37 | +- Release version (for example `2.8.0`) |
| 38 | +- Next development version (for example `2.9.0-SNAPSHOT`) |
| 39 | +- Highlights PR list (for example `PR_ID_1,PR_ID_2,PR_ID_3`) |
41 | 40 |
|
42 | | -In the ${apollo_home}/scripts/ directory, execute. |
| 41 | +### 2.4 Install release skills (Codex / Claude Code) |
43 | 42 |
|
44 | | -> . /build.sh |
| 43 | +Before using the flows in this guide, install these three skills first: |
45 | 44 |
|
46 | | -If the following error is reported. |
| 45 | +- `apollo-java-release` |
| 46 | +- `apollo-release` |
| 47 | +- `apollo-helm-chart-release` |
47 | 48 |
|
48 | | -> zsh: . /build.sh: bad interpreter: /bin/sh^M: no such file or directory |
| 49 | +Recommended approach (natural language): |
49 | 50 |
|
50 | | -Then you need to execute the following command to convert to unix |
| 51 | +1. Use `skill-installer` in a Codex session |
| 52 | +2. Set the source to the full GitHub URL: `https://github.com/apolloconfig/apollo-skills` |
| 53 | +3. Install the three skills above |
51 | 54 |
|
52 | | -> brew install dos2unix |
53 | | -> dos2unix build.sh |
| 55 | +Example natural-language request: |
54 | 56 |
|
55 | | -### 4.2.3 Calculating checksum for build packages |
| 57 | +- “Use `skill-installer` to install `apollo-java-release`, `apollo-release`, and `apollo-helm-chart-release` from `https://github.com/apolloconfig/apollo-skills`.” |
56 | 58 |
|
57 | | -To calculate configservice checksum |
| 59 | +If you prefer manual setup, place these skill folders into your local skill directory (usually `$CODEX_HOME/skills` or `~/.codex/skills`) and restart the client. |
58 | 60 |
|
59 | | -> In the ${apollo_home}/apollo-configservice/target/ directory, execute. |
60 | | -> |
61 | | -> shasum apollo-configservice-${new-version}-github.zip > apollo-configservice-${new-version}-github.zip.sha1 |
| 61 | +## 3. Release Apollo Java (`apollo-java-release`) |
62 | 62 |
|
63 | | -Calculate adminservice checksum |
| 63 | +### 3.1 How to trigger (natural language) |
64 | 64 |
|
65 | | -> In the ${apollo_home}/apollo-adminservice/target/ directory, execute. |
66 | | -> |
67 | | -> shasum apollo-adminservice-${new-version}-github.zip > apollo-adminservice-${new-version}-github.zip.sha1 |
| 65 | +In the `apollo-java` workspace session, ask with a prompt like: |
68 | 66 |
|
69 | | -Calculate portal checksum |
| 67 | +- "Use `apollo-java-release` to publish `X.Y.Z`, next version `A.B.C-SNAPSHOT`, and use these PRs for highlights: `...`" |
70 | 68 |
|
71 | | -> In the ${apollo_home}/apollo-portal/target/ directory, execute. |
72 | | -> |
73 | | -> shasum apollo-portal-${new-version}-github.zip > apollo-portal-${new-version}-github.zip.sha1 |
| 69 | +### 3.2 What the skill automates |
74 | 70 |
|
75 | | -## 4.3 Creating a pre-release |
| 71 | +- Version bump PR (`revision` from SNAPSHOT to release) |
| 72 | +- Prerelease creation |
| 73 | +- Trigger `release.yml` and wait for Sonatype Central publish completion |
| 74 | +- Announcement discussion publishing |
| 75 | +- Post-release snapshot bump and post-release PR |
| 76 | +- Prerelease promotion to official release |
76 | 77 |
|
77 | | -Github create pre-release |
| 78 | +### 3.3 Checkpoint interaction model |
78 | 79 |
|
79 | | - |
| 80 | +- The skill pauses automatically before critical external actions and asks whether to continue |
| 81 | +- You respond in chat to continue, or request edits before proceeding |
80 | 82 |
|
81 | | -Fill out the Release Note & upload the package |
| 83 | +## 4. Release Apollo Server (`apollo-release`) |
82 | 84 |
|
83 | | - |
| 85 | +### 4.1 How to trigger (natural language) |
84 | 86 |
|
85 | | -## 4.4 Pre-release Apollo-Client Jar Package |
| 87 | +In the `apollo` workspace session, ask with a prompt like: |
86 | 88 |
|
87 | | -Publish via github workflow. |
| 89 | +- "Use `apollo-release` to publish `X.Y.Z`, next version `A.B.C-SNAPSHOT`, with highlights PRs `...`" |
88 | 90 |
|
89 | | -[https://github.com/apolloconfig/apollo-java/actions/workflows/release.yml](https://github.com/apolloconfig/apollo-java/actions/workflows/release.yml) |
| 91 | +### 4.2 What the skill automates |
90 | 92 |
|
91 | | - |
| 93 | +- Version bump PR (`pom.xml` `revision`) |
| 94 | +- Release notes and announcement draft generation from `CHANGES.md` |
| 95 | +- Prerelease creation (`vX.Y.Z`) |
| 96 | +- Package build + checksum upload via GitHub Actions |
| 97 | +- Docker publish workflow trigger |
| 98 | +- Prerelease promotion to official release |
| 99 | +- Announcement discussion publishing |
| 100 | +- Post-release snapshot bump, `CHANGES.md` archive, milestone updates, and post-release PR |
92 | 101 |
|
93 | | -> Note: If you are releasing a SNAPSHOT version, use the default value snapshots. If you are releasing an official version (without SNAPSHOT), you need to change it to releases to make it work. |
| 102 | +### 4.3 Checkpoint interaction model |
94 | 103 |
|
95 | | -## 4.5 Release PMC Polling |
| 104 | +Same model as `apollo-java-release`: |
96 | 105 |
|
97 | | -Polling is used to allow PMC members to collaborate on verifying the content of a release and preventing problematic releases. |
98 | | -The polling takes the form of a thread in Discussions, available at [https://github.com/apolloconfig/apollo/discussions/3899](https://github.com/apolloconfig/apollo/discussions/3899) |
| 106 | +- System prompts appear at checkpoints |
| 107 | +- You can continue or request adjustments (highlights, notes, parameters) |
99 | 108 |
|
100 | | -## 4.6 Official release of Apollo-Client Jar to repositories |
| 109 | +## 5. Release Helm Charts (`apollo-helm-chart-release`) |
101 | 110 |
|
102 | | -## 4.7 Release Docker image |
| 111 | +### 5.1 How to trigger (natural language) |
103 | 112 |
|
104 | | -## 4.7.1 Build the image locally and test it |
| 113 | +In the `apollo-helm-chart` workspace session, ask with a prompt like: |
105 | 114 |
|
106 | | -With the package packed in step 4.2, execute in the apollo root directory |
| 115 | +- "Use `apollo-helm-chart-release` to publish the current chart version changes" |
107 | 116 |
|
108 | | -> mvn docker:build -pl apollo-configservice,apollo-adminservice,apollo-portal |
| 117 | +### 5.2 What the skill automates |
109 | 118 |
|
110 | | -Note: If you get an error, you may need to restart the local docker |
| 119 | +- Chart version change detection and consistency checks |
| 120 | +- `helm lint`, `helm package`, and `helm repo index` |
| 121 | +- File whitelist checks to prevent accidental commits |
| 122 | +- Branch and commit draft generation |
| 123 | +- Pause before push / PR for explicit confirmation (no auto-push/no auto-PR by default) |
111 | 124 |
|
112 | | -### 4.7.2 Push image to repository |
| 125 | +## 6. Unified post-release verification |
113 | 126 |
|
114 | | -Publish via github workflow. |
| 127 | +At minimum, verify: |
115 | 128 |
|
116 | | -[https://github.com/apolloconfig/apollo/actions/workflows/docker-publish.yml](https://github.com/apolloconfig/apollo/actions/workflows/docker-publish.yml) |
| 129 | +1. Apollo release page includes 3 zip files and 3 sha1 files |
| 130 | +2. Docker image tags are available |
| 131 | +3. `apollo-java` artifacts are available in Maven Central |
| 132 | +4. Helm repository `docs/index.yaml` includes the new chart versions |
| 133 | +5. Core smoke tests pass (config publish, gray release, client fetch, portal core flows) |
117 | 134 |
|
118 | | - |
| 135 | +## 7. Common operations (skill usage perspective) |
119 | 136 |
|
120 | | -## 4.8 Update helm chart |
| 137 | +### 7.1 Resume after interruption |
121 | 138 |
|
122 | | -### 4.8.1 Update the contents of the chart |
| 139 | +Ask directly in chat, for example: |
123 | 140 |
|
124 | | -1. cd [apollo-helm-chart](https://github.com/apolloconfig/apollo-helm-chart) |
125 | | -2. helm package apollo-portal && helm package apollo-service |
126 | | -3. mv *.tgz docs |
127 | | -4. cd docs |
128 | | -5. helm repo index . |
| 141 | +- "Continue the previous release flow" |
| 142 | +- "Resume from the next checkpoint" |
129 | 143 |
|
130 | | -### 4.8.2 Merging branches into main |
| 144 | +The skill restores from state and does not repeat completed steps. |
131 | 145 |
|
132 | | -Create a pull request to merge the above products into the [main](https://github.com/apolloconfig/apollo-helm-chart) branch. |
| 146 | +### 7.2 Dry run first |
133 | 147 |
|
134 | | -# 5. Release announcement |
| 148 | +Request a dry run first, for example: |
135 | 149 |
|
136 | | -Reference: [https://github.com/apolloconfig/apollo/discussions/3740](https://github.com/apolloconfig/apollo/discussions/3740) |
| 150 | +- "Run `apollo-release` in dry-run mode first so I can review the plan" |
| 151 | + |
| 152 | +Then request the real run after confirmation. |
| 153 | + |
| 154 | +### 7.3 Adjust highlights / wording |
| 155 | + |
| 156 | +Before prerelease creation, ask for adjustments, for example: |
| 157 | + |
| 158 | +- "Use these PRs for highlights: `...`, then regenerate release notes" |
| 159 | + |
| 160 | +After review, continue to the next checkpoint. |
0 commit comments