hadoop-ozone-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject [hadoop-ozone] 02/02: separate PR and main branch build definition
Date Thu, 21 Nov 2019 14:35:27 GMT
This is an automated email from the ASF dual-hosted git repository.

elek pushed a commit to branch HDDS-2587
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git

commit b42d9c26080649596857941ed5372e1e5f4294aa
Author: Márton Elek <elek@apache.org>
AuthorDate: Thu Nov 21 15:35:00 2019 +0100

    separate PR and main branch build definition
---
 .github/workflows/main.yml               | 121 -------------------------------
 .github/workflows/post-commit.yml        | 112 ++++++++++++++++++++++++++++
 .github/workflows/pr.yml                 | 106 +++++++++++++++++++++++++++
 hadoop-ozone/dev-support/checks/sonar.sh |   2 +-
 4 files changed, 219 insertions(+), 122 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
deleted file mode 100644
index 2b52480..0000000
--- a/.github/workflows/main.yml
+++ /dev/null
@@ -1,121 +0,0 @@
-# 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.
-name: Build
-on:
-  - push
-  - pull_request
-jobs:
-#  build:
-#    name: compile
-#    runs-on: ubuntu-18.04
-#    steps:
-#        - uses: actions/checkout@master
-#        - uses: ./.github/buildenv
-#          with:
-#             args: ./hadoop-ozone/dev-support/checks/build.sh
-#  rat:
-#    name: rat
-#    runs-on: ubuntu-18.04
-#    steps:
-#        - uses: actions/checkout@master
-#        - uses: ./.github/buildenv
-#          with:
-#             args: ./hadoop-ozone/dev-support/checks/rat.sh
-#        - uses: actions/upload-artifact@master
-#          if: always()
-#          with:
-#            name: rat
-#            path: target/rat
-#  author:
-#    name: author
-#    runs-on: ubuntu-18.04
-#    steps:
-#        - uses: actions/checkout@master
-#        - uses: ./.github/buildenv
-#          with:
-#             args: ./hadoop-ozone/dev-support/checks/author.sh
-#        - uses: actions/upload-artifact@master
-#          if: always()
-#          with:
-#            name: author
-#            path: target/author
-  sonar:
-    name: sonar
-    runs-on: ubuntu-18.04
-    steps:
-        - uses: actions/checkout@master
-#        - uses: ./.github/buildenv
-#          with:
-#             args: ./hadoop-ozone/dev-support/checks/build.sh
-        - uses: ./.github/buildenv
-          with:
-            args: ./hadoop-ozone/dev-support/checks/sonar.sh
-          env:
-            SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
-            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        - uses: actions/upload-artifact@master
-          if: always()
-          with:
-            name: sonar
-            path: target/sonar
-#  checkstyle:
-#    name: checkstyle
-#    runs-on: ubuntu-18.04
-#    steps:
-#        - uses: actions/checkout@master
-#        - uses: ./.github/buildenv
-#          with:
-#             args: ./hadoop-ozone/dev-support/checks/checkstyle.sh
-#        - uses: actions/upload-artifact@master
-#          if: always()
-#          with:
-#            name: checkstyle
-#            path: target/checkstyle
-#  findbugs:
-#    name: findbugs
-#    runs-on: ubuntu-18.04
-#    steps:
-#        - uses: actions/checkout@master
-#        - uses: ./.github/buildenv
-#          with:
-#             args: ./hadoop-ozone/dev-support/checks/findbugs.sh
-#        - uses: actions/upload-artifact@master
-#          if: always()
-#          with:
-#            name: findbugs
-#            path: target/findbugs
-#  acceptance:
-#    name: acceptance
-#    runs-on: ubuntu-18.04
-#    needs:
-#       - build
-#       - rat
-#       - checkstyle
-#       - unit
-#       - findbugs
-#    steps:
-#        - uses: actions/checkout@master
-#        - uses: ./.github/buildenv
-#          with:
-#            args: ./hadoop-ozone/dev-support/checks/build.sh
-#        - run: sudo pip install robotframework
-#        - run: sudo chown runner -R .
-#        - run: cd ./hadoop-ozone/dist/target/ozone-*-SNAPSHOT/ && mkdir .aws &&
sudo chown 1000 .aws
-#        - run: ./hadoop-ozone/dev-support/checks/acceptance.sh
-#        - uses: actions/upload-artifact@master
-#          if: always()
-#          with:
-#            name: acceptance
-#            path: target/acceptance
diff --git a/.github/workflows/post-commit.yml b/.github/workflows/post-commit.yml
new file mode 100644
index 0000000..ef6237f
--- /dev/null
+++ b/.github/workflows/post-commit.yml
@@ -0,0 +1,112 @@
+# 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.
+name: build-branch
+on:
+  - push
+jobs:
+  rat:
+    name: rat
+    runs-on: ubuntu-18.04
+    steps:
+        - uses: actions/checkout@master
+        - uses: ./.github/buildenv
+          with:
+             args: ./hadoop-ozone/dev-support/checks/rat.sh
+        - uses: actions/upload-artifact@master
+          if: always()
+          with:
+            name: rat
+            path: target/rat
+  author:
+    name: author
+    runs-on: ubuntu-18.04
+    steps:
+        - uses: actions/checkout@master
+        - uses: ./.github/buildenv
+          with:
+             args: ./hadoop-ozone/dev-support/checks/author.sh
+        - uses: actions/upload-artifact@master
+          if: always()
+          with:
+            name: author
+            path: target/author
+  unit:
+    name: unit
+    runs-on: ubuntu-18.04
+    steps:
+        - uses: actions/checkout@master
+        - uses: ./.github/buildenv
+          with:
+             args: ./hadoop-ozone/dev-support/checks/unit.sh
+        - uses: ./.github/buildenv
+          with:
+            args: ./hadoop-ozone/dev-support/checks/sonar.sh
+          env:
+            SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
+            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        - uses: actions/upload-artifact@master
+          if: always()
+          with:
+            name: unit
+            path: target/unit
+  checkstyle:
+    name: checkstyle
+    runs-on: ubuntu-18.04
+    steps:
+        - uses: actions/checkout@master
+        - uses: ./.github/buildenv
+          with:
+             args: ./hadoop-ozone/dev-support/checks/checkstyle.sh
+        - uses: actions/upload-artifact@master
+          if: always()
+          with:
+            name: checkstyle
+            path: target/checkstyle
+  findbugs:
+    name: findbugs
+    runs-on: ubuntu-18.04
+    steps:
+        - uses: actions/checkout@master
+        - uses: ./.github/buildenv
+          with:
+             args: ./hadoop-ozone/dev-support/checks/findbugs.sh
+        - uses: actions/upload-artifact@master
+          if: always()
+          with:
+            name: findbugs
+            path: target/findbugs
+  acceptance:
+    name: acceptance
+    runs-on: ubuntu-18.04
+    needs:
+       - build
+       - rat
+       - checkstyle
+       - unit
+       - findbugs
+    steps:
+        - uses: actions/checkout@master
+        - uses: ./.github/buildenv
+          with:
+            args: ./hadoop-ozone/dev-support/checks/build.sh
+        - run: sudo pip install robotframework
+        - run: sudo chown runner -R .
+        - run: cd ./hadoop-ozone/dist/target/ozone-*-SNAPSHOT/ && mkdir .aws &&
sudo chown 1000 .aws 
+        - run: ./hadoop-ozone/dev-support/checks/acceptance.sh
+        - uses: actions/upload-artifact@master
+          if: always()
+          with:
+            name: acceptance
+            path: target/acceptance
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
new file mode 100644
index 0000000..2662ee4
--- /dev/null
+++ b/.github/workflows/pr.yml
@@ -0,0 +1,106 @@
+# 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.
+name: pr-check
+on:
+  - pull_request
+jobs:
+  rat:
+    name: rat
+    runs-on: ubuntu-18.04
+    steps:
+        - uses: actions/checkout@master
+        - uses: ./.github/buildenv
+          with:
+             args: ./hadoop-ozone/dev-support/checks/rat.sh
+        - uses: actions/upload-artifact@master
+          if: always()
+          with:
+            name: rat
+            path: target/rat
+  author:
+    name: author
+    runs-on: ubuntu-18.04
+    steps:
+        - uses: actions/checkout@master
+        - uses: ./.github/buildenv
+          with:
+             args: ./hadoop-ozone/dev-support/checks/author.sh
+        - uses: actions/upload-artifact@master
+          if: always()
+          with:
+            name: author
+            path: target/author
+  unit:
+    name: unit
+    runs-on: ubuntu-18.04
+    steps:
+        - uses: actions/checkout@master
+        - uses: ./.github/buildenv
+          with:
+             args: ./hadoop-ozone/dev-support/checks/unit.sh
+        - uses: actions/upload-artifact@master
+          if: always()
+          with:
+            name: unit
+            path: target/unit
+  checkstyle:
+    name: checkstyle
+    runs-on: ubuntu-18.04
+    steps:
+        - uses: actions/checkout@master
+        - uses: ./.github/buildenv
+          with:
+             args: ./hadoop-ozone/dev-support/checks/checkstyle.sh
+        - uses: actions/upload-artifact@master
+          if: always()
+          with:
+            name: checkstyle
+            path: target/checkstyle
+  findbugs:
+    name: findbugs
+    runs-on: ubuntu-18.04
+    steps:
+        - uses: actions/checkout@master
+        - uses: ./.github/buildenv
+          with:
+             args: ./hadoop-ozone/dev-support/checks/findbugs.sh
+        - uses: actions/upload-artifact@master
+          if: always()
+          with:
+            name: findbugs
+            path: target/findbugs
+  acceptance:
+    name: acceptance
+    runs-on: ubuntu-18.04
+    needs:
+       - build
+       - rat
+       - checkstyle
+       - unit
+       - findbugs
+    steps:
+        - uses: actions/checkout@master
+        - uses: ./.github/buildenv
+          with:
+            args: ./hadoop-ozone/dev-support/checks/build.sh
+        - run: sudo pip install robotframework
+        - run: sudo chown runner -R .
+        - run: cd ./hadoop-ozone/dist/target/ozone-*-SNAPSHOT/ && mkdir .aws &&
sudo chown 1000 .aws 
+        - run: ./hadoop-ozone/dev-support/checks/acceptance.sh
+        - uses: actions/upload-artifact@master
+          if: always()
+          with:
+            name: acceptance
+            path: target/acceptance
diff --git a/hadoop-ozone/dev-support/checks/sonar.sh b/hadoop-ozone/dev-support/checks/sonar.sh
index 670a11d..0282b15 100755
--- a/hadoop-ozone/dev-support/checks/sonar.sh
+++ b/hadoop-ozone/dev-support/checks/sonar.sh
@@ -20,4 +20,4 @@ if [ ! "$SONAR_TOKEN" ]; then
   echo "SONAR_TOKEN environment variable should be set"
   exit 1
 fi
-mvn install -DskipTests org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar
-Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=hadoop-ozone
+mvn verify -DskipShade -DskipTests -Dskip.yarn org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar
-Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=hadoop-ozone


---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-commits-help@hadoop.apache.org


Mime
View raw message