本地先启动jpom server + agent:
/Users/jelex/Documents/work/jpom-2.10.40/server-2.10.40-release/bin
jelex@jelexxudeMacBook-Pro bin % sh Server.sh start/Users/jelex/Documents/work/jpom-2.10.40/agent-2.10.40-release/bin
jelex@jelexxudeMacBook-Pro bin % ./Agent.sh startjelex@jelexxudeMacBook-Pro bin % netstat -ant | grep 2123jelex@jelexxudeMacBook-Pro bin % ps -ef | grep jpom
jwt-learn[https://gitee.com/jelex/jwt-learn.git]
本机mac m1:
本地docker配置:
{"registry-mirrors": ["https://dbie4irj.mirror.aliyuncs.com"],"insecure-registries":["101.43.xxx.xx:3306"],"features": {"buildkit": true},"experimental": false,"builder": {"gc": {"defaultKeepStorage": "20GB","enabled": true}}
}
如果不配置上述,会报错:
jelex@jelexxudeMacBook-Pro ~ % docker login -u admin 101.43.xxx.xx:3306
Password:
Error response from daemon: Get "https://101.43.xxx.xx:3306/v2/": http: server gave HTTP response to HTTPS client
本地登录:
jelex@jelexxudeMacBook-Pro ~ % docker login -u admin -p '密码密码密码' 101.43.xxx.xx:3306
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded
jelex@jelexxudeMacBook-Pro ~ %
本地拉取镜像:
docker pull 101.43.xxx.xx:3306/repo/jwtlearn:1.0
运行:
jelex@jelexxudeMacBook-Pro ~ % docker run -name jwtlearn p 8080:8080 -d 746fb939ac27
postman测试:
http://localhost:8080/jwt/api/v1/login?userName=zss&pwd=1
http://localhost:8080/jwt/api/v1/user
附录:完整构建日志:
[SYSTEM-INFO] 当前构建中任务数:0,队列中任务数:0
[SYSTEM-INFO] 开始执行构建任务,任务等待时间:2毫秒
[SYSTEM-INFO] 开始执行 准备构建流程
[SYSTEM-INFO] 开始构建 #1 构建执行路径 : /Users/jelex/Documents/work/jpom-2.10.40/server-2.10.40-release/data/build/f9bc3e55537f40038dc80e07af054058/source
[SYSTEM-INFO] 执行结束 准备构建流程,耗时:2毫秒
[SYSTEM-INFO] 开始执行 拉取仓库代码流程
[SYSTEM-INFO] repository [master] clone pull from master
Automatically re-clones repositoriesremote: Enumerating objects: 68
remote: Enumerating objects: 68remote: Counting objects: 4% ( 1/25)
remote: Counting objects: 8% ( 2/25)
remote: Counting objects: 12% ( 3/25)
remote: Counting objects: 16% ( 4/25)
remote: Counting objects: 20% ( 5/25)
remote: Counting objects: 28% ( 7/25)
remote: Counting objects: 32% ( 8/25)
remote: Counting objects: 36% ( 9/25)
remote: Counting objects: 40% (10/25)
remote: Counting objects: 48% (12/25)
remote: Counting objects: 52% (13/25)
remote: Counting objects: 56% (14/25)
remote: Counting objects: 60% (15/25)
remote: Counting objects: 68% (17/25)
remote: Counting objects: 72% (18/25)
remote: Counting objects: 76% (19/25)
remote: Counting objects: 80% (20/25)
remote: Counting objects: 88% (22/25)
remote: Counting objects: 92% (23/25)
remote: Counting objects: 96% (24/25)
remote: Counting objects: 100% (25/25)
remote: Counting objects: 100% (25/25)remote: Compressing objects: 100% (19/19)Receiving objects: 100% (68/68)Resolving deltas: 100% (4/4)Updating references: 100% (1/1)Checking out files: 100% (20/20)Pull: 50% (1/2)
Pull: 100% (2/2)
Pull: 100% (2/2)
mergeResult Merge of revisions ad03c46672ee98be86717aef465c43080e7127a1, ad03c46672ee98be86717aef465c43080e7127a1 with base ad03c46672ee98be86717aef465c43080e7127a1 using strategy recursive resulted in: Already-up-to-date.
fetchedFrom origin[SYSTEM-INFO] master 调整docker位置 jelex[1170366657@qq.com] 2023-06-13 15:36:24 1
[SYSTEM-INFO] ##################################################################################
[SYSTEM-INFO] BUILD_ID=f9bc3e55537f40038dc80e07af054058
[SYSTEM-INFO] BUILD_NAME=docker-harbor
[SYSTEM-INFO] BUILD_SOURCE_FILE=/Users/jelex/Documents/work/jpom-2.10.40/server-2.10.40-release/data/build/f9bc3e55537f40038dc80e07af054058/source
[SYSTEM-INFO] BUILD_NUMBER_ID=1
[SYSTEM-INFO] BUILD_CONFIG_BRANCH_NAME=master
[SYSTEM-INFO] BUILD_BRANCH_NAME=master
[SYSTEM-INFO] BUILD_COMMIT_ID=ad03c46672ee98be86717aef465c43080e7127a1
[SYSTEM-INFO] ##################################################################################
[SYSTEM-INFO] 执行结束 拉取仓库代码流程,耗时:2秒523毫秒
[SYSTEM-INFO] 开始执行 执行构建命令流程
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< com.jel.tech:jwt-demo >------------------------
[INFO] Building jwt-demo 0.0.1-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.1.0:clean (default-clean) @ jwt-demo ---
[INFO]
[INFO] --- resources:3.1.0:resources (default-resources) @ jwt-demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 2 resources
[INFO]
[INFO] --- compiler:3.8.1:compile (default-compile) @ jwt-demo ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 9 source files to /Users/jelex/Documents/work/jpom-2.10.40/server-2.10.40-release/data/build/f9bc3e55537f40038dc80e07af054058/source/target/classes
[INFO] /Users/jelex/Documents/work/jpom-2.10.40/server-2.10.40-release/data/build/f9bc3e55537f40038dc80e07af054058/source/src/main/java/com/jel/tech/jwt/vo/Result.java: /Users/jelex/Documents/work/jpom-2.10.40/server-2.10.40-release/data/build/f9bc3e55537f40038dc80e07af054058/source/src/main/java/com/jel/tech/jwt/vo/Result.java使用了未经检查或不安全的操作。
[INFO] /Users/jelex/Documents/work/jpom-2.10.40/server-2.10.40-release/data/build/f9bc3e55537f40038dc80e07af054058/source/src/main/java/com/jel/tech/jwt/vo/Result.java: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
[INFO]
[INFO] --- resources:3.1.0:testResources (default-testResources) @ jwt-demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/jelex/Documents/work/jpom-2.10.40/server-2.10.40-release/data/build/f9bc3e55537f40038dc80e07af054058/source/src/test/resources
[INFO]
[INFO] --- compiler:3.8.1:testCompile (default-testCompile) @ jwt-demo ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to /Users/jelex/Documents/work/jpom-2.10.40/server-2.10.40-release/data/build/f9bc3e55537f40038dc80e07af054058/source/target/test-classes
[INFO] /Users/jelex/Documents/work/jpom-2.10.40/server-2.10.40-release/data/build/f9bc3e55537f40038dc80e07af054058/source/src/test/java/com/jel/tech/jwt/CommonTest.java: /Users/jelex/Documents/work/jpom-2.10.40/server-2.10.40-release/data/build/f9bc3e55537f40038dc80e07af054058/source/src/test/java/com/jel/tech/jwt/CommonTest.java使用或覆盖了已过时的 API。
[INFO] /Users/jelex/Documents/work/jpom-2.10.40/server-2.10.40-release/data/build/f9bc3e55537f40038dc80e07af054058/source/src/test/java/com/jel/tech/jwt/CommonTest.java: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
[INFO]
[INFO] --- surefire:2.22.2:test (default-test) @ jwt-demo ---
[WARNING] Parameter 'localRepository' is deprecated core expression; Avoid use of ArtifactRepository type. If you need access to local repository, switch to '${repositorySystemSession}' expression and get LRM from it instead.
[INFO] Tests are skipped.
[INFO]
[INFO] --- jar:3.1.2:jar (default-jar) @ jwt-demo ---
[INFO] Building jar: /Users/jelex/Documents/work/jpom-2.10.40/server-2.10.40-release/data/build/f9bc3e55537f40038dc80e07af054058/source/target/jwt-learn.jar
[INFO]
[INFO] --- spring-boot:2.2.5.RELEASE:repackage (repackage) @ jwt-demo ---
[INFO] Replacing main artifact with repackaged archive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.555 s
[INFO] Finished at: 2024-02-08T21:48:08+08:00
[INFO] ------------------------------------------------------------------------
[SYSTEM-INFO] 执行脚本的退出码是:0
[SYSTEM-INFO] 执行结束 执行构建命令流程,耗时:3秒688毫秒
[SYSTEM-INFO] 开始执行 打包产物流程
[SYSTEM-INFO] 执行结束 打包产物流程,耗时:32毫秒
[SYSTEM-INFO] 开始执行 发布产物流程
[SYSTEM-INFO] 开始执行发布,需要发布的文件大小:18.94 MB
[SYSTEM-INFO] 发布的方式:SSH
[SYSTEM-INFO] 2024-02-08 21:48:09 师兄tencent start ftp upload
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/test-classes/com/jel/tech/jwt/CommonTest.class 4.36 KB/4.36 KB 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/test-classes/com/jel/tech/jwt/JwtDemoApplicationTests.class 540 B/540 B 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/test-classes/com/jel/tech/jwt/User.class 2.76 KB/2.76 KB 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/classes/docker/Dockerfile 91 B/91 B 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/classes/docker/docker-compose.yml 179 B/179 B 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/classes/META-INF/spring-configuration-metadata.json 915 B/915 B 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/classes/application.yml 197 B/197 B 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/classes/com/jel/tech/jwt/vo/Result.class 5.2 KB/5.2 KB 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/classes/com/jel/tech/jwt/vo/UserVO.class 2.12 KB/2.12 KB 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/classes/com/jel/tech/jwt/util/TokenUtils.class 3.58 KB/3.58 KB 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/classes/com/jel/tech/jwt/web/JwtController.class 2.32 KB/2.32 KB 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/classes/com/jel/tech/jwt/conf/WebConfig.class 1.22 KB/1.22 KB 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/classes/com/jel/tech/jwt/conf/JwtHandler.class 920 B/920 B 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/classes/com/jel/tech/jwt/conf/JwtConfig.class 2.75 KB/2.75 KB 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/classes/com/jel/tech/jwt/interceptor/TokenInterceptor.class 4.3 KB/4.3 KB 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/classes/com/jel/tech/jwt/JwtDemoApplication.class 742 B/742 B 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 31.83 KB/18.89 MB 0%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 986.82 KB/18.89 MB 5%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 1.9 MB/18.89 MB 10%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 2.86 MB/18.89 MB 15%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 3.79 MB/18.89 MB 20%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 4.73 MB/18.89 MB 25%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 5.69 MB/18.89 MB 30%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 6.62 MB/18.89 MB 35%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 7.59 MB/18.89 MB 40%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 8.52 MB/18.89 MB 45%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 9.45 MB/18.89 MB 50%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 10.41 MB/18.89 MB 55%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 11.35 MB/18.89 MB 60%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 12.28 MB/18.89 MB 65%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 13.24 MB/18.89 MB 70%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 14.18 MB/18.89 MB 75%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 15.14 MB/18.89 MB 80%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 16.07 MB/18.89 MB 85%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 17 MB/18.89 MB 90%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 17.97 MB/18.89 MB 95%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar 18.89 MB/18.89 MB 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst 493 B/493 B 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst 109 B/109 B 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst 1.47 KB/1.47 KB 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst 399 B/399 B 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/maven-archiver/pom.properties 64 B/64 B 100%
[SYSTEM-INFO] 上传文件进度:/root/jwt-learn/jwt-learn.jar.original 16.05 KB/16.05 KB 100%
[SYSTEM-INFO] 师兄tencent ftp upload done
[SYSTEM-INFO] 开始执行 师兄tencent 发布后命令
Login Succeeded
The push refers to repository [101.43.141.9:3306/repo/jwtlearn]
5f70bf18a086: Preparing
901ead7f46a4: Preparing
6b5aaff44254: Preparing
53a0b163e995: Preparing
b626401ef603: Preparing
9b55156abf26: Preparing
293d5db30c9f: Preparing
03127cdb479b: Preparing
9c742cd6c7a5: Preparing
9b55156abf26: Waiting
293d5db30c9f: Waiting
03127cdb479b: Waiting
9c742cd6c7a5: Waiting
5f70bf18a086: Pushed
53a0b163e995: Pushed
901ead7f46a4: Pushed
b626401ef603: Pushed
293d5db30c9f: Pushed
03127cdb479b: Pushed
6b5aaff44254: Pushed
9c742cd6c7a5: Pushed
9b55156abf26: Pushed
1.0: digest: sha256:6e353e45906dde3f29a4b5cd6b13ea19be409d831001d492f1dd0cccebf73df2 size: 2213
Total reclaimed space: 0B
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile:
#1 transferring dockerfile: 128B done
#1 DONE 0.2s#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.2s#3 [internal] load metadata for docker.io/library/openjdk:8
#3 DONE 0.9s#4 [1/3] FROM docker.io/library/openjdk:8@sha256:86e863cc57215cfb181bd319736d0baf625fe8f150577f9eb58bd937f5452cb8
#4 DONE 0.0s#5 [internal] load build context
#5 transferring context: 19.81MB 0.2s done
#5 DONE 0.2s#4 [1/3] FROM docker.io/library/openjdk:8@sha256:86e863cc57215cfb181bd319736d0baf625fe8f150577f9eb58bd937f5452cb8
#4 CACHED#6 [2/3] COPY jwt-learn.jar /usr/local
#6 DONE 0.2s#7 [3/3] WORKDIR /usr/local
#7 DONE 0.1s#8 exporting to image
#8 exporting layers
#8 exporting layers 0.2s done
#8 writing image sha256:746fb939ac27d1387be86879cd242192d5c79adcfa1dd833b9e5ab18a1a82076 done
#8 naming to docker.io/library/jwtlearn:1.0 done
#8 DONE 0.2s
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store[SYSTEM-INFO] 执行结束 发布产物流程,耗时:5分8秒58毫秒
[SYSTEM-INFO] 开始执行 构建结束流程
[SYSTEM-INFO] 执行结束 构建结束流程,耗时:4毫秒
[SYSTEM-INFO] 构建结束 累计耗时:5分14秒331毫秒