Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support visit of stage repository #2305

Merged
merged 6 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/configs/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<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>
msgui marked this conversation as resolved.
Show resolved Hide resolved
<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>
Comment on lines +31 to +36
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we don't need it, although we could keep it now

</profile>
</profiles>
<activeProfiles>
msgui marked this conversation as resolved.
Show resolved Hide resolved
<activeProfile>local-repo</activeProfile>
</activeProfiles>
</settings>
6 changes: 6 additions & 0 deletions .github/workflows/check-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,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
Expand All @@ -23,6 +24,11 @@ jobs:
with:
java-version: '11'
distribution: 'adopt'
- name: copy and overwrite maven settings
msgui marked this conversation as resolved.
Show resolved Hide resolved
if: ${{ env.USE_STAGE == 'true' }}
run: |
cp $HOME/.m2/settings.xml /tmp/settings.xml
mv -f .github/configs/settings.xml $HOME/.m2/settings.xml
msgui marked this conversation as resolved.
Show resolved Hide resolved
- name: mvn install
run: |
mvn install -DskipTests=true -ntp
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -46,22 +47,31 @@ jobs:
with:
fetch-depth: 2

- name: copy and overwrite maven settings
msgui marked this conversation as resolved.
Show resolved Hide resolved
if: ${{ env.USE_STAGE == 'true' }}
run: |
cp $HOME/.m2/settings.xml /tmp/settings.xml
mv -f .github/configs/settings.xml $HOME/.m2/settings.xml
msgui marked this conversation as resolved.
Show resolved Hide resolved

- name: Compile
run: |
mvn clean compile -U -Dmaven.javadoc.skip=true -ntp

- name: Install JDK 8
uses: actions/setup-java@v3
with:
overwrite-settings: false
java-version: '8'
distribution: 'zulu'

- name: Prepare env and service
run: |
$TRAVIS_DIR/install-backend.sh $BACKEND

- name: Install JDK ${{ matrix.JAVA_VERSION }}
uses: actions/setup-java@v3
with:
overwrite-settings: false
java-version: ${{ matrix.JAVA_VERSION }}
distribution: 'zulu'

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:

jobs:
analyze:
env:
USE_STAGE: 'true' # Whether to include the stage repository.
name: Analyze
runs-on: ubuntu-latest
permissions:
Expand All @@ -33,6 +35,12 @@ jobs:
distribution: 'zulu'
java-version: '11'

- name: copy and overwrite maven settings
msgui marked this conversation as resolved.
Show resolved Hide resolved
if: ${{ env.USE_STAGE == 'true' }}
run: |
cp $HOME/.m2/settings.xml /tmp/settings.xml
mv -f .github/configs/settings.xml $HOME/.m2/settings.xml
msgui marked this conversation as resolved.
Show resolved Hide resolved

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
17 changes: 17 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,21 @@
<module>hugegraph-pd</module>
<module>hugegraph-store</module>
</modules>
<profiles>
<profile>
<id>stage</id>
<repositories>
<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>
</project>