云效使用

云效地址https://codeup.aliyun.com/

主要使用代码管理, 流水线 等

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
sources:
repo_0:
type: codeup
name: xxx-prod
endpoint: https://codeup.aliyun.com/xxx/xxx/xxx.git
branch: main
certificate:
type: serviceConnection
serviceConnection: xxxx
defaultWorkspace: repo_0
stages:
stage_0:
name: 构建
jobs:
job_0:
name: Docker 镜像构建
runsOn:
group: public/cn-hongkong
labels: linux,amd64
instanceType: DEFAULT
timeoutMinutes: 20
steps:
step_0:
name: 镜像构建并推送至镜像仓库
step: ACRDockerBuild
with:
artifact: artifact
variables: []
dockerfilePath: Dockerfile
noCache: false
dockerRegistry: registry.cn-shenzhen.aliyuncs.com/xxx/${CI_SOURCE_NAME}
buildkitVersion: v0.11.6
dockerTag: ${CI_COMMIT_REF_NAME}-${CI_COMMIT_ID}_${DATETIME}
region: cn-shenzhen
serviceConnection: xxx
extraTags:
- ${CI_COMMIT_REF_NAME}-latest
driven: auto
plugins:
- name: 企业微信机器人通知插件
plugin: WechatPlugin
triggerState:
- fail
with:
noticeContent:
- pipelineName
- pipelineEnvironment
- pipelineTag
- pipelineRunRemark
- triggerInfo
- operator
- pipelineJob
- pipelineStage
- status
webhook: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxx
stage_1:
name: 部署
jobs:
job_1:
name: Kubernetes 镜像升级
runsOn:
group: public/cn-hongkong
labels: linux,amd64
instanceType: DEFAULT
timeoutMinutes: 15
steps:
step_0:
name: Kubectl镜像升级
step: KubectlSetImage
with:
container: xxx
artifact: $[stages.stage_0.job_0.step_0.artifacts.artifact]
workloadKind: deployment
skipTlsVerify: false
kubernetesCluster: xxx
namespace: xxx
workload: xxx
kubectlVersion: 1.27.9
rolloutTimeout: 10
driven: auto
plugins:
- name: 企业微信机器人通知插件
plugin: WechatPlugin
triggerState:
- fail
- success
with:
noticeContent:
- pipelineName
- pipelineEnvironment
- pipelineTag
- pipelineRunRemark
- triggerInfo
- operator
- pipelineJob
- pipelineStage
- status
webhook: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx