You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ge...@apache.org on 2021/05/27 08:11:25 UTC

[openwhisk-intellij-plugin] branch master updated: Add scancode (#13)

This is an automated email from the ASF dual-hosted git repository.

geonhee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-intellij-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 1c0adc4  Add scancode (#13)
1c0adc4 is described below

commit 1c0adc4c3ba93046dd90d21be5b67dc0e546096c
Author: Dominic Kim <st...@apache.org>
AuthorDate: Thu May 27 17:11:17 2021 +0900

    Add scancode (#13)
    
    * Add scancode.sh
    
    * Run scancode before running ci tests
    
    * Update files according to the scancode.sh
---
 .github/workflows/gradle.yml                       |  3 ++
 README.md                                          | 21 +++++++++++-
 gradle/wrapper/gradle-wrapper.properties           | 13 ++++----
 src/main/resources/template/HOW-TO-DEPLOY.md       | 21 +++++++++++-
 src/main/resources/template/manifest.yaml          |  2 +-
 src/main/resources/template/src/index.js           |  2 +-
 .github/workflows/gradle.yml => travis/scancode.sh | 37 +++++++++++-----------
 7 files changed, 70 insertions(+), 29 deletions(-)

diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml
index fded5f6..1fe432c 100644
--- a/.github/workflows/gradle.yml
+++ b/.github/workflows/gradle.yml
@@ -34,6 +34,9 @@ jobs:
         uses: actions/setup-java@v1
         with:
           java-version: 11
+      - name: Run scancode
+        run: |
+            ./travis/scancode.sh
       - name: Grant execute permission for gradlew
         run: chmod +x gradlew
       - name: Build with Gradle
diff --git a/README.md b/README.md
index 452a83e..34812d4 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,25 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
 # OpenWhisk Intellij Plugin
 **OpenWhisk-intellij-support**  is an open source Intellij Plugin for [Apache OpenWhisk](https://github.com/apache/openwhisk). It assists users to develop/deploy/manage OpenWhisk functions in Intellij.
- 
+
 ## Prerequisites
 Install the dependencies below to use full features:
 * Intellij >= 2018.1.8
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index be1e6f6..a1e5c5f 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,11 +1,12 @@
 #
-# Copyright 2021 the original author or authors.
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
+#     http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/main/resources/template/HOW-TO-DEPLOY.md b/src/main/resources/template/HOW-TO-DEPLOY.md
index a63853b..0ae836e 100644
--- a/src/main/resources/template/HOW-TO-DEPLOY.md
+++ b/src/main/resources/template/HOW-TO-DEPLOY.md
@@ -1,3 +1,22 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
 # What is wskdeploy
 
 `wskdeploy` is a utility to help you deploy any part of the OpenWhisk programming model using a Manifest file written in YAML. Use it to deploy all your OpenWhisk Packages, Actions, Triggers, and Rules!
@@ -72,4 +91,4 @@ The jest dependency is included by default. So you can test with `npm run test`
 $ cd src
 $ npm install
 $ npm run test
-```
\ No newline at end of file
+```
diff --git a/src/main/resources/template/manifest.yaml b/src/main/resources/template/manifest.yaml
index 4b6f5d0..5bad634 100644
--- a/src/main/resources/template/manifest.yaml
+++ b/src/main/resources/template/manifest.yaml
@@ -43,4 +43,4 @@ packages:
     rules:
       meetPersonRule:
         trigger: meetPerson
-        action: hello_world
\ No newline at end of file
+        action: hello_world
diff --git a/src/main/resources/template/src/index.js b/src/main/resources/template/src/index.js
index de850a5..a2ed166 100644
--- a/src/main/resources/template/src/index.js
+++ b/src/main/resources/template/src/index.js
@@ -21,4 +21,4 @@ function main(params) {
     const stats = 'and are ' + params.height + ' m. tall.';
     return { greeting: msg, details: family + stats };
 }
-module.exports.main = main;
\ No newline at end of file
+module.exports.main = main;
diff --git a/.github/workflows/gradle.yml b/travis/scancode.sh
old mode 100644
new mode 100755
similarity index 62%
copy from .github/workflows/gradle.yml
copy to travis/scancode.sh
index fded5f6..bb146bc
--- a/.github/workflows/gradle.yml
+++ b/travis/scancode.sh
@@ -1,3 +1,5 @@
+#!/bin/bash
+
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -15,26 +17,23 @@
 # limitations under the License.
 #
 
-name: Java CI with Gradle
+set -e
 
-on:
-  push:
-    branches: [ master ]
-  pull_request:
-    branches: [ master ]
+SCRIPTDIR=$(cd $(dirname "$0") && pwd)
+ROOTDIR="$SCRIPTDIR/../"
+HOMEDIR="$SCRIPTDIR/../../"
+UTIL_DIR="$HOMEDIR/openwhisk-utilities"
 
-jobs:
-  build:
+# clone OpenWhisk utilities repo. in order to run scanCode.py
+cd $HOMEDIR
 
-    runs-on: ubuntu-latest
+if [ ! -d "openwhisk-utilities" ] ; then
+    git clone https://github.com/apache/openwhisk-utilities.git
+else
+    cd "openwhisk-utilities"
+    git pull
+fi
 
-    steps:
-      - uses: actions/checkout@v2.3.4
-      - name: Set up JDK 11
-        uses: actions/setup-java@v1
-        with:
-          java-version: 11
-      - name: Grant execute permission for gradlew
-        run: chmod +x gradlew
-      - name: Build with Gradle
-        run: ./gradlew build
+# run scancode
+cd $UTIL_DIR
+scancode/scanCode.py --config scancode/ASF-Release.cfg $ROOTDIR