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

ming pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph.git


The following commit(s) were added to refs/heads/master by this push:
     new 197e8a00e chore(ci): add stage profile settings (#2361)
197e8a00e is described below

commit 197e8a00ed6034c57fcf0493c43e67c861969974
Author: lzyxx <[email protected]>
AuthorDate: Tue Nov 28 17:33:56 2023 +0800

    chore(ci): add stage profile settings (#2361)
    
    * Update LICENSE
    
    * Update install-cassandra.sh
    
    * add stage profile settings
    
    * Update ci.yml
    
    * Update ci.yml
    
    * Update ci.yml
    
    * Update licence-checker.yml
    
    ---------
    
    Co-authored-by: imbajin <[email protected]>
---
 .github/configs/settings.xml             | 58 ++++++++++++++++++++++++++++++++
 .github/workflows/check-dependencies.yml |  8 +++++
 .github/workflows/ci.yml                 |  7 ++++
 .github/workflows/codeql-analysis.yml    |  8 +++++
 .github/workflows/licence-checker.yml    |  7 +---
 pom.xml                                  | 11 ++++++
 6 files changed, 93 insertions(+), 6 deletions(-)

diff --git a/.github/configs/settings.xml b/.github/configs/settings.xml
new file mode 100644
index 000000000..3fcc52dea
--- /dev/null
+++ b/.github/configs/settings.xml
@@ -0,0 +1,58 @@
+<!--
+   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.
+  -->
+
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0";
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 
https://maven.apache.org/xsd/settings-1.0.0.xsd";>
+    <servers>
+        <server>
+            <id>github</id>
+            <username>${env.GITHUB_ACTOR}</username>
+            <password>${env.GITHUB_TOKEN}</password>
+        </server>
+    </servers>
+
+    <profiles>
+        <profile>
+            <id>local-repo</id>
+            <repositories>
+                <repository>
+                    <id>central</id>
+                    <url>https://repo.maven.apache.org/maven2</url>
+                    <releases>
+                        <enabled>true</enabled>
+                    </releases>
+                    <snapshots>
+                        <enabled>false</enabled>
+                    </snapshots>
+                </repository>
+                <repository>
+                    <id>staged-releases</id>
+                    
<url>https://repository.apache.org/content/groups/staging/</url>
+                </repository>
+            </repositories>
+            <pluginRepositories>
+                <pluginRepository>
+                    <id>staged-releases</id>
+                    
<url>https://repository.apache.org/content/groups/staging/</url>
+                </pluginRepository>
+            </pluginRepositories>
+        </profile>
+    </profiles>
+
+    <activeProfiles>
+        <activeProfile>local-repo</activeProfile>
+    </activeProfiles>
+</settings>
diff --git a/.github/workflows/check-dependencies.yml 
b/.github/workflows/check-dependencies.yml
index fa28483a9..119d55bb5 100644
--- a/.github/workflows/check-dependencies.yml
+++ b/.github/workflows/check-dependencies.yml
@@ -13,6 +13,7 @@ jobs:
   dependency-check:
     runs-on: ubuntu-latest
     env:
+      USE_STAGE: 'true' # Whether to include the stage repository.
       SCRIPT_DEPENDENCY: hugegraph-server/hugegraph-dist/scripts/dependency
     steps:
       - name: Checkout source
@@ -22,6 +23,13 @@ jobs:
         with:
           java-version: '11'
           distribution: 'adopt'
+
+      - name: use staged maven repo settings
+        if: ${{ env.USE_STAGE == 'true' }}
+        run: |
+          cp $HOME/.m2/settings.xml /tmp/settings.xml
+          mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
+
       - name: mvn install
         run: |
           mvn install -DskipTests=true -ntp
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9451fc655..f6d276e90 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,6 +12,7 @@ jobs:
   build:
     runs-on: ubuntu-20.04
     env:
+      USE_STAGE: 'true' # Whether to include the stage repository.
       TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis
       REPORT_DIR: target/site/jacoco
       BACKEND: ${{ matrix.BACKEND }}
@@ -66,6 +67,12 @@ jobs:
           java-version: ${{ matrix.JAVA_VERSION }}
           distribution: 'zulu'
 
+      - name: use staged maven repo settings
+        if: ${{ env.USE_STAGE == 'true' }}
+        run: |
+          cp $HOME/.m2/settings.xml /tmp/settings.xml
+          mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
+
       - name: Run unit test
         run: |
           $TRAVIS_DIR/run-unit-test.sh $BACKEND
diff --git a/.github/workflows/codeql-analysis.yml 
b/.github/workflows/codeql-analysis.yml
index a8e40be83..958e5b1bd 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -11,6 +11,8 @@ on:
 
 jobs:
   analyze:
+    env:
+      USE_STAGE: 'true' # Whether to include the stage repository.
     name: Analyze
     runs-on: ubuntu-latest
     permissions:
@@ -33,6 +35,12 @@ jobs:
           distribution: 'zulu'
           java-version: '11'
 
+      - name: use staged maven repo settings
+        if: ${{ env.USE_STAGE == 'true' }}
+        run: |
+          cp $HOME/.m2/settings.xml /tmp/settings.xml
+          mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
+
       # Initializes the CodeQL tools for scanning.
       - name: Initialize CodeQL
         uses: github/codeql-action/init@v2
diff --git a/.github/workflows/licence-checker.yml 
b/.github/workflows/licence-checker.yml
index 163e59e1d..3d14cc062 100644
--- a/.github/workflows/licence-checker.yml
+++ b/.github/workflows/licence-checker.yml
@@ -11,7 +11,7 @@ jobs:
   check-license:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
 
       - name: Check License Header
         uses: apache/skywalking-eyes@main
@@ -22,11 +22,6 @@ jobs:
           token: ${{ github.token }}
           config: .licenserc.yaml
 
-      - uses: actions/setup-java@v3
-        with:
-          java-version: '11'
-          distribution: 'adopt'
-
       - name: License check(RAT)
         run: |
           mvn apache-rat:check -ntp
diff --git a/pom.xml b/pom.xml
index 308d2ff75..f5e44e42d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -269,5 +269,16 @@
                 </plugins>
             </build>
         </profile>
+
+        <!-- use mvn -P stage to enable the remote apache-stage repo -->
+        <profile>
+            <id>stage</id>
+            <repositories>
+                <repository>
+                    <id>staged-releases</id>
+                    
<url>https://repository.apache.org/content/groups/staging/</url>
+                </repository>
+            </repositories>
+        </profile>
     </profiles>
 </project>

Reply via email to