feat(cli): 适配使用uploader上传jar包

This commit is contained in:
2024-03-01 14:32:02 +08:00
parent 826f7bc780
commit 9a6eb1e0a4
26 changed files with 97 additions and 32 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-api clean package spring-boot:repackage -D skipTests -s ~/.m2/settings-development.xml
file_path=/Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-api/target/service-api-1.0.0-SNAPSHOT.jar
ytp-transfer2 $file_path
rm $file_path
upload $root_path/service-api/target/service-api-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-check clean package spring-boot:repackage -D skipTests -s ~/.m2/settings-development.xml -P b2b12
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-check/target/service-check-1.0.0-SNAPSHOT.jar
upload $root_path/service-check/target/service-check-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-cloud-query clean package spring-boot:repackage -D skipTests -s ~/.m2/settings-development.xml
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-cloud-query/target/service-cloud-query-1.0.0-SNAPSHOT.jar
upload $root_path/service-cloud-query/target/service-cloud-query-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration,service-forest clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-command clean package spring-boot:repackage -D skipTests -s ~/.m2/settings-development.xml
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-command/target/service-command-1.0.0-SNAPSHOT.jar
upload $root_path/service-command/target/service-command-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration,service-forest,service-executor,service-executor/service-executor-core clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-executor/service-executor-manager clean package -D skipTests -s ~/.m2/settings-development.xml -P b2b12
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-executor/service-executor-manager/target/service-executor-manager-1.0.0-SNAPSHOT.jar
upload $root_path/service-executor/service-executor-manager/target/service-executor-manager-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration,service-forest,service-executor,service-executor/service-executor-core clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-executor/service-executor-task clean package -D skipTests -s ~/.m2/settings-development.xml
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-executor/service-executor-task/target/service-executor-task-1.0.0-SNAPSHOT.jar
upload $root_path/service-executor/service-executor-task/target/service-executor-task-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration,service-forest clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-exporter clean package spring-boot:repackage -D skipTests -s ~/.m2/settings-development.xml
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-exporter/target/service-exporter-1.0.0-SNAPSHOT.jar
upload $root_path/service-exporter/target/service-exporter-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration,service-forest clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-flink-query clean package spring-boot:repackage -D skipTests -s ~/.m2/settings-development.xml
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-flink-query/target/service-flink-query-1.0.0-SNAPSHOT.jar
upload $root_path/service-flink-query/target/service-flink-query-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-gateway clean package spring-boot:repackage -D skipTests -s ~/.m2/settings-development.xml
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-gateway/target/service-gateway-1.0.0-SNAPSHOT.jar
upload $root_path/service-gateway/target/service-gateway-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration,service-forest clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-hudi-query clean package -D skipTests -s ~/.m2/settings-development.xml -P b2b12
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-hudi-query/target/service-hudi-query-1.0.0-SNAPSHOT.jar
upload $root_path/service-hudi-query/target/service-hudi-query-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-info-query clean package spring-boot:repackage -D skipTests -s ~/.m2/settings-development.xml
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-info-query/target/service-info-query-1.0.0-SNAPSHOT.jar
upload $root_path/service-info-query/target/service-info-query-1.0.0-SNAPSHOT.jar

View File

