Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add release workflows #317

Merged
merged 4 commits into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Draft a release

on:
push:
tags:
- "*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
generate_release_notes: true
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [Unreleased]
### Added
- Github workflow for changelog verification ([#306](https://github.com/opensearch-project/opensearch-js/pull/306))
- Add GitHub and Jenkins release workflow ([#317](https://github.com/opensearch-project/opensearch-js/pull/317))
### Dependencies
- Bumps `tsd` from 0.22.0 to 0.24.1

Expand Down
11 changes: 11 additions & 0 deletions jenkins/release.JenkinsFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
lib = library(identifier: 'jenkins@1.1.0', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))

standardReleasePipelineWithGenericTrigger(
tokenIdCredential: 'jenkins-opensearch-js-generic-webhook-token',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my knowledge, where does this token come from?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is jenkins credential id required by jenkins webhook plugin. We set the token ourselves in Github settings -> webhook. I'll be adding it once this PR is merged. The webhook will only be triggered (or scope) when a release related activity happens.
More details: https://github.com/jenkinsci/generic-webhook-trigger-plugin#token-parameter

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

causeString: 'A tag was cut on opensearch-project/opensearch-js repository causing this workflow to run',
publishRelease: true){
publishToNpm(repository: 'https://github.com/opensearch-project/opensearch-js', tag: "$tag")
}