Bläddra i källkod

[CI] Fix cluster test abnormal (#11688)

* fix cluster test abnormal
xiangzihao 2 år sedan
förälder
incheckning
71eeab3d98

+ 3 - 2
.github/workflows/cluster-test/mysql/Dockerfile

@@ -20,11 +20,12 @@ FROM openjdk:8-jre-slim-buster
 RUN apt update ; \
     apt install -y curl wget default-mysql-client sudo openssh-server netcat-traditional ;
 
-#COPY ./dolphinscheduler-dist/target/apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz /root
 COPY ./apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz /root
 RUN tar -zxvf /root/apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz -C ~
 
-ENV DOLPHINSCHEDULER_HOME /root/apache-dolphinscheduler-*-SNAPSHOT-bin
+RUN mv /root/apache-dolphinscheduler-*-SNAPSHOT-bin /root/apache-dolphinscheduler-test-SNAPSHOT-bin
+
+ENV DOLPHINSCHEDULER_HOME /root/apache-dolphinscheduler-test-SNAPSHOT-bin
 
 #Setting install.sh
 COPY .github/workflows/cluster-test/mysql/install_env.sh $DOLPHINSCHEDULER_HOME/bin/env/install_env.sh

+ 0 - 1
.github/workflows/cluster-test/mysql/deploy.sh

@@ -19,7 +19,6 @@ set -euox pipefail
 
 
 USER=root
-DOLPHINSCHEDULER_HOME=/root/apache-dolphinscheduler-*-SNAPSHOT-bin
 
 #Create database
 mysql -hmysql -P3306 -uroot -p123456 -e "CREATE DATABASE IF NOT EXISTS dolphinscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;"

+ 1 - 0
.github/workflows/cluster-test/mysql/start-job.sh

@@ -15,6 +15,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+set -euox pipefail
 
 #Start base service containers
 docker-compose -f .github/workflows/cluster-test/mysql/docker-compose-base.yaml up -d

+ 3 - 2
.github/workflows/cluster-test/postgresql/Dockerfile

@@ -20,11 +20,12 @@ FROM openjdk:8-jre-slim-buster
 RUN apt update ; \
     apt install -y curl wget sudo openssh-server netcat-traditional ;
 
-#COPY ./dolphinscheduler-dist/target/apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz /root
 COPY ./apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz /root
 RUN tar -zxvf /root/apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz -C ~
 
-ENV DOLPHINSCHEDULER_HOME /root/apache-dolphinscheduler-*-SNAPSHOT-bin
+RUN mv /root/apache-dolphinscheduler-*-SNAPSHOT-bin /root/apache-dolphinscheduler-test-SNAPSHOT-bin
+
+ENV DOLPHINSCHEDULER_HOME /root/apache-dolphinscheduler-test-SNAPSHOT-bin
 
 #Setting install.sh
 COPY .github/workflows/cluster-test/postgresql/install_env.sh $DOLPHINSCHEDULER_HOME/bin/env/install_env.sh

+ 0 - 1
.github/workflows/cluster-test/postgresql/deploy.sh

@@ -19,7 +19,6 @@ set -euox pipefail
 
 
 USER=root
-DOLPHINSCHEDULER_HOME=/root/apache-dolphinscheduler-*-SNAPSHOT-bin
 
 #Sudo
 sed -i '$a'$USER'  ALL=(ALL)  NOPASSWD: NOPASSWD: ALL' /etc/sudoers

+ 1 - 0
.github/workflows/cluster-test/postgresql/start-job.sh

@@ -15,6 +15,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+set -euox pipefail
 
 #Start base service containers
 docker-compose -f .github/workflows/cluster-test/postgresql/docker-compose-base.yaml up -d