最佳答案
我正在学习 CI/CD。
我已经安装了 Gitlab 和 Gitlab 运行从官员。但是,无论何时在 maven-build 期间运行管道,这项工作都会卡住。我已经注册了跑步者,可以参加我的项目,但是工作被卡住了
. gitlab-ci. yml
image: docker:latest
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay
SPRING_PROFILES_ACTIVE: gitlab-ci
stages:
- build
- package
- deploy
maven-build:
image: maven:3-jdk-8
stage: build
script: "mvn package -B"
artifacts:
paths:
- target/*.jar
docker-build:
stage: package
script:
- docker build -t registry.com/ci-cd-demo .
- docker push registry.com/ci-cd-demo
k8s-deploy:
image: google/cloud-sdk
stage: deploy
script:
- echo "$GOOGLE_KEY" > key.json
- gcloud container clusters get-credentials standard-cluster-demo --
zone us-east1-c --project ascendant-study-222206
- kubectl apply -f deployment.yml
我的跑步者设置
运行程序已与项目关联时出现错误消息
帮帮我?