代码之家  ›  专栏  ›  技术社区  ›  Aldarund

wercker中的链式管道(默认执行)不产生结果

  •  0
  • Aldarund  · 技术社区  · 6 年前

    我在威克有以下管道。它们在复制发行目的上完全相同。

    setup:
      steps:
        - script:
          name: set yarn cache
          code: yarn config set cache-folder $WERCKER_CACHE_DIR/yarn
        - script:
          name: install dependencies
          code: yarn
        - script:
          name: ls
          code: ls
        - script:
          name: test-unit
          code: yarn test
    
    test-unit:
      steps:
        - script:
          name: set yarn cache
          code: yarn config set cache-folder $WERCKER_CACHE_DIR/yarn
        - script:
          name: install dependencies
          code: yarn
        - script:
          name: ls
          code: ls
        - script:
          name: test-unit
          code: yarn test
    

    一个配置为在推送时执行,第二个配置为在第一个之后执行。 workflow

    pipelines 问题是管道不会产生相同的结果。在第二个管道中,我的命令(如纱线测试)在几秒钟内产生空结果。首先(在推送时执行)测试运行良好。

    以下是第一个管道的输出:

    export WERCKER_STEP_ROOT="/pipeline/script-3bab60c8-5cfd-4b86-9aa3-733e93e12d12"
    export WERCKER_STEP_ID="script-3bab60c8-5cfd-4b86-9aa3-733e93e12d12"
    export WERCKER_STEP_OWNER="wercker"
    export WERCKER_STEP_NAME="script"
    export WERCKER_REPORT_NUMBERS_FILE="/report/script-3bab60c8-5cfd-4b86-9aa3-733e93e12d12/numbers.ini"
    export WERCKER_REPORT_MESSAGE_FILE="/report/script-3bab60c8-5cfd-4b86-9aa3-733e93e12d12/message.txt"
    export WERCKER_REPORT_ARTIFACTS_DIR="/report/script-3bab60c8-5cfd-4b86-9aa3-733e93e12d12/artifacts"
    source "/pipeline/script-3bab60c8-5cfd-4b86-9aa3-733e93e12d12/run.sh" < /dev/null
    yarn run v1.7.0
    $ jest --verbose
    PASS src/components/auth/__tests__/passwordValidation.spec.js
      Password Validation Component
        ✓ renders a vue instance (27ms)
        ✓ show all errors for invalid password (16ms)
        ✓ show no errors for valid password (6ms)
    
    PASS src/components/__tests__/payment.spec.js
      Payment Form Component
        ✓ renders a vue instance (44ms)
       ..... 
    
    Test Suites: 7 passed, 7 total
    Tests:       24 passed, 24 total
    Snapshots:   0 total
    Time:        3.261s
    Ran all test suites.
    Done in 4.49s.
    

    下面是第二条管道的输出,有问题:

    export WERCKER_STEP_ROOT="/pipeline/script-22826921-2896-40cc-a7f2-d99d0c5377b9"
    export WERCKER_STEP_ID="script-22826921-2896-40cc-a7f2-d99d0c5377b9"
    export WERCKER_STEP_OWNER="wercker"
    export WERCKER_STEP_NAME="script"
    export WERCKER_REPORT_NUMBERS_FILE="/report/script-22826921-2896-40cc-a7f2-d99d0c5377b9/numbers.ini"
    export WERCKER_REPORT_MESSAGE_FILE="/report/script-22826921-2896-40cc-a7f2-d99d0c5377b9/message.txt"
    export WERCKER_REPORT_ARTIFACTS_DIR="/report/script-22826921-2896-40cc-a7f2-d99d0c5377b9/artifacts"
    source "/pipeline/script-22826921-2896-40cc-a7f2-d99d0c5377b9/run.sh" < /dev/null
    yarn run v1.7.0
    $ jest --verbose
    Done in 0.08s.
    

    所以这是一个问题,我的链接管道中的命令不会产生任何结果。ls命令在第一个和第二个管道中返回相同的内容。而且问题不仅仅是为了jest,其他东西,比如build,lint等,在第二个管道中产生相同的零结果。

    发生了什么以及如何修复它以使命令在链式管道中工作?

    1 回复  |  直到 6 年前
        1
  •  1
  •   jwells131313    6 年前

    这是wercker中的一个错误,第二个管道中的符号链接没有被正确处理。此错误已修复,您的管道现在应该可以工作了!如果对你不起作用,请告诉我们。