Skip to content

Commit e5c199a

Browse files
committed
Move docs to jenkins.io
1 parent 2494781 commit e5c199a

File tree

1 file changed

+1
-146
lines changed

1 file changed

+1
-146
lines changed

README.md

Lines changed: 1 addition & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -263,152 +263,7 @@ to fix it up.
263263

264264
### Superseding Maven releases
265265

266-
If you want to use Incrementals _instead_ of MRP,
267-
you can override `changelist.format` in your project (the default value is `-rc%d.%s`).
268-
269-
For a regular component whose version number is not intrinsically meaningful:
270-
271-
```diff
272-
--- a/.mvn/extensions.xml
273-
+++ b/.mvn/extensions.xml
274-
@@ -2,6 +2,6 @@
275-
<extension>
276-
<groupId>io.jenkins.tools.incrementals</groupId>
277-
<artifactId>git-changelist-maven-extension</artifactId>
278-
- <version>1.0-beta-7</version>
279-
+ <version>1.1</version>
280-
</extension>
281-
</extensions>
282-
--- a/.mvn/maven.config
283-
+++ b/.mvn/maven.config
284-
@@ -1,2 +1,3 @@
285-
-Pconsume-incrementals
286-
-Pmight-produce-incrementals
287-
+-Dchangelist.format=%d.v%s
288-
--- a/pom.xml
289-
+++ b/pom.xml
290-
@@ -7,7 +7,7 @@
291-
- <version>${revision}${changelist}</version>
292-
+ <version>${changelist}</version>
293-
<packaging>hpi</packaging>
294-
@@ -26,8 +26,7 @@
295-
<properties>
296-
- <revision>1.23</revision>
297-
- <changelist>-SNAPSHOT</changelist>
298-
+ <changelist>999999-SNAPSHOT</changelist>
299-
<jenkins.version>2.176.4</jenkins.version>
300-
<java.level>8</java.level>
301-
</properties>
302-
```
303-
304-
Here a CI/release build (`-Dset.changelist` specified) will be of the form `123.vabcdef456789`.
305-
A snapshot build will be `999999-SNAPSHOT`: arbitrary but treated as a snapshot by Maven and newer than any release.
306-
307-
For a component whose version number ought to reflect a release version of some wrapped component:
308-
309-
```diff
310-
--- a/.mvn/extensions.xml
311-
+++ b/.mvn/extensions.xml
312-
@@ -2,6 +2,6 @@
313-
<extension>
314-
<groupId>io.jenkins.tools.incrementals</groupId>
315-
<artifactId>git-changelist-maven-extension</artifactId>
316-
- <version>1.0-beta-7</version>
317-
+ <version>1.1</version>
318-
</extension>
319-
</extensions>
320-
--- a/.mvn/maven.config
321-
+++ b/.mvn/maven.config
322-
@@ -1,2 +1,3 @@
323-
-Pconsume-incrementals
324-
-Pmight-produce-incrementals
325-
+-Dchangelist.format=%d.v%s
326-
--- a/pom.xml
327-
+++ b/pom.xml
328-
@@ -10,12 +10,12 @@
329-
<artifactId>some-library-wrapper</artifactId>
330-
- <version>${revision}${changelist}</version>
331-
+ <version>${revision}-${changelist}</version>
332-
<packaging>hpi</packaging>
333-
<properties>
334-
- <revision>4.0.0-1.3</revision>
335-
- <changelist>-SNAPSHOT</changelist>
336-
+ <revision>4.0.0</revision>
337-
+ <changelist>999999-SNAPSHOT</changelist>
338-
<jenkins.version>2.176.4</jenkins.version>
339-
<java.level>8</java.level>
340-
```
341-
342-
Here the version numbers will look like `4.0.0-123.vabcdef456789` or `4.0.0-999999-SNAPSHOT`, respectively.
343-
When you pick up a new third-party component like `4.0.1`, your version numbers will match;
344-
to refer to the third-party component, just use
345-
346-
```xml
347-
<version>${revision}</version>
348-
```
349-
350-
Since inadvertently running MRP on such a project would result in a mess,
351-
it is best to explicitly prevent that.
352-
This is done automatically by the plugin and general component parent POMs
353-
when you define the `changelist.format` property.
354-
355-
#### Automatic deployment
356-
357-
If you have configured `changelist.format` as above,
358-
using [JEP-229](https://jenkins.io/jep/229) you can then set up automatic publishing of artifacts.
359-
360-
First, file a patch to your component’s entry(ies) in [RPU](https://github.com/jenkins-infra/repository-permissions-updater/tree/master/permissions) to add
361-
362-
```yaml
363-
cd:
364-
enabled: true
365-
```
366-
367-
Once that has been merged, start checking `https://github.com/jenkinsci/your-plugin/settings/secrets/actions`
368-
and you should soon see `MAVEN_TOKEN` and `MAVEN_USERNAME` appear under **Repository secrets**.
369-
370-
Next, if you already have Release Drafter configured,
371-
remove any `tag-template` override in `.github/release-drafter.yml`,
372-
and delete `.github/workflows/release-drafter.yml` if using GitHub Actions (or remove the app from the repo otherwise).
373-
If you have not yet configured Release Drafter, just create `.github/release-drafter.yml` containing only
374-
375-
```yaml
376-
_extends: .github
377-
```
378-
379-
If you have a `.github/dependabot.yml`, it is a good idea to add
380-
381-
```yaml
382-
- package-ecosystem: github-actions
383-
directory: /
384-
schedule:
385-
interval: daily
386-
```
387-
388-
Finally create `.github/workflows/cd.yaml` as a copy of [this template](https://github.com/jenkinsci/.github/blob/master/workflow-templates/cd.yaml).
389-
390-
Now whenever Jenkins reports a successful build of your default branch,
391-
and at least one pull request had a label indicating it was of interest to users (e.g. `enhancement` rather than `chore`),
392-
your component will be released to Artifactory and release notes published in GitHub.
393-
You do not need any special credentials or local checkout;
394-
just merge pull requests with suitable titles and [labels](https://github.com/jenkinsci/.github/blob/7baf6188c5dbe8f872bd7f4e13e1aaeee0b2e279/.github/release-drafter.yml#L9-L49).
395-
396-
You can also trigger a deployment explicitly, if the current commit has a passing check from Jenkins.
397-
Visit `https://github.com/jenkinsci/your-plugin/actions?query=workflow%3Acd` and click **Run workflow**.
398-
If you prefer to only deploy explicitly, not on every push, just comment out the `check_run` section above.
399-
400-
(Do not be alarmed to see numerous failed `cd` workflows besides the passing ones that actually deployed:
401-
every check posted other than the top-level `Jenkins` check triggers a workflow which should quickly fail.)
402-
403-
As a fallback, you can also release manually if you have
404-
[personal deployment credentials](https://github.com/jenkins-infra/repository-permissions-updater).
405-
To cut a release:
406-
407-
```bash
408-
git checkout master
409-
git pull --ff-only
410-
mvn -Dset.changelist -DaltDeploymentRepository=maven.jenkins-ci.org::default::https://repo.jenkins-ci.org/releases/ clean deploy
411-
```
266+
See [Setting up automated plugin release](https://www.jenkins.io/redirect/continuous-delivery-of-plugins)
412267

413268
## Usage in other POMs
414269

0 commit comments

Comments
 (0)