Skip to content

Commit 75071a1

Browse files
Merge remote-tracking branch 'upstream/main' into deb-rpm-permissions-2
2 parents 0bc17f2 + 8f0fd59 commit 75071a1

File tree

336 files changed

+37286
-3008
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

336 files changed

+37286
-3008
lines changed

.github/ISSUE_TEMPLATE/component_release_template.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ If including changes in this release, increment the version on `{{RELEASE_VERSIO
3333
- [ ] Finalize scope and feature set and update [the Public Roadmap](https://github.com/orgs/opensearch-project/projects/1).
3434
- [ ] All the tasks in this issue have been reviewed by the release owner.
3535
- [ ] Create, update, triage and label all features and issues targeted for this release with `v{{RELEASE_VERSION}}`.
36-
- [ ] Finalize the code and create the the release branch `{{RELEASE_VERSION}}` from the `{{RELEASE_VERSION_X}}` branch.
36+
- [ ] Finalize the code and create the the release branch `{{RELEASE_BRANCH}}` from the `{{RELEASE_VERSION_X}}` branch.
3737

3838
### CI/CD
3939

.github/ISSUE_TEMPLATE/plugin_onboarding_template.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
name: On-board plugins
3-
description: On-board plugins
2+
name: On-board plugins to the distribution
3+
description: On-board plugins to the distribution
44
title: '[On-boarding]: '
55
labels: [on-boarding, untriaged]
66
body:
@@ -38,7 +38,7 @@ body:
3838
required: true
3939
- type: textarea
4040
attributes:
41-
description: 'Did you go through the [on-boarding document](https://github.com/opensearch-project/opensearch-build/blob/main/ONBOARDING.md)'
41+
description: 'Did you go through the [on-boarding document](https://github.com/opensearch-project/opensearch-build/blob/main/ONBOARDING.md#plugin-onboarding)'
4242
label: 'Did you read the on-boarding document'
4343
id: document
4444
validations:

.github/ISSUE_TEMPLATE/release_template.md

+82-54
Large diffs are not rendered by default.

.github/ISSUE_TEMPLATE/standalone_releases_template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ body:
1010
Thanks for taking the time to submit release request!
1111
- type: textarea
1212
attributes:
13-
description: 'Did you go through the [on-boarding document](https://github.com/opensearch-project/opensearch-build/blob/main/ONBOARDING.md#onboarding-to-universal--1-click-release-process)'
13+
description: 'Did you go through the [on-boarding document](https://github.com/opensearch-project/opensearch-build/blob/main/ONBOARDING.md#standalone-component-onboarding)'
1414
label: 'Did you read the on-boarding document'
1515
id: document
1616
validations:
+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
name: automatic-merges
3+
4+
on:
5+
workflow_run:
6+
# If new workflows triggered on pull request are added, they should be added to this list
7+
workflows:
8+
- Link Checker
9+
- yaml-lint
10+
- dockerfile-lint
11+
- groovy-tests
12+
- manifests
13+
- python-tests
14+
types: completed
15+
16+
jobs:
17+
automatic-merge-manifests:
18+
if: github.repository == 'opensearch-project/opensearch-build'
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- id: find-triggering-pr
24+
uses: peternied/find-triggering-pr@v1
25+
with:
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- uses: peternied/discerning-merger@v3
29+
if: steps.find-triggering-pr.outputs.pr-number != null
30+
with:
31+
token: ${{ secrets.GITHUB_TOKEN }}
32+
pull-request-number: ${{ steps.find-triggering-pr.outputs.pr-number }}
33+
allowed-authors: |
34+
dependabot
35+
opensearch-trigger-bot
36+
peterzhuamazon
37+
bbarani
38+
gaiksaya
39+
rishabh6788
40+
zelinh
41+
jordarlu
42+
prudhvigodithi
43+
Divyaasm
44+
dblock
45+
tianleh
46+
peternied
47+
allowed-files: |
48+
manifests/*/*.yml
49+
50+
automatic-merge-new-manifests:
51+
if: github.repository == 'opensearch-project/opensearch-build'
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
56+
- id: find-triggering-pr
57+
uses: peternied/find-triggering-pr@v1
58+
with:
59+
token: ${{ secrets.GITHUB_TOKEN }}
60+
61+
- uses: peternied/discerning-merger@v3
62+
if: steps.find-triggering-pr.outputs.pr-number != null
63+
with:
64+
token: ${{ secrets.GITHUB_TOKEN }}
65+
pull-request-number: ${{ steps.find-triggering-pr.outputs.pr-number }}
66+
allowed-authors: |
67+
opensearch-ci-bot
68+
allowed-files: |
69+
manifests/*/*.yml
70+
jenkins/check-for-build.jenkinsfile
+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
name: Get CI Image Tag
3+
on:
4+
workflow_call:
5+
inputs:
6+
product:
7+
required: false
8+
type: string
9+
default: 'opensearch'
10+
platform:
11+
required: false
12+
type: string
13+
build_ref:
14+
required: false
15+
type: string
16+
default: 'main'
17+
version:
18+
required: false
19+
type: string
20+
type:
21+
required: false
22+
type: string
23+
default: 'build'
24+
outputs:
25+
ci-image-version-linux:
26+
description: The ci image version for linux build
27+
value: ${{ jobs.Get-CI-Image-Tag.outputs.output-ci-image-version-linux }}
28+
29+
jobs:
30+
Get-CI-Image-Tag:
31+
runs-on: ubuntu-latest
32+
outputs:
33+
output-ci-image-version-linux: ${{ steps.step-ci-image-version-linux.outputs.ci-image-version-linux }}
34+
steps:
35+
- name: Install crane
36+
uses: iarekylew00t/crane-installer@v1
37+
with:
38+
crane-release: v0.15.2
39+
- name: Checkout opensearch-build repository
40+
uses: actions/checkout@v3
41+
with:
42+
repository: 'opensearch-project/opensearch-build'
43+
ref: ${{ inputs.build_ref }}
44+
path: 'opensearch-build'
45+
- name: Get ci image version from opensearch-build repository scripts
46+
id: step-ci-image-version-linux
47+
run: |
48+
PRODUCT=${{ inputs.product }}
49+
PLATFORM=${{ inputs.platform }}
50+
TYPE=${{ inputs.type }}
51+
if [[ -z "$PLATFORM" ]]; then
52+
if [[ "$PRODUCT" = "opensearch" ]]; then
53+
PLATFORM="centos7" # Temp measure before centos7 deprecation on opensearch for k-NN
54+
else
55+
PLATFORM="rockylinux8"
56+
fi
57+
fi
58+
crane version
59+
echo $PRODUCT $PLATFORM
60+
CI_IMAGE_VERSION=`opensearch-build/docker/ci/get-ci-images.sh -p $PLATFORM -u $PRODUCT -t $TYPE | head -1`
61+
echo $CI_IMAGE_VERSION
62+
echo "ci-image-version-linux=$CI_IMAGE_VERSION" >> $GITHUB_OUTPUT

.github/workflows/license-header-checker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v3
1111
- name: Add License Header
12-
uses: kt3k/[email protected]
12+
run: npx @kt3k/license-checker

.github/workflows/manifests.yml

+29-51
Original file line numberDiff line numberDiff line change
@@ -2,75 +2,53 @@
22
name: manifests
33

44
on:
5-
push:
65
pull_request:
7-
paths:
8-
- 'manifests/**/*.yml'
9-
- '!manifests/templates/**/'
10-
schedule:
11-
- cron: 0 0 * * *
6+
paths:
7+
- 'manifests/**/*.yml'
8+
- '!manifests/templates/**/'
9+
- 'legacy-manifests/**/*.yml'
1210

1311
jobs:
14-
list-manifests11:
12+
list-changed-manifests:
1513
runs-on: ubuntu-latest
1614
outputs:
1715
matrix: ${{ steps.set-matrix.outputs.matrix }}
1816
steps:
19-
- uses: actions/checkout@v3
20-
- id: set-matrix
21-
run: echo "::set-output name=matrix::$(ls manifests/**/opensearch*.yml | awk -F/ '{if($2<2)print$0}' | jq -R -s -c 'split("\n")[:-1]')"
22-
23-
list-manifests17:
24-
runs-on: ubuntu-latest
25-
outputs:
26-
matrix: ${{ steps.set-matrix.outputs.matrix }}
27-
steps:
28-
- uses: actions/checkout@v3
29-
- id: set-matrix
30-
run: echo "::set-output name=matrix::$(ls manifests/**/opensearch*.yml | awk -F/ '{if($2>2)print$0}' | jq -R -s -c 'split("\n")[:-1]')"
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
- name: Get changed manifest files
20+
uses: tj-actions/changed-files@v41
21+
id: list-changed-manifests
22+
with:
23+
files: manifests/**/opensearch*.yml
24+
json: true
25+
quotepath: false
26+
dir_names: false
3127

28+
- name: Set unique changed manifests as matrix
29+
id: set-matrix
30+
run: echo "matrix={\"manifest\":${{ steps.list-changed-manifests.outputs.all_changed_files }}}" >> "$GITHUB_OUTPUT"
3231

33-
manifest-checks-jdk11:
34-
needs: list-manifests11
32+
manifest-checks:
33+
needs: [list-changed-manifests]
3534
runs-on: ubuntu-latest
3635
env:
3736
PYTHON_VERSION: 3.9
38-
JDK_VERSION: 11
3937
strategy:
40-
matrix:
41-
manifest: ${{ fromJson(needs.list-manifests11.outputs.matrix) }}
38+
fail-fast: false
39+
matrix: ${{ fromJson(needs.list-changed-manifests.outputs.matrix) }}
4240
steps:
4341
- uses: actions/checkout@v3
44-
- name: Set Up JDK ${{ env.JDK_VERSION }}
45-
uses: actions/setup-java@v1
46-
with:
47-
java-version: ${{ env.JDK_VERSION }}
48-
- name: Set up Python ${{ env.PYTHON_VERSION }}
49-
uses: actions/setup-python@v3
50-
with:
51-
python-version: ${{ env.PYTHON_VERSION }}
52-
- name: Install Pipenv and Dependencies
42+
- name: Check JDK Version
5343
run: |
54-
python -m pip install --upgrade pipenv wheel
55-
- name: OpenSearch Manifests
56-
run: |-
57-
./ci.sh ${{ matrix.manifest }} --snapshot
58-
59-
manifest-checks-jdk17:
60-
needs: list-manifests17
61-
runs-on: ubuntu-latest
62-
env:
63-
PYTHON_VERSION: 3.9
64-
JDK_VERSION: 17
65-
strategy:
66-
matrix:
67-
manifest: ${{ fromJson(needs.list-manifests17.outputs.matrix) }}
68-
steps:
69-
- uses: actions/checkout@v3
70-
- name: Set Up JDK ${{ env.JDK_VERSION }}
44+
java_version=`cat ${{ matrix.manifest }} | yq -r .ci.image.args | grep -Eo '[0-9]+' || echo ''`
45+
echo $java_version
46+
echo "JAVA_VERSION=$java_version" >> "$GITHUB_ENV"
47+
- name: Set Up JDK ${{ env.JAVA_VERSION }}
48+
if: ${{ env.JAVA_VERSION }}
7149
uses: actions/setup-java@v1
7250
with:
73-
java-version: ${{ env.JDK_VERSION }}
51+
java-version: ${{ env.JAVA_VERSION }}
7452
- name: Set up Python ${{ env.PYTHON_VERSION }}
7553
uses: actions/setup-python@v3
7654
with:

.github/workflows/os-increment-plugin-versions.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,22 @@ jobs:
4545
- {repo: security}
4646
- {repo: security-analytics}
4747
- {repo: sql}
48+
- {repo: custom-codecs}
49+
- {repo: flow-framework}
50+
- {repo: skills}
4851
branch:
52+
- 1.x
4953
- '1.3'
5054
- 2.x
51-
- '2.8'
5255
- main
53-
- '2.9'
54-
- '2.10'
55-
- '2.11'
56+
- '2.12'
57+
- '2.13'
5658
exclude:
5759
- {entry: {repo: geospatial}, branch: '1.3'}
5860
- {entry: {repo: neural-search}, branch: '1.3'}
5961
- {entry: {repo: security-analytics}, branch: '1.3'}
6062
- {entry: {repo: notifications, path: notifications}, branch: '1.3'}
63+
- {entry: {repo: custom-codecs}, branch: '1.3'}
6164
steps:
6265
- name: Check out OpenSearch repo
6366
uses: actions/checkout@v3

.github/workflows/os-release-issues.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ jobs:
5757
- {repo: security}
5858
- {repo: security-analytics}
5959
- {repo: sql}
60+
- {repo: custom-codecs}
61+
- {repo: flow-framework}
62+
- {repo: skills}
6063
release_version: ${{ fromJson(needs.list-manifest-versions.outputs.matrix) }}
6164
steps:
6265
- name: GitHub App token
@@ -97,14 +100,15 @@ jobs:
97100
# Read the file contents and replace the placeholders
98101
file_path="../opensearch-build/.github/ISSUE_TEMPLATE/component_release_template.md"
99102
RELEASE_VERSION="${{ matrix.release_version }}"
103+
RELEASE_BRANCH=$(echo ${{ matrix.release_version }} | cut -d. -f1-2)
100104
BUILD_REPO_ISSUE_OUTPUT=$(cat <<EOF
101105
${{ steps.check_if_build_repo_issue_exists.outputs.issues }}
102106
EOF
103107
)
104108
RELEASE_ISSUE_NUMBER=$(echo $BUILD_REPO_ISSUE_OUTPUT | jq -r '.[0].number')
105109
RELEASE_ISSUE="https://github.com/opensearch-project/opensearch-build/issues/${RELEASE_ISSUE_NUMBER}"
106110
RELEASE_VERSION_X=$(echo "${{ matrix.release_version }}" | awk -F'.' '{print $1}').x
107-
sed -e "s|{{RELEASE_VERSION}}|${RELEASE_VERSION}|g" -e "s|{{RELEASE_ISSUE}}|${RELEASE_ISSUE}|g" -e "s|{{RELEASE_VERSION_X}}|${RELEASE_VERSION_X}|g" "$file_path" > "$file_path.tmp" && mv "$file_path.tmp" "$file_path"
111+
sed -e "s|{{RELEASE_VERSION}}|${RELEASE_VERSION}|g" -e "s|{{RELEASE_ISSUE}}|${RELEASE_ISSUE}|g" -e "s|{{RELEASE_BRANCH}}|${RELEASE_BRANCH}|g" -e "s|{{RELEASE_VERSION_X}}|${RELEASE_VERSION_X}|g" "$file_path" > "$file_path.tmp" && mv "$file_path.tmp" "$file_path"
108112
- name: Create component release issue from file
109113
if: steps.check_if_plugin_repo_issue_exists.outputs.issues == '[]'
110114
uses: peter-evans/create-issue-from-file@v4

0 commit comments

Comments
 (0)