Skip to content

Commit

Permalink
Created a License header Checker (#2666)
Browse files Browse the repository at this point in the history
* License Header Checker

Signed-off-by: Divya Madala <[email protected]>

* License Header checker.

Signed-off-by: Divya Madala <[email protected]>

* License Header checker.

Signed-off-by: Divya Madala <[email protected]>

* License Header checker

Signed-off-by: Divya Madala <[email protected]>

* License Header checker

Signed-off-by: Divya Madala <[email protected]>

* License Header checker

Signed-off-by: Divya Madala <[email protected]>

* License Header checker

Signed-off-by: Divya Madala <[email protected]>

* License Header checker

Signed-off-by: Divya Madala <[email protected]>

* License Header checker

Signed-off-by: Divya Madala <[email protected]>

* License Header checker

Signed-off-by: Divya Madala <[email protected]>

Signed-off-by: Divya Madala <[email protected]>
  • Loading branch information
Divyaasm authored Sep 28, 2022
1 parent 970646d commit bd9d214
Show file tree
Hide file tree
Showing 511 changed files with 812 additions and 22 deletions.
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
1 change: 1 addition & 0 deletions lib/shell/file_management.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 lib/shell/process_control.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 manifests.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 publish/publish-snapshot.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# Copyright OpenSearch Contributors
###### Information ############################################################################
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
1 change: 1 addition & 0 deletions publish/stage-maven-release.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# Copyright OpenSearch Contributors
###### Information ############################################################################
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
1 change: 1 addition & 0 deletions release_notes.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 run.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 scripts/components/OpenSearch-Dashboards/install.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 scripts/components/OpenSearch/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 scripts/components/OpenSearch/bwctest.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 scripts/components/OpenSearch/install.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 scripts/components/OpenSearch/integtest.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 scripts/components/alerting/integtest.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

function usage() {
Expand Down
1 change: 1 addition & 0 deletions scripts/components/customImportMapDashboards/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
Loading

0 comments on commit bd9d214

Please sign in to comment.