ci: Jenkinsfile changed
This commit is contained in:
parent
5489e7dddf
commit
57b6d11793
|
@ -91,34 +91,7 @@ pipeline {
|
|||
cp -rf $LOCAL_REPOSITORY/io/metersphere/$library/${REVISION}/$library-${REVISION}.jar backend/app/target/dependency/BOOT-INF/lib/
|
||||
done
|
||||
|
||||
docker --config /home/metersphere/.docker buildx build --no-cache --build-arg MS_VERSION=\${TAG_NAME:-\$BRANCH_NAME}-\${GIT_COMMIT:0:8} -t ${IMAGE_PREFIX}/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME}-community --platform linux/amd64,linux/arm64 . --push
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Enterprise build & push') {
|
||||
when { environment name: 'BUILD_SDK', value: 'false' }
|
||||
steps {
|
||||
configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) {
|
||||
sh '''#!/bin/bash -xe
|
||||
export JAVA_HOME=/opt/jdk-21
|
||||
export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH
|
||||
export PATH=$JAVA_HOME/bin:/opt/apache-maven-3.8.3/bin:$PATH
|
||||
java -version
|
||||
LOCAL_REPOSITORY=$(./mvnw help:evaluate -Dexpression=settings.localRepository --settings ./settings.xml -q -DforceStdout)
|
||||
# echo $LOCAL_REPOSITORY
|
||||
|
||||
libraries=('metersphere-api-test-impl' 'general-xpack-impl')
|
||||
for library in "${libraries[@]}";
|
||||
do
|
||||
cp -rf $LOCAL_REPOSITORY/io/metersphere/$library/${REVISION}/$library-${REVISION}.jar backend/app/target/dependency/BOOT-INF/lib/
|
||||
#
|
||||
rm -rf $LOCAL_REPOSITORY/io/metersphere/$library/${REVISION}/target/lib/*
|
||||
./mvnw dependency:copy-dependencies -DincludeScope=runtime --file $LOCAL_REPOSITORY/io/metersphere/$library/${REVISION}/$library-${REVISION}.pom --settings ./settings.xml
|
||||
cp -rf $LOCAL_REPOSITORY/io/metersphere/$library/${REVISION}/target/lib/* backend/app/target/dependency/BOOT-INF/lib/
|
||||
done
|
||||
|
||||
docker --config /home/metersphere/.docker buildx build --no-cache --build-arg MS_VERSION=\${TAG_NAME:-\$BRANCH_NAME}-\${GIT_COMMIT:0:8} -t ${IMAGE_PREFIX}/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME}-enterprise --platform linux/amd64,linux/arm64 . --push
|
||||
docker --config /home/metersphere/.docker buildx build --no-cache --build-arg MS_VERSION=\${TAG_NAME:-\$BRANCH_NAME}-\${GIT_COMMIT:0:8} -t ${IMAGE_PREFIX}/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME} --platform linux/amd64,linux/arm64 . --push
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue