Browse Source

♻️ fix ci/cd bug

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

Former-commit-id: 635cfd7e3a
pull/9/head
devad 2 years ago
parent
commit
61a3db1551
4 changed files with 10 additions and 10 deletions
  1. +2
    -1
      .devops/api.yml
  2. +2
    -1
      .devops/rpc.yml
  3. +3
    -4
      api/Dockerfile
  4. +3
    -4
      rpc/Dockerfile

+ 2
- 1
.devops/api.yml View File

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


+ 2
- 1
.devops/rpc.yml View File

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


+ 3
- 4
api/Dockerfile View File

@@ -8,9 +8,8 @@ ENV GOARCH amd64
ENV GOPROXY https://goproxy.cn,direct

COPY . .
COPY etc/ /app/
RUN go mod download
RUN go build -o /app/pcm-coordinator-api /app/pcm.go
COPY api/etc/ /app/
RUN go mod download && go build -o pcm-coordinator-api /app/api/pcm.go


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/*

COPY --from=builder /app/pcm-coordinator-api .
COPY etc/pcm.yaml .
COPY api/etc/pcm.yaml .

ENV TZ=Asia/Shanghai



+ 3
- 4
rpc/Dockerfile View File

@@ -8,9 +8,8 @@ ENV GOARCH amd64
ENV GOPROXY https://goproxy.cn,direct

COPY . .
COPY etc/ /app/
RUN go mod download
RUN go build -o /app/pcm-coordinator-rpc /app/pcm.go
COPY rpc/etc/ /app/
RUN go mod download && go build -o pcm-coordinator-rpc /app/rpc/pcmcore.go


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/*

COPY --from=builder /app/pcm-coordinator-rpc .
COPY etc/pcmcore.yaml .
COPY rpc/etc/pcmcore.yaml .

ENV TZ=Asia/Shanghai



Loading…
Cancel
Save