diff --git a/.drone-images.yml b/.drone-images.yml index f7bb99060..2ef9201b1 100644 --- a/.drone-images.yml +++ b/.drone-images.yml @@ -24,39 +24,46 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 - mvn package -Dmaven.test.skip=true # 应用打包命令 - | if [ "${service}" = "gateway" ] || [ "${service}" = "all" ]; then - cp ./yudao-gateway/target/yudao-gateway.jar /app/build/yudao-gateway/target - cp ./yudao-gateway/Dockerfile /app/build/yudao-gateway - cp ./yudao-gateway/run.sh /app/build/yudao-gateway + mkdir -p /app/build/yudao-gateway/target + cp ./yudao-gateway/target/yudao-gateway.jar /app/build/yudao-gateway/target/ + cp ./yudao-gateway/Dockerfile /app/build/yudao-gateway/ + cp ./yudao-gateway/run.sh /app/build/yudao-gateway/ fi if [ "${service}" = "system" ] || [ "${service}" = "all" ]; then - cp ./yudao-module-system/yudao-module-system-biz/target/yudao-module-system-biz.jar /app/build/yudao-module-system/target - cp ./yudao-module-system/yudao-module-system-biz/Dockerfile /app/build/yudao-module-system - cp ./yudao-module-system/yudao-module-system-biz/run.sh /app/build/yudao-module-system + mkdir -p /app/build/yudao-module-system/target + cp ./yudao-module-system/yudao-module-system-biz/target/yudao-module-system-biz.jar /app/build/yudao-module-system/target/ + cp ./yudao-module-system/yudao-module-system-biz/Dockerfile /app/build/yudao-module-system/ + cp ./yudao-module-system/yudao-module-system-biz/run.sh /app/build/yudao-module-system/ fi if [ "${service}" = "infra" ] || [ "${service}" = "all" ]; then - cp ./yudao-module-infra/yudao-module-infra-biz/target/yudao-module-infra-biz.jar /app/build/yudao-module-infra/target - cp ./yudao-module-infra/yudao-module-infra-biz/Dockerfile /app/build/yudao-module-infra - cp ./yudao-module-infra/yudao-module-infra-biz/run.sh /app/build/yudao-module-infra + mkdir -p /app/build/yudao-module-infra/target + cp ./yudao-module-infra/yudao-module-infra-biz/target/yudao-module-infra-biz.jar /app/build/yudao-module-infra/target/ + cp ./yudao-module-infra/yudao-module-infra-biz/Dockerfile /app/build/yudao-module-infra/ + cp ./yudao-module-infra/yudao-module-infra-biz/run.sh /app/build/yudao-module-infra/ fi if [ "${service}" = "job" ] || [ "${service}" = "all" ]; then - cp ./ludu-job-admin/ludu-job-admin-biz/target/ludu-job-admin-biz.jar /app/build/ludu-job-admin/target - cp ./ludu-job-admin/ludu-job-admin-biz/Dockerfile /app/build/ludu-job-admin - cp ./ludu-job-admin/ludu-job-admin-biz/run.sh /app/build/ludu-job-admin + mkdir -p /app/build/ludu-job-admin/target + cp ./ludu-job-admin/ludu-job-admin-biz/target/ludu-job-admin-biz.jar /app/build/ludu-job-admin/target/ + cp ./ludu-job-admin/ludu-job-admin-biz/Dockerfile /app/build/ludu-job-admin/ + cp ./ludu-job-admin/ludu-job-admin-biz/run.sh /app/build/ludu-job-admin/ fi if [ "${service}" = "ticketing" ] || [ "${service}" = "all" ]; then - cp ./ludu-module-ticketing/ludu-module-ticketing-biz/target/ludu-module-ticketing-biz.jar /app/build/ludu-module-ticketing/target - cp ./ludu-module-ticketing/ludu-module-ticketing-biz/Dockerfile /app/build/ludu-module-ticketing - cp ./ludu-module-ticketing/ludu-module-ticketing-biz/run.sh /app/build/ludu-module-ticketing + mkdir -p /app/build/ludu-module-ticketing/target + cp ./ludu-module-ticketing/ludu-module-ticketing-biz/target/ludu-module-ticketing-biz.jar /app/build/ludu-module-ticketing/target/ + cp ./ludu-module-ticketing/ludu-module-ticketing-biz/Dockerfile /app/build/ludu-module-ticketing/ + cp ./ludu-module-ticketing/ludu-module-ticketing-biz/run.sh /app/build/ludu-module-ticketing/ fi if [ "${service}" = "parking" ] || [ "${service}" = "all" ]; then - cp ./ludu-module-parking/ludu-module-parking-biz/target/ludu-module-parking-biz.jar /app/build/ludu-module-parking/target - cp ./ludu-module-parking/ludu-module-parking-biz/Dockerfile /app/build/ludu-module-parking - cp ./ludu-module-parking/ludu-module-parking-biz/run.sh /app/build/ludu-module-parking + mkdir -p /app/build/ludu-module-parking/target + cp ./ludu-module-parking/ludu-module-parking-biz/target/ludu-module-parking-biz.jar /app/build/ludu-module-parking/target/ + cp ./ludu-module-parking/ludu-module-parking-biz/Dockerfile /app/build/ludu-module-parking/ + cp ./ludu-module-parking/ludu-module-parking-biz/run.sh /app/build/ludu-module-parking/ fi if [ "${service}" = "datacenter" ] || [ "${service}" = "all" ]; then + mkdir -p /app/build/ludu-module-datacenter/target cp ./ludu-module-datacenter/ludu-module-datacenter-biz/target/ludu-module-datacenter-biz.jar /app/build/ludu-module-datacenter/target - cp ./ludu-module-datacenter/ludu-module-datacenter-biz/Dockerfile /app/build/ludu-module-datacenter - cp ./ludu-module-datacenter/ludu-module-datacenter-biz/run.sh /app/build/ludu-module-datacenter + cp ./ludu-module-datacenter/ludu-module-datacenter-biz/Dockerfile /app/build/ludu-module-datacenter/ + cp ./ludu-module-datacenter/ludu-module-datacenter-biz/run.sh /app/build/ludu-module-datacenter/ fi - name: push-images @@ -82,14 +89,14 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 deploy_service() { local image_name=$1 local container_name=$2 - + cd /ludu/build/${image_name} docker stop ${container_name} docker rm ${container_name} docker rmi -f ${image_name}:1.0.0 docker buildx build -f Dockerfile -t ${image_name}:1.0.0 . docker tag ${image_name}:1.0.0 120.46.37.243:8080/lundu/${image_name}:1.0.0 - docker pull 120.46.37.243:8080/lundu/${image_name}:1.0.0 + docker push 120.46.37.243:8080/lundu/${image_name}:1.0.0 } if [ "${service}" = "gateway" ] || [ "${service}" = "all" ]; then deploy_service "yudao-gateway" "yudao-gateway" @@ -138,8 +145,8 @@ volumes: # 定义流水线挂载目录,用于共享数据 - name: maven-build host: - path: /ludu/build # 从宿主机中挂载的目录 + path: /ludu/maven/build # 从宿主机中挂载的目录 - name: maven-cache host: - path: /ludu/cache # 从宿主机中挂载的目录 \ No newline at end of file + path: /ludu/maven/cache # 从宿主机中挂载的目录 \ No newline at end of file diff --git a/.drone.yml b/.drone.yml index 4dc88897b..e7152124c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -50,7 +50,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 - chmod +x run.sh - ./run.sh || echo "job build failed" - - cd ludu-module-datacenter/ludu-module-datacenter-biz/ + - cd /root/ludu-cloud/ludu-module-datacenter/ludu-module-datacenter-biz/ - chmod +x run.sh - ./run.sh || echo "datacenter build failed" diff --git a/settings.xml b/settings.xml new file mode 100644 index 000000000..6c82c9a8a --- /dev/null +++ b/settings.xml @@ -0,0 +1,302 @@ + + + + + + + +D:\Maven\apache-maven-3.5.2\repository + + + + + + + + + + + + + + + + + + + + + + + + + + + alimaven + aliyun maven + http://maven.aliyun.com/nexus/content/groups/public/ + central + + + alimaven + central + aliyun maven + http://maven.aliyun.com/nexus/content/repositories/central/ + + + repo2 + central + Human Readable Name for this Mirror. + http://repo2.maven.org/maven2/ + + + maven-default-http-blocker + external:http:* + Pseudo repository to mirror external repositories initially using HTTP. + http://0.0.0.0/ + + + + + + + + + + + + + + +