pcm-coordinator/.devops/aly.yml

60 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: 2
name: aly
description: 发布环境https://comnet.jointcloud.net
global:
concurrent: 1
cache:
- GOCACHE
- GOMODCACHE
workflow:
- ref: start
name: 开始
task: start
- ref: end
name: 结束
task: end
needs:
- ssh_cmd_0
- ref: git_clone_0
name: git clone
task: git_clone@1.2.9
input:
remote_url: '"https://gitlink.org.cn/JointCloud/pcm-coordinator.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 1
needs:
- start
- ref: docker_image_build_0
name: docker镜像构建
cache:
GOCACHE: /root/.cache/go-build
GOMODCACHE: /go/pkg/mod
task: docker_image_build@1.6.0
input:
docker_username: ((aly.docker_user))
docker_password: ((aly.docker_password))
image_name: '"registry.cn-hangzhou.aliyuncs.com/jcce/pcm-core-api"'
image_tag: '"latest"'
registry_address: '"registry.cn-hangzhou.aliyuncs.com"'
docker_file: '"Dockerfile"'
docker_build_path: '"."'
workspace: git_clone_0.git_path
image_clean: true
image_push: true
build_args: '""'
needs:
- git_clone_0
- ref: ssh_cmd_0
name: ssh执行命令
task: ssh_cmd@1.1.1
input:
ssh_private_key: ((aly.ssh_private_key))
ssh_ip: '"47.92.39.128"'
ssh_port: '"22"'
ssh_user: '"root"'
ssh_cmd: '"kubectl rollout restart deployment pcm-core-api -n ns-admin"'
needs:
- docker_image_build_0