jenkinsGCE不build设
我试图让我的头在GCE的Jenkins CD和K8s。 我正在关注GCE的教程: https : //cloud.google.com/solutions/continuous-delivery-jenkins-container-engine
出于某种原因,应用程序不会构build:
这是Jenkins控制台输出。
这是我的Jenkins文件:
node { def project = 'xxxxxx' def appName = 'gceme' def feSvcName = "${appName}-frontend" def imageTag = "eu.gcr.io/${project}/${appName}:${env.BRANCH_NAME}.${env.BUILD_NUMBER}" checkout scm sh("echo Build image") stage 'Build image' sh("docker build -t ${imageTag} .") sh("echo Run Go tests") stage 'Run Go tests' sh("docker run ${imageTag} go test") sh("echo Push image to registry") stage 'Push image to registry' sh("gcloud docker push ${imageTag}") sh("echo Deploy Application") stage "Deploy Application" switch (env.BRANCH_NAME) { // Roll out to canary environment case "canary": // Change deployed image in canary to the one we just built sh("sed -i.bak 's#eu.gcr.io/cloud-solutions-images/gceme:1.0.0#${imageTag}#' ./k8s/canary/*.yaml") sh("kubectl --namespace=production apply -f k8s/services/") sh("kubectl --namespace=production apply -f k8s/canary/") sh("echo http://`kubectl --namespace=production get service/${feSvcName} --output=json | jq -r '.status.loadBalancer.ingress[0].ip'` > ${feSvcName}") break // Roll out to production case "master": // Change deployed image in canary to the one we just built sh("sed -i.bak 's#eu.gcr.io/cloud-solutions-images/gceme:1.0.0#${imageTag}#' ./k8s/production/*.yaml") sh("kubectl --namespace=production apply -f k8s/services/") sh("kubectl --namespace=production apply -f k8s/production/") sh("echo http://`kubectl --namespace=production get service/${feSvcName} --output=json | jq -r '.status.loadBalancer.ingress[0].ip'` > ${feSvcName}") break // Roll out a dev environment default: // Create namespace if it doesn't exist sh("kubectl get ns ${env.BRANCH_NAME} || kubectl create ns ${env.BRANCH_NAME}") // Don't use public load balancing for development branches sh("sed -i.bak 's#LoadBalancer#ClusterIP#' ./k8s/services/frontend.yaml") sh("sed -i.bak 's#eu.gcr.io/cloud-solutions-images/gceme:1.0.0#${imageTag}#' ./k8s/dev/*.yaml") sh("kubectl --namespace=${env.BRANCH_NAME} apply -f k8s/services/") sh("kubectl --namespace=${env.BRANCH_NAME} apply -f k8s/dev/") echo 'To access your environment run `kubectl proxy`' echo "Then access your service via http://localhost:8001/api/v1/proxy/namespaces/${env.BRANCH_NAME}/services/${feSvcName}:80/" } }
有人能带我走向正确的方向吗? 我迷路了。
从错误中可以清楚地看到,问题在于为不存在的dockerfile创build符号链接。 跟踪给定的位置,并检查文件是否存在,并有必要的权限。
绝对失败。 忘记Dockerfile …
- 解决docker问题 – 编写不同的客户端服务器会导致新的错误,说明降级Docker SDK for Python的版本
- Java代码查看远程主机上的泊坞窗容器的状态,拒绝连接
- docker:SQLSTATE 没有这样的文件或目录
- Git pre-commit hook + docker =不同的git状态
- 无法构build在Docker中引用PCL的ASP.NET Core应用程序
- 如何让docker运行从客户机到主机容器的目录?
- 如何从其他主机连接Docker?
- 限制互联网访问docker集装箱?
- 为DBI运行Mkbootstrap()=> DBIXS.h:22:20:致命错误:EXTERN.h:没有这样的文件或目录