Skip to content

Commit

Permalink
Rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Zelin Hao <[email protected]>
  • Loading branch information
zelinh committed Sep 28, 2022
2 parents e9cdbf4 + bd9d214 commit e13a7ff
Show file tree
Hide file tree
Showing 590 changed files with 1,264 additions and 148 deletions.
1 change: 1 addition & 0 deletions .github/workflows/increment-plugin-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
- 3.x
- '3.0'
- '2.3'
- 1.x
exclude:
- {entry: {repo: geospatial}, branch: '1.3'}
- {entry: {repo: notifications, path: notifications}, branch: '1.3'}
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/license-header-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: License Header Checker

on: [push, pull_request]

jobs:
license-header-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Add License Header
uses: kt3k/[email protected]
6 changes: 6 additions & 0 deletions .licenserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"**/*.{py,groovy,sh,js,ts}":[
" Copyright OpenSearch Contributors",
" SPDX-License-Identifier: Apache-2.0"
]
}
1 change: 1 addition & 0 deletions assemble.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
Expand Down
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
Expand Down
1 change: 1 addition & 0 deletions checkout.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
Expand Down
1 change: 1 addition & 0 deletions ci.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
Expand Down
9 changes: 9 additions & 0 deletions deployment/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* 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.
*/

module.exports = {
env: {
browser: false,
Expand Down
9 changes: 9 additions & 0 deletions deployment/bin/build-artifact-stack.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* 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.
*/

#!/usr/bin/env node
import 'source-map-support/register';
import * as cdk from '@aws-cdk/core';
Expand Down
9 changes: 9 additions & 0 deletions deployment/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* 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.
*/

module.exports = {
testEnvironment: 'node',
roots: ['<rootDir>/test'],
Expand Down
11 changes: 10 additions & 1 deletion deployment/lambdas/cf-url-rewriter/cf-url-rewriter.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* 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.
*/

import { CloudFrontRequest, CloudFrontRequestCallback, CloudFrontRequestEvent, Context } from 'aws-lambda';
import { httpsGet } from './https-get';

Expand Down Expand Up @@ -57,4 +66,4 @@ function errorResponse() {
status: '404',
statusDescription: 'Not found',
};
}
}
11 changes: 10 additions & 1 deletion deployment/lambdas/cf-url-rewriter/https-get.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* 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.
*/

import * as https from 'https';

export async function httpsGet(url: string) {
Expand Down Expand Up @@ -32,4 +41,4 @@ export async function httpsGet(url: string) {
});
});
});
}
}
9 changes: 9 additions & 0 deletions deployment/lib/artifacts-public-access.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* 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.
*/

import {
CloudFrontAllowedMethods, CloudFrontWebDistribution, LambdaEdgeEventType, OriginAccessIdentity
} from '@aws-cdk/aws-cloudfront';
Expand Down
9 changes: 9 additions & 0 deletions deployment/lib/buckets.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* 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.
*/

import { AnyPrincipal, Role } from '@aws-cdk/aws-iam';
import { Bucket, IBucket } from '@aws-cdk/aws-s3';

Expand Down
9 changes: 9 additions & 0 deletions deployment/lib/build-artifact-stack.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* 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.
*/

import { ArnPrincipal } from '@aws-cdk/aws-iam';
import {
CfnParameter, Construct, Stack, StackProps,
Expand Down
9 changes: 9 additions & 0 deletions deployment/lib/identities.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* 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.
*/

import { ArnPrincipal, IRole, Role } from '@aws-cdk/aws-iam';
import { IBucket } from '@aws-cdk/aws-s3';
import { Arn, Stack } from '@aws-cdk/core';
Expand Down
9 changes: 9 additions & 0 deletions deployment/test/build-artifact-stack.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* 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.
*/

import { countResources, expect, haveOutput, haveResourceLike, not } from '@aws-cdk/assert';
import { App } from '@aws-cdk/core';
import { BuildArtifactStack } from '../lib/build-artifact-stack';
Expand Down
11 changes: 10 additions & 1 deletion deployment/test/lambdas/cf-url-rewriter/cf-url-rewriter.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* 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.
*/

import { CloudFrontEvent, CloudFrontHeaders, CloudFrontRequest, CloudFrontRequestCallback, CloudFrontRequestEvent, Context } from 'aws-lambda';
import { handler } from '../../../lambdas/cf-url-rewriter/cf-url-rewriter';
import { httpsGet } from '../../../lambdas/cf-url-rewriter/https-get';
Expand Down Expand Up @@ -192,4 +201,4 @@ function createTestEvent(uri: string): CloudFrontRequestEvent {
event.Records = [{ cf: cf }];

return event;
}
}
11 changes: 10 additions & 1 deletion deployment/test/lambdas/cf-url-rewriter/https-get.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* 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.
*/

