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-toolchain.git
The following commit(s) were added to refs/heads/master by this push:
new e8fd3e0a chore(ci): add stage profile settings (#536)
e8fd3e0a is described below
commit e8fd3e0a6c10d34b4bf5e92495f493c913d7895e
Author: 小宇 <[email protected]>
AuthorDate: Thu Nov 23 18:25:30 2023 +0800
chore(ci): add stage profile settings (#536)
* chore(ci): add stage profile settings
* fix
* fix
* fix spark-connector-ci
* Update .github/workflows/license-checker.yml
* Update license-checker.yml
---------
Co-authored-by: imbajin <[email protected]>
---
.github/configs/settings.xml | 60 ++++++++++++++++++++++++++++++++
.github/workflows/client-ci.yml | 7 ++++
.github/workflows/codeql-analysis.yml | 8 +++++
.github/workflows/hubble-ci.yml | 7 ++++
.github/workflows/license-checker.yml | 22 ++++++------
.github/workflows/loader-ci.yml | 7 ++++
.github/workflows/spark-connector-ci.yml | 9 ++++-
.github/workflows/tools-ci.yml | 6 ++++
pom.xml | 11 ++++++
9 files changed, 124 insertions(+), 13 deletions(-)
diff --git a/.github/configs/settings.xml b/.github/configs/settings.xml
new file mode 100644
index 00000000..294ded1c
--- /dev/null
+++ b/.github/configs/settings.xml
@@ -0,0 +1,60 @@
+<!--
+ 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/client-ci.yml b/.github/workflows/client-ci.yml
index 15488ae0..e414921d 100644
--- a/.github/workflows/client-ci.yml
+++ b/.github/workflows/client-ci.yml
@@ -21,6 +21,7 @@ jobs:
client-ci:
runs-on: ubuntu-20.04
env:
+ USE_STAGE: 'true' # Whether to include the stage repository.
TRAVIS_DIR: hugegraph-client/assembly/travis
COMMIT_ID: be6ee386b9939dc6bd6fcbdf2274b8acc3a0a314
strategy:
@@ -46,6 +47,12 @@ jobs:
with:
fetch-depth: 2
+ - name: Use staged maven repo
+ 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: Compile
run: |
mvn -e compile -pl hugegraph-client -Dmaven.javadoc.skip=true -ntp
diff --git a/.github/workflows/codeql-analysis.yml
b/.github/workflows/codeql-analysis.yml
index d709ec89..838b4c5f 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -20,6 +20,8 @@ on:
jobs:
analyze:
+ env:
+ USE_STAGE: 'true' # Whether to include the stage repository.
name: Analyze
runs-on: ubuntu-latest
permissions:
@@ -42,6 +44,12 @@ jobs:
with:
distribution: 'zulu'
java-version: '8'
+
+ - 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: Use Node.js 16
uses: actions/setup-node@v3
diff --git a/.github/workflows/hubble-ci.yml b/.github/workflows/hubble-ci.yml
index 007b45f6..c07078c1 100644
--- a/.github/workflows/hubble-ci.yml
+++ b/.github/workflows/hubble-ci.yml
@@ -29,6 +29,7 @@ jobs:
hubble-ci:
runs-on: ubuntu-latest
env:
+ USE_STAGE: 'true' # Whether to include the stage repository.
STATIC_DIR: hugegraph-hubble/hubble-dist/assembly/static
steps:
- name: Install JDK 11
@@ -76,6 +77,12 @@ jobs:
with:
fetch-depth: 2
+ - 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: Compile
run: |
mvn install -pl hugegraph-client,hugegraph-loader -am
-Dmaven.javadoc.skip=true -DskipTests -ntp
diff --git a/.github/workflows/license-checker.yml
b/.github/workflows/license-checker.yml
index 540de04e..77a51fe6 100644
--- a/.github/workflows/license-checker.yml
+++ b/.github/workflows/license-checker.yml
@@ -30,7 +30,7 @@ jobs:
check-license-header:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
# More info could refer to: https://github.com/apache/skywalking-eyes
- name: Check License Header
uses: apache/skywalking-eyes@main
@@ -40,16 +40,6 @@ jobs:
log: info
config: .licenserc.yaml
- - uses: actions/setup-java@v3
- with:
- java-version: '11'
- distribution: 'adopt'
-
- - name: Use Node.js 16
- uses: actions/setup-node@v3
- with:
- node-version: '16'
-
- name: License check(RAT)
run: |
mvn apache-rat:check -ntp
@@ -60,9 +50,10 @@ jobs:
runs-on: ubuntu-latest
env:
SCRIPT_DEPENDENCY: hugegraph-dist/scripts/dependency
+ USE_STAGE: 'true' # Whether to include the stage repository.
steps:
- name: Checkout source
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
@@ -72,6 +63,13 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: '16'
+
+ - 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/loader-ci.yml b/.github/workflows/loader-ci.yml
index 0a7db522..d3132a31 100644
--- a/.github/workflows/loader-ci.yml
+++ b/.github/workflows/loader-ci.yml
@@ -22,6 +22,7 @@ jobs:
loader-ci:
runs-on: ubuntu-latest
env:
+ USE_STAGE: 'true' # Whether to include the stage repository.
TRAVIS_DIR: hugegraph-loader/assembly/travis
STATIC_DIR: hugegraph-loader/assembly/static
COMMIT_ID: be6ee386b9939dc6bd6fcbdf2274b8acc3a0a314
@@ -47,6 +48,12 @@ jobs:
with:
fetch-depth: 2
+ - 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: Compile
run: |
mvn install -pl hugegraph-client,hugegraph-loader -am
-Dmaven.javadoc.skip=true -DskipTests -ntp
diff --git a/.github/workflows/spark-connector-ci.yml
b/.github/workflows/spark-connector-ci.yml
index efa4639b..c5b312bc 100644
--- a/.github/workflows/spark-connector-ci.yml
+++ b/.github/workflows/spark-connector-ci.yml
@@ -22,6 +22,7 @@ jobs:
spark-connector-ci:
runs-on: ubuntu-latest
env:
+ USE_STAGE: 'true' # Whether to include the stage repository.
TRAVIS_DIR: hugegraph-spark-connector/assembly/travis
VERSION_ID: 1.0.0
steps:
@@ -43,9 +44,15 @@ jobs:
with:
fetch-depth: 2
+ - 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: Compile
run: |
- mvn install -pl hugegraph-spark-connector -Dmaven.javadoc.skip=true
-DskipTests -ntp
+ mvn install -pl hugegraph-client,hugegraph-spark-connector -am
-Dmaven.javadoc.skip=true -DskipTests -ntp
- name: Prepare env and service
run: |
diff --git a/.github/workflows/tools-ci.yml b/.github/workflows/tools-ci.yml
index 5028048c..f0e66625 100644
--- a/.github/workflows/tools-ci.yml
+++ b/.github/workflows/tools-ci.yml
@@ -21,6 +21,7 @@ jobs:
tools-ci:
runs-on: ubuntu-latest
env:
+ USE_STAGE: 'true' # Whether to include the stage repository.
TRAVIS_DIR: hugegraph-tools/assembly/travis
# TODO: could we use one param to unify it? or use a action template
(could use one ci file)
COMMIT_ID: be6ee386b9939dc6bd6fcbdf2274b8acc3a0a314
@@ -40,6 +41,11 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 2
+ - 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: Compile
run: |
mvn install -pl hugegraph-client,hugegraph-tools -am
-Dmaven.javadoc.skip=true -DskipTests -ntp
diff --git a/pom.xml b/pom.xml
index 7eb4cb50..00d1ecd4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -375,6 +375,17 @@
</pluginManagement>
</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>
<build>