feat: .devops/pcm-ac-rpc.yml

This commit is contained in:
devad 2023-04-04 17:24:48 +08:00 committed by jianmu
parent 055345750b
commit 130395bb7c
1 changed files with 79 additions and 0 deletions

79
.devops/pcm-ac-rpc.yml Normal file
View File

@ -0,0 +1,79 @@
version: 2
name: pcm-ac-rpc
description: ""
global:
concurrent: 1
cache: pcm_ac_rpc_cache
trigger:
webhook: gitlink@1.0.0
event:
- ref: push
ruleset:
- param-ref: branch
operator: EQ
value: '"2.0"'
ruleset-operator: AND
workflow:
- ref: start
name: 开始
task: start
- ref: git_clone_0
name: git clone
task: git_clone@1.2.6
input:
remote_url: '"https://gitlink.org.cn/JCCE/PCM.git"'
ref: '"refs/heads/2.0"'
commit_id: '""'
depth: 1
needs:
- start
- ref: shell_0
name: 打包
image: docker.jianmuhub.com/library/alpine:3.17.0
cache:
pcm_ac_rpc_cache: /root/go
env:
CODE_PATH: git_clone_0.git_path
script:
- apk add --update --no-cache go
- ""
- export GOPATH=/root/go
- export PATH=${GOPATH}/bin:/usr/local/go/bin:$PATH
- export GOBIN=$GOROOT/bin
- mkdir -p ${GOPATH}/src ${GOPATH}/bin
- export GO111MODULE=on
- ""
- go version
- ""
- cd ${CODE_PATH}
- ""
- cd adaptor/PCM-HPC/PCM-AC/rp
- ""
- export GOPROXY=https://goproxy.cn
- ""
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ${project_name}
./hpcac.go
needs:
- git_clone_0
- ref: docker_buildx_build_0
name: docker buildx构建镜像
task: docker_buildx_build@1.0.1
input:
dockerfile: git_clone_0.git_path/
context: '""'
image: '""'
platform: '""'
registry_url: '"https://index.docker.io/v1/"'
build_args: '""'
tls_servername: '""'
tls_cacert: '""'
tls_cert: '""'
tls_key: '""'
needs:
- shell_0
- ref: end
name: 结束
task: end
needs:
- docker_buildx_build_0