流水线部署问题

  • Choerodon平台版本:1.0.0

  • 运行环境:自主搭建

  • 问题描述:
    流水线部署异常,但是没有任何异常信息,容器里也没有正常部署成功,以下是我的配置等信息


    image
    流水线配置相关信息







代码相关配置


gitlab-ci.yml 自动生成,里面的内容为

image: registry.cn-shanghai.aliyuncs.com/c7n/cibase:0.11.4
stages:
- 构建
- 发布
构建打包:
  stage: 构建
  services:
  - name: registry.cn-shanghai.aliyuncs.com/c7n/cibase:0.11.4
    alias: kaniko
  script:
  - mvn package -Dmaven.test.skip=true -U -e -X -B
  - saveImageMetadata
  - kaniko --skip-tls-verify -c $PWD/./ -f $PWD/docker/Dockerfile -d ${DOCKER_REGISTRY}/${GROUP_NAME}/${PROJECT_NAME}:${CI_COMMIT_TAG}
发布:
  stage: 发布
  script:
  - chart_build
before_script:
- |
  http_status_code=`curl -o .auto_devops.sh -s -m 10 --connect-timeout 10 -w %{http_code} "${CHOERODON_URL}/devops/ci?token=${Token}&type=microservice"`
  if [ "$http_status_code" != "200" ]; then
    cat ./.auto_devops.sh
    exit 1
  fi
  source ./.auto_devops.sh

DockerFile

FROM registry.cn-hangzhou.aliyuncs.com/choerodon-tools/javabase:0.8.0
COPY target/test-02.jar /app.jar
ENTRYPOINT exec java $JAVA_OPTS  -jar /app.jar

Chart.yaml

apiVersion: v1
appVersion: "1.0"
description: test-02
name: test-02
version: 1.0.0

values.yaml

# Default values for register-server.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: 1

image:
  repository: ""
  pullPolicy: Always

config:
  port: 8080

resources:
  # We usually recommend not to specify default resources and to leave this as a conscious
  # choice for the user. This also increases chances charts run on environments with little
  # resources,such as Minikube. If you do want to specify resources,uncomment the following
  # lines,adjust them as necessary,and remove the curly braces after 'resources:'.
  limits:
    # cpu: 100m
    memory: 500Mi
  requests:
    # cpu: 100m
    memory: 256Mi


_helpers.tpl

{{/* vim: set filetype=mustache: */}}
{{- /*
service.labels.standard prints the standard service Helm labels.
The standard labels are frequently used in metadata.
*/ -}}
{{- define "service.labels.standard" -}}
choerodon.io/release: {{ .Release.Name | quote }}
{{- end -}}
{{- define "service.match.labels" -}}
choerodon.io/release: {{ .Release.Name | quote }}
{{- end -}}
{{- define "service.microservice.labels" -}}
choerodon.io/service: {{ .Chart.Name | quote }}
choerodon.io/version: {{ .Chart.Version | quote }}
{{- end -}}

{{/*
Return the appropriate apiVersion for deployment.
*/}}
{{- define "app.deployment.apiVersion" -}}
{{- if semverCompare "<1.9-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "apps/v1beta2" -}}
{{- else -}}
{{- print "apps/v1" -}}
{{- end -}}
{{- end -}}

deployment.yaml

kind: Deployment
apiVersion: {{ include "app.deployment.apiVersion" . }}
metadata:
  name: {{ .Release.Name }}
  labels:
  {{ include "service.labels.standard" . | indent 4 }}
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
  {{ include "service.match.labels" . | indent 6 }}
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
    {{ include "service.labels.standard" . | indent 8 }}
    {{ include "service.microservice.labels" . | indent 8 }}
    spec:
      containers:
        - name: {{ .Release.Name }}
          image: "{{ .Values.image.repository }}:{{ .Chart.Version }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          ports:
            - name: http
              containerPort: {{ .Values.config.port }}
              protocol: TCP
          resources:
      {{ toYaml .Values.resources | indent 12 }}
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: { }
      terminationGracePeriodSeconds: 30
  revisionHistoryLimit: 3
  minReadySeconds: 0

devops-service部署的具体版本是多少

版本信息如下