diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 2eca08df4f..a743d7e79b 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -51,7 +51,7 @@ jobs: run: mvn -B package --file pom.xml - name: Unzip jar - run: mkdir -p backend/target/dependency && (cd backend/target/dependency; jar -xf ../*.jar) + run: mkdir -p backend/target/dependency && (cd backend/target/dependency; jar -xf ../*.jar) && mkdir -p backend/target/dependency/BOOT-INF/classes/jmeter/lib/junit - name: Prepare id: prepare diff --git a/Dockerfile b/Dockerfile index 440f7c8a60..93f5fd1457 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,10 +9,10 @@ COPY ${DEPENDENCY}/BOOT-INF/lib /opt/lib COPY ${DEPENDENCY}/META-INF /opt/META-INF COPY ${DEPENDENCY}/BOOT-INF/classes /opt -ENV JAVA_CLASSPATH=/opt:/opt/lib/ms-jmeter-core-*.jar:/opt/lib/* +ENV JAVA_CLASSPATH=/opt:/opt/lib/ms-jmeter-core.jar:/opt/lib/* ENV JAVA_MAIN_CLASS=io.metersphere.Application ENV AB_OFF=true ENV MS_VERSION=${MS_VERSION} ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true" -CMD ["/deployments/run-java.sh"] +CMD ["sh", "-c", "mv /opt/lib/ms-jmeter-core-*.jar /opt/lib/ms-jmeter-core.jar && /deployments/run-java.sh"] diff --git a/Jenkinsfile b/Jenkinsfile index e9fda0ea09..a96b5589dd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { // sh "yarn install" // sh "cd .." sh "./mvnw clean package --settings ./settings.xml" - sh "mkdir -p backend/target/dependency && (cd backend/target/dependency; jar -xf ../*.jar)" + sh "mkdir -p backend/target/dependency && (cd backend/target/dependency; jar -xf ../*.jar) && mkdir -p backend/target/dependency/BOOT-INF/classes/jmeter/lib/junit" } } }