Circle Ci:第二份工作从未开始过?

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

CircleCI世界的新手,除了第一份工作之外似乎无法获得任何东西。

我已经尝试了各种各样的事情,从删除换行符到重命名作业“测试”,交换第一份工作和第二份工作的顺序,但没有任何作用。

我是否需要在项目配置中更改某些内容,例如提前定义作业?

.circleci / config.yml

version: 2.0

jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/ruby:2.5.0-node-browsers

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/postgres:9.4

    working_directory: ~/repo

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "Gemfile.lock" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-

      - run:
          name: install bundler
          command: gem install bundler

      - run:
          name: install dependencies
          command: |
            bundle install --jobs=4 --retry=3 --path vendor/bundle

      - save_cache:
          paths:
            - ./vendor/bundle
          key: v1-dependencies-{{ checksum "Gemfile.lock" }}

  precompile_assets:
    machine: true

    working_directory: ~/repo

    steps:
      - run:
          name: Precompile assets for public folder
          command: rails assets:precompile
continuous-integration continuous-deployment circleci
1个回答
0
投票

免责声明:CircleCI的开发人员传播者

您错过了配置的工作流程部分。告诉CircleCI哪些作业可用以及如何运行它们的部分。

https://circleci.com/docs/2.0/workflows/

此外,precompile_assets作业将失败,因为它没有来自您的仓库的任何文件。您需要结帐,或使用workspaces(也可在我上面的链接中找到)以提供文件。

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