Skip to content

Commit

Permalink
Adds release workflows to onboard to new release process (opensearch-…
Browse files Browse the repository at this point in the history
…project#321)

* Add release workflows

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>

* Fix java

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>

* Add new release jenkinsFile

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>

* Modify releasing.md

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>

* Changelog

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>

* Fix changelog

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
  • Loading branch information
gaiksaya authored Jan 13, 2023
1 parent f1fbe83 commit c171531
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 96 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release drafter

on:
push:
tags:
- "*"

jobs:
draft-a-release:
name: Draft a release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Gradle
run: |
./gradlew --no-daemon publishPublishMavenPublicationToLocalRepoRepository && tar -C build -cvf artifacts.tar.gz repository
- name: Draft a release
uses: softprops/action-gh-release@v1
with:
draft: true
generate_release_notes: true
files: |
artifacts.tar.gz
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Github workflow for changelog verification ([#239](https://github.com/opensearch-project/opensearch-java/pull/239))
- Github workflow for dependabot PRs ([#247](https://github.com/opensearch-project/opensearch-java/pull/247))
- Add javadoc link for the client ([#255](https://github.com/opensearch-project/opensearch-java/pull/255))
- Add 1-click release workflows ([#321](https://github.com/opensearch-project/opensearch-java/pull/321))
### Dependencies
- Bumps `classgraph` from 4.8.149 to 4.8.154

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

1. Create a tag, e.g. `v2.1.0`, and push it to the GitHub repo.
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.
3. Login to [AWS OSS Sonatype](https://aws.oss.sonatype.org/#stagingRepositories), and locate the staged release.
4. `Close` the staged repository, and ensure all checks pass.
5. `Release` the staged respository.
6. [Create a release on GitHub](https://github.com/opensearch-project/opensearch-java/releases/new) with release notes.
7. Increment `systemProp.version` in [gradle.properties](gradle.properties) to the next patch release, e.g. `v2.1.1`, commit and push.
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.
3. Increment `systemProp.version` in [gradle.properties](gradle.properties) to the next patch release, e.g. `v2.1.1`, commit and push.
16 changes: 16 additions & 0 deletions jenkins/release.jenkinsFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
lib = library(identifier: 'jenkins@1.5.3', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))

standardReleasePipelineWithGenericTrigger(
tokenIdCredential: 'jenkins-opensearch-java-generic-webhook-token',
causeString: 'A tag was cut on opensearch-project/opensearch-java repository causing this workflow to run',
downloadReleaseAsset: true,
publishRelease: true) {
publishToMaven(
signingArtifactsPath: "$WORKSPACE/repository/",
mavenArtifactsPath: "$WORKSPACE/repository/",
autoPublish: true
)
}
90 changes: 0 additions & 90 deletions jenkins/stage-maven-release.jenkinsfile

This file was deleted.

0 comments on commit c171531

Please sign in to comment.