1 Star 0 Fork 15

azhkhn_c9f8 / answer

forked from answerdev / answer 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.gitlab-ci.yml 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
aichy126 提交于 2022-12-01 16:21 . fix gitlab ci config
include:
- project: "segmentfault/devops/templates"
file: ".docker-build-push.yml"
- project: "segmentfault/devops/templates"
file: ".deploy-helm.yml"
stages:
- compile-html
- compile-golang
- push
- deploy-dev
"compile the html and other static files":
image: node:16
stage: compile-html
tags:
- runner-nanjing
before_script:
- npm config set registry https://repo.huaweicloud.com/repository/npm/
- make install-ui-packages
script:
- make ui
artifacts:
paths:
- ./build
"compile the golang project":
image: golang:1.18
stage: compile-golang
before_script:
- export GOPROXY=https://goproxy.cn,direct
script:
- make generate
- make build
artifacts:
paths:
- ./answer
"build docker images and push":
stage: push
before_script:
- export GOPROXY=https://goproxy.cn,direct
extends: .docker-build-push
only:
- test
variables:
DockerNamespace: sf_app
DockerImage: answer
DockerTag: "$CI_COMMIT_SHORT_SHA latest"
DockerfilePath: .
PushPolicy: qingcloud
"deploy-to-local-develop-environment":
stage: deploy-dev
extends: .deploy-helm
only:
- test
variables:
LoadBalancerIP: 10.0.10.98
KubernetesCluster: dev
KubernetesNamespace: "sf-web"
InstallArgs: --set service.loadBalancerIP=${LoadBalancerIP} --set image.tag=$CI_COMMIT_SHORT_SHA --set replicaCount=1 --set serivce.targetPort=80
ChartName: answer
InstallPolicy: replace
1
https://gitee.com/azhkhn_c9f8/answer.git
git@gitee.com:azhkhn_c9f8/answer.git
azhkhn_c9f8
answer
answer
main

搜索帮助