import { ClientRequest } from 'http';
import * as https from 'https';
import { Stream } from 'stream';
Expand Down Expand Up @@ -78,4 +87,4 @@ test('httpGet request error', async () => {
} catch (e) {
expect(e).toBe(error);
}
});
});
1 change: 1 addition & 0 deletions docker/ci/build-image-multi-arch.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
Expand Down
1 change: 1 addition & 0 deletions docker/ci/build-image-single-arch.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
Expand Down
1 change: 1 addition & 0 deletions docker/ci/config/build-opensearch-dashboards-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
Expand Down
1 change: 1 addition & 0 deletions docker/ci/config/cypress-setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
Expand Down
1 change: 1 addition & 0 deletions docker/ci/config/jdk-setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
Expand Down
1 change: 1 addition & 0 deletions docker/ci/config/yq-setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
Expand Down
8 changes: 8 additions & 0 deletions docker/release/build-image-multi-arch.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/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.


set -e

# Import libs
Expand Down
1 change: 1 addition & 0 deletions docker/release/build-image-single-arch.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
Expand Down
7 changes: 6 additions & 1 deletion jenkins/check-for-build.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
lib = library(identifier: "jenkins@20211123", retriever: legacySCM(scm))
lib = library(identifier: '[email protected]', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))

pipeline {
options {
Expand All @@ -11,6 +14,8 @@ pipeline {
}
triggers {
parameterizedCron '''
H 1 * * * %INPUT_MANIFEST=1.3.6/opensearch-dashboards-1.3.6.yml;TARGET_JOB_NAME=distribution-build-opensearch-dashboards
H 1 * * * %INPUT_MANIFEST=2.3.1/opensearch-dashboards-2.3.1.yml;TARGET_JOB_NAME=distribution-build-opensearch-dashboards
H 1 * * * %INPUT_MANIFEST=2.3.1/opensearch-2.3.1.yml;TARGET_JOB_NAME=distribution-build-opensearch
H 1 * * * %INPUT_MANIFEST=2.4.0/opensearch-dashboards-2.4.0.yml;TARGET_JOB_NAME=distribution-build-opensearch-dashboards
H 1 * * * %INPUT_MANIFEST=2.4.0/opensearch-2.4.0.yml;TARGET_JOB_NAME=distribution-build-opensearch
Expand Down
5 changes: 4 additions & 1 deletion jenkins/cross-cluster-replication/perf-test.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
lib = library(identifier: "jenkins@20211118", retriever: legacySCM(scm))
lib = library(identifier: '[email protected]', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))

pipeline {
agent none
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm))
lib = library(identifier: '[email protected]', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))

pipeline {
options {
Expand Down
5 changes: 4 additions & 1 deletion jenkins/docker/docker-copy.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm))
lib = library(identifier: '[email protected]', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))

pipeline {
options {
Expand Down
5 changes: 4 additions & 1 deletion jenkins/docker/docker-scan.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm))
lib = library(identifier: '[email protected]', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))

pipeline {
options {
Expand Down
5 changes: 4 additions & 1 deletion jenkins/gradle/gradle-check.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm))
lib = library(identifier: '[email protected]', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))

pipeline {
options {
Expand Down
5 changes: 4 additions & 1 deletion jenkins/opensearch-dashboards/bwc-test.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
lib = library(identifier: "jenkins@20211118", retriever: legacySCM(scm))
lib = library(identifier: '[email protected]', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))

pipeline {
options {
Expand Down
5 changes: 4 additions & 1 deletion jenkins/opensearch-dashboards/distribution-build.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm))
lib = library(identifier: '[email protected]', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))

pipeline {
options {
Expand Down
5 changes: 4 additions & 1 deletion jenkins/opensearch-dashboards/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
lib = library(identifier: "jenkins@20211118", retriever: legacySCM(scm))
lib = library(identifier: '[email protected]', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))

pipeline {
options {
Expand Down
Loading

0 comments on commit e13a7ff

Please sign in to comment.