ci: fix Maven artifact restoration in workflow

- Add step to restore Maven artifacts from download to ~/.m2/repository
- Restructure artifact upload to use consistent directory layout
- Remove obsolete 'version' field from docker-compose.yml to eliminate warnings
- Ensures SeaweedFS Java dependencies are available during test execution
This commit is contained in:
chrislu
2025-11-22 13:14:52 -08:00
parent 93f1d0fc14
commit e63feb48fc
2 changed files with 34 additions and 5 deletions
+34 -3
View File
@@ -75,13 +75,20 @@ jobs:
mvn clean install -DskipTests -Dgpg.skip=true
echo "✓ HDFS3 client built"
- name: Prepare artifacts for upload
run: |
echo "Preparing artifacts for upload..."
mkdir -p artifacts/docker
mkdir -p artifacts/.m2/repository/com
cp docker/weed artifacts/docker/
cp -r ~/.m2/repository/com/seaweedfs artifacts/.m2/repository/com/
echo "✓ Artifacts prepared"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: seaweedfs-build
path: |
docker/weed
~/.m2/repository/com/seaweedfs
path: artifacts/
retention-days: 1
spark-tests:
@@ -106,6 +113,18 @@ jobs:
name: seaweedfs-build
path: .
- name: Restore Maven repository
run: |
echo "Restoring Maven artifacts to ~/.m2/repository..."
mkdir -p ~/.m2/repository/com
if [ -d ".m2/repository/com/seaweedfs" ]; then
cp -r .m2/repository/com/seaweedfs ~/.m2/repository/com/
echo "✓ Maven artifacts restored"
else
echo "⚠️ Warning: Maven artifacts not found in download"
ls -la
fi
- name: Start SeaweedFS services
working-directory: test/java/spark
run: |
@@ -213,6 +232,18 @@ jobs:
name: seaweedfs-build
path: .
- name: Restore Maven repository
run: |
echo "Restoring Maven artifacts to ~/.m2/repository..."
mkdir -p ~/.m2/repository/com
if [ -d ".m2/repository/com/seaweedfs" ]; then
cp -r .m2/repository/com/seaweedfs ~/.m2/repository/com/
echo "✓ Maven artifacts restored"
else
echo "⚠️ Warning: Maven artifacts not found in download"
ls -la
fi
- name: Cache Apache Spark
id: cache-spark
uses: actions/cache@v4