GitLab Serverless deployment fails due to “nil watch interface”

为君一笑 提交于 2019-12-11 17:22:49

问题


The deployment to a Kubernetes Cluster created in GitLab with default values after specifying

stages:
- build
- deploy

build:
  stage: build
  image:
    name: gcr.io/kaniko-project/executor:debug
    entrypoint: [""]
  only:
    - master
  script:
    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
    - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE

deploy:
  stage: deploy
  image: gcr.io/triggermesh/tm
  only:
    - master
  environment: production
  script:
    - echo "$CI_REGISTRY_IMAGE"
    - tm -n "$KUBE_NAMESPACE" --config "$KUBECONFIG" deploy service "$CI_PROJECT_NAME" --from-image "$CI_REGISTRY_IMAGE" --wait

in .gitlab-ci.yml and

FROM maven:3-jdk-11
COPY . .
RUN mvn --batch-mode --update-snapshots install
ENV PORT=8080
EXPOSE 8080
CMD java -jar target/hello-world-0.1-SNAPSHOT.jar

in Dockerfile stage fails due to

$ tm -n "$KUBE_NAMESPACE" --config "$KUBECONFIG" deploy service "$CI_PROJECT_NAME" --from-image "$CI_REGISTRY_IMAGE" --wait
Creating hello-world function
Waiting for hello-world ready state
2019/02/09 17:53:31 nil watch interface
ERROR: Job failed: exit code 1

The project is a Spring Boot application. The cluster is healthy according to the Google Cloud console.

来源:https://stackoverflow.com/questions/54609664/gitlab-serverless-deployment-fails-due-to-nil-watch-interface

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!