Skip to content

Commit 8cf38d5

Browse files
authored
Added Jenkins file and RELEASING.md (#840)
* Add release workflow jenkins file Signed-off-by: Owais Kazi <[email protected]> * Added jenkins file and RELEASING.md Signed-off-by: Owais Kazi <[email protected]> --------- Signed-off-by: Owais Kazi <[email protected]>
1 parent 0322b33 commit 8cf38d5

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

RELEASING.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
- [Overview](#overview)
2+
- [Branching](#branching)
3+
- [Release Branching](#release-branching)
4+
- [Feature Branches](#feature-branches)
5+
- [Releasing](#releasing)
6+
- [Snapshots](#snapshot-builds)
7+
8+
## Overview
9+
10+
This document explains the release strategy for artifacts in this organization.
11+
12+
## Branching
13+
14+
### Release Branching
15+
16+
Given the current major release of 1.0, projects in this organization maintain the following active branches.
17+
18+
* **main**: The next _major_ release. This is the branch where all merges take place and code moves fast.
19+
* **1.x**: The next _minor_ release. Once a change is merged into `main`, decide whether to backport it to `1.x`.
20+
21+
Label PRs with the next major version label (e.g. `2.0.0`) and merge changes into `main`. Label PRs that you believe need to be backported as `1.x`. Backport PRs by checking out the versioned branch, cherry-pick changes and open a PR against each target backport branch.
22+
23+
### Feature Branches
24+
25+
Do not create branches in the upstream repo, use your fork, for the exception to long-lasting feature branches that require active collaboration from multiple developers. Name feature branches `feature/<name>`. Once the work is merged to `main`, please make sure to delete the feature branch.
26+
27+
## Releasing
28+
29+
The release process is standard across repositories in this org and is run by a release manager volunteering from amongst [maintainers](MAINTAINERS.md).
30+
31+
1. Create a tag, e.g. 1.0.0, and push it to this GitHub repository.
32+
2. The [release-drafter.yml](.github/workflows/release-drafter.yml) will be automatically kicked off and a draft release will be created.
33+
3. This draft release triggers the [jenkins release workflow](https://build.ci.opensearch.org/job/opensearch-sdk-java-release) as a result of which the sdk is released on [maven central](https://search.maven.org/search?q=org.opensearch.sdk). Please note that the release workflow is triggered only if created release is in draft state.
34+
4. Once the above release workflow is successful, the drafted release on GitHub is published automatically.
35+
5. Increment "version" in [build.gradle](https://github.com/opensearch-project/opensearch-sdk-java/blob/main/build.gradle#L79) to the next iteration, e.g. v1.0.1.
36+
37+
## Snapshot Builds
38+
The [snapshots builds](https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/sdk/opensearch-sdk-java/) are published to sonatype using [publish-snapshots.yml](./.github/workflows/publish-snapshots.yml) workflow. Each `push` event to the main branch triggers this workflow.

jenkins/release.jenkinsFile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
lib = library(identifier: '[email protected]', retriever: modernSCM([
2+
$class: 'GitSCMSource',
3+
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
4+
]))
5+
6+
standardReleasePipelineWithGenericTrigger(
7+
tokenIdCredential: 'jenkins-opensearch-sdk-java-generic-webhook-token',
8+
causeString: 'A tag was cut on opensearch-project/opensearch-sdk-java repository causing this workflow to run',
9+
downloadReleaseAsset: true,
10+
publishRelease: false) {
11+
publishToMaven(
12+
signingArtifactsPath: "$WORKSPACE/repository/",
13+
mavenArtifactsPath: "$WORKSPACE/repository/",
14+
autoPublish: false
15+
)
16+
}

0 commit comments

Comments
 (0)