-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manual master cherrypick into 2.x (#550)
* Adding new OpenSearch versions and updating compatibility matrix (#257) Signed-off-by: Vacha Shah <[email protected]>
- Loading branch information
Showing
186 changed files
with
8,090 additions
and
2,549 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/usr/bin/env bash | ||
# Copyright OpenSearch Contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# The OpenSearch Contributors require contributions made to | ||
# this file be licensed under the Apache-2.0 license or a | ||
# compatible open source license. | ||
|
||
# Check that source code files in this repo have the appropriate license | ||
# header. | ||
|
||
if [ "$TRACE" != "" ]; then | ||
export PS4='${BASH_SOURCE}:${LINENO}: ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' | ||
set -o xtrace | ||
fi | ||
set -o errexit | ||
set -o pipefail | ||
|
||
TOP=$(cd "$(dirname "$0")/.." >/dev/null && pwd) | ||
NLINES_SC=$(wc -l ./.ci/license/license-sc.txt | awk '{print $1}') | ||
NLINES_MC=$(wc -l ./.ci/license/license-mc.txt | awk '{print $1}') | ||
|
||
echo $NLINES_SC | ||
echo $NLINES_MC | ||
|
||
function check_license_header { | ||
local fP | ||
f=$1 | ||
if (diff -a --strip-trailing-cr license/license-mc.txt <(head -$NLINES_MC "$f") >/dev/null) || (diff -a --strip-trailing-cr license/license-sc.txt <(head -$NLINES_SC "$f") >/dev/null); then | ||
return 0 | ||
else | ||
echo "check-license-headers: error: '$f' does not have required license header, see 'diff -u ./.ci/license/license-mc.txt <(head -$NLINES_MC ../$f)'" | ||
return 1 | ||
fi | ||
} | ||
|
||
cd "$TOP" | ||
nErrors=0 | ||
|
||
for f in $(git ls-files --directory ../ | grep '\.ts$' | grep -v '^docs/'); do | ||
if ! check_license_header $f; then | ||
nErrors=$((nErrors+1)) | ||
fi | ||
done | ||
|
||
for f in $(git ls-files --directory ../ | grep '\.js$' | grep -v '^docs/'); do | ||
if ! check_license_header $f; then | ||
nErrors=$((nErrors+1)) | ||
fi | ||
done | ||
|
||
if [[ $nErrors -eq 0 ]]; then | ||
exit 0 | ||
else | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
* | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Copyright OpenSearch Contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
// The OpenSearch Contributors require contributions made to | ||
// this file be licensed under the Apache-2.0 license or a | ||
// compatible open source license. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
updates: | ||
- directory: / | ||
open-pull-requests-limit: 3 | ||
package-ecosystem: npm | ||
schedule: | ||
interval: weekly | ||
labels: | ||
- "dependabot" | ||
- "dependencies" | ||
version: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Apply 'untriaged' label during issue lifecycle | ||
|
||
on: | ||
issues: | ||
types: [opened, reopened, transferred] | ||
|
||
jobs: | ||
apply-label: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['untriaged'] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: "Changelog Verifier" | ||
on: | ||
pull_request: | ||
types: [opened, edited, review_requested, synchronize, reopened, ready_for_review, labeled, unlabeled] | ||
|
||
jobs: | ||
# Enforces the update of a changelog file on every pull request | ||
verify-changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- uses: dangoslen/changelog-enforcer@v3 | ||
with: | ||
skipLabels: "autocut, skip-changelog" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Dependabot PR actions | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- labeled | ||
- unlabeled | ||
|
||
jobs: | ||
dependabot: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
contents: write | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
steps: | ||
- name: GitHub App token | ||
id: github_app_token | ||
uses: tibdex/[email protected] | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
installation_id: 22958780 | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ steps.github_app_token.outputs.token }} | ||
|
||
- name: Update the changelog | ||
uses: dangoslen/dependabot-changelog-helper@v2 | ||
with: | ||
version: 'Unreleased' | ||
|
||
- name: Commit the changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "Update changelog" | ||
branch: ${{ github.head_ref }} | ||
commit_user_name: dependabot[bot] | ||
commit_user_email: [email protected] | ||
commit_options: '--signoff' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Publish Docs to Github Pages | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
jobs: | ||
update-docs: | ||
runs-on: ubuntu-latest | ||
name: Update gh-pages with docs | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
ruby-version: 16.x | ||
- name: Install Tools | ||
run: | | ||
sudo apt install -y jq | ||
npm install -g jsdoc | ||
- name: Generate Docs | ||
run: | | ||
export PACKAGE_VERSION=$(jq .version package.json -r | awk -F. '{print $1"."$2}') | ||
export DOC_FOLDER=docs/$PACKAGE_VERSION | ||
jsdoc api lib -d $DOC_FOLDER -r --readme README.md | ||
cp *.md $DOC_FOLDER | ||
cp *.txt $DOC_FOLDER | ||
cp OpenSearch.svg $DOC_FOLDER | ||
- name: Deploy Docs to gh-pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs | ||
keep_files: true | ||
enable_jekyll: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: License headers | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
licenseheader: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Check license headers | ||
run: "./.ci/license/check-license-headers.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Link Checker | ||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
jobs: | ||
linkchecker: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: lychee Link Checker | ||
id: lychee | ||
uses: lycheeverse/[email protected] | ||
with: | ||
args: --accept=200,403,429 "**/*.html" "**/*.md" "**/*.txt" "**/*.json" --exclude "file:///github/workspace/*" --exclude-mail | ||
fail: true | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.