@@ -1,22 +1,20 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
echo 'Build b2a4'
mvn -pl service-launcher clean package -D skipTests -s ~/.m2/settings-development.xml -P b2a4
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-launcher/target/service-launcher-b2a4-1.0.0-SNAPSHOT.jar
rm /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-launcher/target/service-launcher-b2a4-1.0.0-SNAPSHOT.jar
upload $root_path/service-launcher/target/service-launcher-b2a4-1.0.0-SNAPSHOT.jar
echo 'Build b2b1'
mvn -pl service-launcher clean package -D skipTests -s ~/.m2/settings-development.xml -P b2b1
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-launcher/target/service-launcher-b2b1-1.0.0-SNAPSHOT.jar
rm /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-launcher/target/service-launcher-b2b1-1.0.0-SNAPSHOT.jar
upload $root_path/service-launcher/target/service-launcher-b2b1-1.0.0-SNAPSHOT.jar
echo 'Build b2b5'
mvn -pl service-launcher clean package -D skipTests -s ~/.m2/settings-development.xml -P b2b5
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-launcher/target/service-launcher-b2b5-1.0.0-SNAPSHOT.jar
rm /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-launcher/target/service-launcher-b2b5-1.0.0-SNAPSHOT.jar
upload $root_path/service-launcher/target/service-launcher-b2b5-1.0.0-SNAPSHOT.jar
echo 'Build b2b12'
mvn -pl service-launcher clean package -D skipTests -s ~/.m2/settings-development.xml -P b2b12
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-launcher/target/service-launcher-b2b12-1.0.0-SNAPSHOT.jar
rm /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-launcher/target/service-launcher-b2b12-1.0.0-SNAPSHOT.jar
upload $root_path/service-launcher/target/service-launcher-b2b12-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration,service-forest clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-loki-query clean package spring-boot:repackage -D skipTests -s ~/.m2/settings-development.xml
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-loki-query/target/service-loki-query-1.0.0-SNAPSHOT.jar
upload $root_path/service-loki-query/target/service-loki-query-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-pulsar-query clean package spring-boot:repackage -D skipTests -s ~/.m2/settings-development.xml
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-pulsar-query/target/service-pulsar-query-1.0.0-SNAPSHOT.jar
upload $root_path/service-pulsar-query/target/service-pulsar-query-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-queue clean package spring-boot:repackage -D skipTests -s ~/.m2/settings-development.xml
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-queue/target/service-queue-1.0.0-SNAPSHOT.jar
upload $root_path/service-queue/target/service-queue-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-scheduler clean package spring-boot:repackage -D skipTests -s ~/.m2/settings-development.xml
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-scheduler/target/service-scheduler-1.0.0-SNAPSHOT.jar
upload $root_path/service-scheduler/target/service-scheduler-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl utils/sync clean package -D skipTests -s ~/.m2/settings-development.xml
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/utils/sync/target/sync-1.0.0-SNAPSHOT.jar
upload $root_path/utils/sync/target/sync-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration,service-forest clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-web clean package spring-boot:repackage -D skipTests -s ~/.m2/settings-development.xml
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-web/target/service-web-1.0.0-SNAPSHOT.jar
upload $root_path/service-web/target/service-web-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-yarn-query clean package spring-boot:repackage -D skipTests -s ~/.m2/settings-development.xml
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-yarn-query/target/service-yarn-query-1.0.0-SNAPSHOT.jar
upload $root_path/service-yarn-query/target/service-yarn-query-1.0.0-SNAPSHOT.jar

View File

@@ -1,4 +1,6 @@
#!/bin/bash
root_path=$(dirname $(cd $(dirname $0);pwd))
source $root_path/bin/library.sh
mvn -pl service-common,service-dependencies,service-configuration clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-zookeeper-query clean package spring-boot:repackage -D skipTests -s ~/.m2/settings-development.xml
ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-zookeeper-query/target/service-zookeeper-query-1.0.0-SNAPSHOT.jar
upload $root_path/service-zookeeper-query/target/service-zookeeper-query-1.0.0-SNAPSHOT.jar

20
bin/library.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
encrypt_username=AxhEbscwsJDbYMH2
encrypt_password=cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4
upload_url=http://$encrypt_username:$encrypt_password@132.126.207.34:36800
root_path=$(dirname $(cd $(dirname $0);pwd))
function upload() {
source_file_path=$(realpath $1)
file_name=$(basename $source_file_path)
echo "↪ Source md5: $(md5sum $source_file_path | awk '{print $1}')"
echo "↪ Uploading $source_file_path"
curl $upload_url/file/upload/$file_name -T $source_file_path
echo "↪ Upload ytp success"
echo "↪ Download: curl $upload_url/file/download/$file_name -o $file_name"
echo "↪ Delete source"
rm $source_file_path
}