Skip to content

Commit 696ef64

Browse files
committed
Fix release workflows to use pre-releases and update releasing.md with new process
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
1 parent f4ff82d commit 696ef64

3 files changed

Lines changed: 17 additions & 12 deletions

File tree

.github/workflows/release_drafter.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ jobs:
126126
issue-body: "Please approve or deny the release of opensearch-hadoop. **VERSION**: ${{ steps.get_data.outputs.version }} **TAG**: ${{ github.ref_name }} **COMMIT**: ${{ github.sha }}"
127127

128128
- name: Draft a release
129-
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
129+
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd
130130
with:
131-
draft: true
132-
generate_release_notes: true
133-
files: |
134-
artifacts.tar.gz
131+
immutableCreate: true
132+
generateReleaseNotes: true
133+
artifacts: "artifacts.tar.gz"
134+
prerelease: true

RELEASING.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,16 @@ Repositories create consistent release labels, such as `v1.0.0`, `v1.1.0` and `v
3434

3535
The release process is standard across repositories in this org and is run by a release manager volunteering from amongst [MAINTAINERS](MAINTAINERS.md).
3636

37-
1. Create a tag, e.g. `v2.1.0`, and push it to the GitHub repo.
38-
1. The [release-drafter.yml](.github/workflows/release-drafter.yml) will be automatically kicked off and is responsible for drafting a new release on GitHub containing release artifacts.
39-
1. Before creating a draft release, this workflow creates a GitHub issue asking for approval from the [maintainers](MAINTAINERS.md). See sample [issue](https://github.com/gaiksaya/opensearch-java/issues/1). The maintainers need to approve in order to continue the workflow run.
40-
1. Once a release is drafted [opensearch-hadoop-release](https://build.ci.opensearch.org/job/opensearch-hadoop-release/) jenkins workflow is triggered. The artifacts will be automcatically signed and published to maven.
37+
1. Identify the commit to release and create a tag on it, pushing to the upstream repo:
38+
```
39+
git fetch origin
40+
git tag <tag-name> <commit-sha>
41+
git push origin <tag-name>
42+
```
43+
1. The [release_drafter.yml](.github/workflows/release_drafter.yml) will be automatically kicked off. Before creating a release, this workflow creates a GitHub issue asking for approval from the [maintainers](MAINTAINERS.md). The maintainers need to approve in order to continue the workflow run.
44+
1. Once approved, a pre-release will be created with the build artifacts attached.
45+
1. This pre-release triggers the [opensearch-hadoop-release](https://build.ci.opensearch.org/job/opensearch-hadoop-release/) jenkins workflow. The artifacts will be automatically signed and published to maven. Please note that the release workflow is triggered only if created release is in pre-release state.
46+
1. Once the above release workflow is successful, it creates a GitHub issue requesting maintainers to manually publish the pre-release to release on GitHub.
4147
1. Increment the version in [opensearch-hadoop-version.properties](./buildSrc/opensearch-hadoop-version.properties) to the next patch release, e.g. `2.1.1`.
4248

4349
## Snapshot Builds

jenkins/release.jenkinsFile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
lib = library(identifier: 'jenkins@12.0.0', retriever: modernSCM([
1+
lib = library(identifier: 'jenkins@13.0.1', retriever: modernSCM([
22
$class: 'GitSCMSource',
33
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
44
]))
@@ -7,8 +7,7 @@ standardReleasePipelineWithGenericTrigger(
77
overrideDockerImage: 'opensearchstaging/ci-runner:release-centos7-clients-v4',
88
tokenIdCredential: 'jenkins-opensearch-hadoop-generic-webhook-token',
99
causeString: 'A tag was cut on opensearch-project/opensearch-hadoop repository causing this workflow to run',
10-
downloadReleaseAsset: true,
11-
publishRelease: true) {
10+
downloadReleaseAsset: true) {
1211
publishToMaven(
1312
signingArtifactsPath: "$WORKSPACE/maven/",
1413
mavenArtifactsPath: "$WORKSPACE/maven/",

0 commit comments

Comments
 (0)