♻️ fix ci/cd bug

Signed-off-by: devad <cossjie@foxmail.com>

Former-commit-id: 635cfd7e3a34d9a3ffd899c2e5ef0b266ba9ff32
This commit is contained in:
devad 2023-08-28 17:10:55 +08:00
parent 1911a1c0d8
commit 61a3db1551
4 changed files with 10 additions and 10 deletions

View File

@ -60,6 +60,7 @@ workflow:
image_name: '"registry.cn-hangzhou.aliyuncs.com/jcce/pcm-coordinator-api"' image_name: '"registry.cn-hangzhou.aliyuncs.com/jcce/pcm-coordinator-api"'
image_tag: git_clone_0.commit_time image_tag: git_clone_0.commit_time
registry_address: '"registry.cn-hangzhou.aliyuncs.com"' registry_address: '"registry.cn-hangzhou.aliyuncs.com"'
docker_file: git_clone_0.git_path + '/api/Dockerfile'
docker_build_path: git_clone_0.git_path docker_build_path: git_clone_0.git_path
workspace: git_clone_0.git_path workspace: git_clone_0.git_path
image_clean: true image_clean: true
@ -77,7 +78,7 @@ workflow:
task: kubectl_deploy@1.1.0 task: kubectl_deploy@1.1.0
input: input:
command: '"apply"' command: '"apply"'
resource_file_path: git_clone_0.git_path resource_file_path: git_clone_0.git_path + '/api'
certificate_authority_data: ((dev.k8s_cad)) certificate_authority_data: ((dev.k8s_cad))
server: '"https://119.45.100.73:6443"' server: '"https://119.45.100.73:6443"'
client_certificate_data: ((dev.k8s_ccd)) client_certificate_data: ((dev.k8s_ccd))

View File

@ -60,6 +60,7 @@ workflow:
image_name: '"registry.cn-hangzhou.aliyuncs.com/jcce/pcm-coordinator-rpc"' image_name: '"registry.cn-hangzhou.aliyuncs.com/jcce/pcm-coordinator-rpc"'
image_tag: git_clone_0.commit_time image_tag: git_clone_0.commit_time
registry_address: '"registry.cn-hangzhou.aliyuncs.com"' registry_address: '"registry.cn-hangzhou.aliyuncs.com"'
docker_file: git_clone_0.git_path + '/rpc/Dockerfile'
docker_build_path: git_clone_0.git_path docker_build_path: git_clone_0.git_path
workspace: git_clone_0.git_path workspace: git_clone_0.git_path
image_clean: true image_clean: true
@ -77,7 +78,7 @@ workflow:
task: kubectl_deploy@1.1.0 task: kubectl_deploy@1.1.0
input: input:
command: '"apply"' command: '"apply"'
resource_file_path: git_clone_0.git_path resource_file_path: git_clone_0.git_path + '/rpc'
certificate_authority_data: ((dev.k8s_cad)) certificate_authority_data: ((dev.k8s_cad))
server: '"https://119.45.100.73:6443"' server: '"https://119.45.100.73:6443"'
client_certificate_data: ((dev.k8s_ccd)) client_certificate_data: ((dev.k8s_ccd))

View File

@ -8,9 +8,8 @@ ENV GOARCH amd64
ENV GOPROXY https://goproxy.cn,direct ENV GOPROXY https://goproxy.cn,direct
COPY . . COPY . .
COPY etc/ /app/ COPY api/etc/ /app/
RUN go mod download RUN go mod download && go build -o pcm-coordinator-api /app/api/pcm.go
RUN go build -o /app/pcm-coordinator-api /app/pcm.go
FROM alpine:3.16.2 FROM alpine:3.16.2
@ -25,7 +24,7 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.sjtug.sjtu.edu.cn/g' /etc/apk/repos
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*
COPY --from=builder /app/pcm-coordinator-api . COPY --from=builder /app/pcm-coordinator-api .
COPY etc/pcm.yaml . COPY api/etc/pcm.yaml .
ENV TZ=Asia/Shanghai ENV TZ=Asia/Shanghai

View File

@ -8,9 +8,8 @@ ENV GOARCH amd64
ENV GOPROXY https://goproxy.cn,direct ENV GOPROXY https://goproxy.cn,direct
COPY . . COPY . .
COPY etc/ /app/ COPY rpc/etc/ /app/
RUN go mod download RUN go mod download && go build -o pcm-coordinator-rpc /app/rpc/pcmcore.go
RUN go build -o /app/pcm-coordinator-rpc /app/pcm.go
FROM alpine:3.16.2 FROM alpine:3.16.2
@ -25,7 +24,7 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.sjtug.sjtu.edu.cn/g' /etc/apk/repos
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*
COPY --from=builder /app/pcm-coordinator-rpc . COPY --from=builder /app/pcm-coordinator-rpc .
COPY etc/pcmcore.yaml . COPY rpc/etc/pcmcore.yaml .
ENV TZ=Asia/Shanghai ENV TZ=Asia/Shanghai