子管道在Gitlab CI中失败,但未显示错误日志

问题描述 投票:0回答:1

[我正在尝试使用.gitlab-ci.yml中的配置在GitLab中运行父子管道,以触发将从第一阶段开始使用工件(即另一个.gitlab-ci.yml文件)的子管道,并开始运行子进程。] >

这里是演示.gitlab-ci.yml文件:

stages:
  - init
  - install

Building CI Script:
  stage: init
  image: python:3.6
  variables:
    VERSION: "latest"
  only:
    refs:
      - testenvbranch
  script:
    - |
      chmod +x ./pipeline-scripts/*
      ./pipeline-scripts/test.sh
      source /usr/local/bin/pipeline-vars.sh
      echo "Job done"
      echo 'there is no tag named pointer, doing full release' > fullrelease
      if [ -f 'fullrelease' ]; then mkdir old; else cp -r env old; fi
      git checkout $COMMIT
      LAST_COMMIT_MESSAGE=`git log -1 --pretty=%B`
      LAST_COMMIT_AN=`git log -1 --pretty=%an`
      LAST_COMMIT_AE=`git log -1 --pretty=%ae`
      $CMD_DIFF old env
      ls -la result/*
      cat result/*
      $CMD_BUILD
      ls -la /tmp/test
      python3 pipeline-scripts/helm_install1.py result/updatedReposList.yaml result/deletedReposList.yaml /tmp/test testenvironment testenvbr
      cat cicd.yaml
      ls -la
      mkdir helm-install
      cd helm-install
      git fetch
      mkdir -p $VALUES_DIR
      rm -rf $VALUES_DIR/*
      cp /tmp/test/* $VALUES_DIR/


  artifacts:
    paths:
      - cicd.yaml

Deplopying Apps:
  stage: install
  trigger:
    include:
      artifact: cicd.yaml
      job: Installation
    strategy: depend

这里是工件.gitlab-ci.yml文件:

image: alpine/helm:2.11.0
before_script:
- helm init -c --tiller-namespace $TILLER_NAMESPACE
- helm repo add company https://charts.company.com
- helm repo add company http://company-chartmuseum-chartmuseum.company
- helm repo add stable https://kubernetes-charts.storage.googleapis.com
- helm repo add jenkinsx http://chartmuseum.jenkins-x.io
- helm repo update
stages:
- install
accounts:
  stage: install
  script:
  - echo 'Upgrading accounts using accounts'
  - helm upgrade $HELMARGS --timeout 600 --install --namespace testenvironment testenvironment-accounts
    company/accounts --version 0.0.17 -f values/accounts.yaml

阶段1作业成功,但是子管道失败而未显示错误。请帮助!

我正在尝试使用.gitlab-ci.yml中的配置在GitLab中运行父子管道,以触发将从第一阶段开始使用工件(即另一个.gitlab-ci.yml文件)的子管道。 ..

continuous-integration gitlab gitlab-ci gitlab-ci-runner continuous-delivery
1个回答
0
投票

我有类似的问题,这是因为before_script块。我意识到子管道不会与全局的before_script一起显示。我仍在尝试找出其背后的原因,没有任何文件支持这一事实。

© www.soinside.com 2019 - 2024. All rights reserved.