Skip to content

Commit 9d1b34d

Browse files
authored
Adds release workflows to onboard to new release process (#321) (#345)
* Add release workflows Signed-off-by: Sayali Gaikawad <[email protected]> (cherry picked from commit c171531)
1 parent 037d488 commit 9d1b34d

File tree

5 files changed

+47
-96
lines changed

5 files changed

+47
-96
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release drafter
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
draft-a-release:
10+
name: Draft a release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
- name: Set up JDK 11
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: 11
19+
- name: Build with Gradle
20+
run: |
21+
./gradlew --no-daemon publishPublishMavenPublicationToLocalRepoRepository && tar -C build -cvf artifacts.tar.gz repository
22+
- name: Draft a release
23+
uses: softprops/action-gh-release@v1
24+
with:
25+
draft: true
26+
generate_release_notes: true
27+
files: |
28+
artifacts.tar.gz

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
88
- Add Github workflow for dependabot PRs ([#247](https://github.com/opensearch-project/opensearch-java/pull/247))
99
- Add support for signing service name in AwsSdk2Transport ([#324](https://github.com/opensearch-project/opensearch-java/pull/324))
1010
- Add new OpenSearchTransport based on Apache HttpClient 5 ([#328](https://github.com/opensearch-project/opensearch-java/pull/328))
11+
- Add 1-click release workflows ([#321](https://github.com/opensearch-project/opensearch-java/pull/321))
1112

1213
### Dependencies
1314
- Bumps `grgit-gradle` from 4.0.1 to 5.0.0

RELEASING.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,5 @@ Repositories create consistent release labels, such as `v1.0.0`, `v1.1.0` and `v
3434
The release process is standard across repositories in this org and is run by a release manager volunteering from amongst [MAINTAINERS](MAINTAINERS.md).
3535

3636
1. Create a tag, e.g. `v2.1.0`, and push it to the GitHub repo.
37-
2. The [opensearch-java-maven-sign-and-release/](https://build.ci.opensearch.org/job/opensearch-java-maven-sign-and-release/) will be automatically kicked off.
38-
3. Login to [AWS OSS Sonatype](https://aws.oss.sonatype.org/#stagingRepositories), and locate the staged release.
39-
4. `Close` the staged repository, and ensure all checks pass.
40-
5. `Release` the staged respository.
41-
6. [Create a release on GitHub](https://github.com/opensearch-project/opensearch-java/releases/new) with release notes.
42-
7. Increment `systemProp.version` in [gradle.properties](gradle.properties) to the next patch release, e.g. `v2.1.1`, commit and push.
37+
2. This creates a draft release which triggers the [opensearch-java-maven-sign-and-release/](https://build.ci.opensearch.org/job/opensearch-java-maven-sign-and-release/) jenkins workflow. The artifacts will be automcatically signed and published to maven.
38+
3. Increment `systemProp.version` in [gradle.properties](gradle.properties) to the next patch release, e.g. `v2.1.1`, commit and push.

jenkins/release.jenkinsFile

Lines changed: 16 additions & 0 deletions
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-java-generic-webhook-token',
8+
causeString: 'A tag was cut on opensearch-project/opensearch-java repository causing this workflow to run',
9+
downloadReleaseAsset: true,
10+
publishRelease: true) {
11+
publishToMaven(
12+
signingArtifactsPath: "$WORKSPACE/repository/",
13+
mavenArtifactsPath: "$WORKSPACE/repository/",
14+
autoPublish: true
15+
)
16+
}

jenkins/stage-maven-release.jenkinsfile

Lines changed: 0 additions & 90 deletions
This file was deleted.

0 commit comments

Comments
 (0)