feat(CI): 测试推送到Nexus3
continuous-integration/drone Build is failing
Details
continuous-integration/drone Build is failing
Details
parent
8d75ec84e0
commit
9376c4b14e
32
.drone.yml
32
.drone.yml
|
|
@ -1,8 +1,24 @@
|
|||
kind: pipeline # 定义一个管道
|
||||
type: docker # 当前管道的类型
|
||||
name: test # 当前管道的名称
|
||||
steps: # 定义管道的执行步骤
|
||||
- name: test # 步骤名称
|
||||
image: node:latest # 当前步骤使用的镜像
|
||||
commands: # 当前步骤执行的命令
|
||||
- echo 测试drone执行
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: deployment
|
||||
steps:
|
||||
- name: check
|
||||
image: alpine
|
||||
commands:
|
||||
- ls -la
|
||||
- ls -la Dockerfile --查看当前文件夹是否包含了Dockerfile
|
||||
- name: publish
|
||||
image: plugins/docker
|
||||
settings:
|
||||
dockerfile: Dockerfile
|
||||
tags: latest
|
||||
# you need insecure: true since we don't have a TLS certificate
|
||||
insecure: true
|
||||
registry: 192.168.31.104:8082
|
||||
repo: 192.168.31.104:8082/tiamo/user-point-management
|
||||
# create the docker_username and docker_password secrets in Drone, with Nexus' username & password
|
||||
secrets: [ drone, dronepw ]
|
||||
|
||||
#trigger:
|
||||
# branch:
|
||||
# - master
|
||||
|
|
@ -63,7 +63,8 @@ public class UserService : IUserService
|
|||
public async Task CreateUser(User input)
|
||||
{
|
||||
await using var _userPointManagementDbContext = await _dbContextFactory.CreateDbContextAsync();
|
||||
if (!string.IsNullOrWhiteSpace(input.Mobile) && _userPointManagementDbContext.Users.Any(x => x.Mobile == input.Mobile))
|
||||
if (!string.IsNullOrWhiteSpace(input.Mobile) &&
|
||||
_userPointManagementDbContext.Users.Any(x => x.Mobile == input.Mobile))
|
||||
{
|
||||
throw new ArgumentException("手机号不可重复!");
|
||||
}
|
||||
|
|
@ -72,6 +73,7 @@ public class UserService : IUserService
|
|||
{
|
||||
throw new ArgumentException("名称不可重复!");
|
||||
}
|
||||
|
||||
_userPointManagementDbContext.Users.Add(input);
|
||||
await _userPointManagementDbContext.SaveChangesAsync().ConfigureAwait(false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue