基本框架
This commit is contained in:
20
ansible/files/gitlab/gitlab-ci-minimal.example.yml
Normal file
20
ansible/files/gitlab/gitlab-ci-minimal.example.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
# docs/05-04-k3s-配置gitlab-cicd.md — 最小 .gitlab-ci.yml 示例
|
||||
stages:
|
||||
- lint
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
KUBECONFIG: "/builds/${CI_PROJECT_PATH}/kubeconfig"
|
||||
|
||||
lint:
|
||||
stage: lint
|
||||
script:
|
||||
- yamllint manifests || true
|
||||
|
||||
deploy:
|
||||
stage: deploy
|
||||
script:
|
||||
- echo "$KUBE_CONFIG_CONTENT" > "$KUBECONFIG"
|
||||
- kubectl --kubeconfig="$KUBECONFIG" apply -f manifests/
|
||||
only:
|
||||
- main
|
||||
Reference in New Issue
Block a user