当yarn是run命令时,使用npm的circleci(v2.0)

时间:2017-08-25 18:38:01

标签: reactjs circleci yarnpkg

有关于为circleci v1而不是v2设置纱线的文档,因为看起来好像他们已经将纱线烘焙到v2 api中了,但是,在我的config.yml中我明确地运行纱线安装我的deps,当我检查构建日志,它显示npm用于我的所有纱线命令......我显然需要覆盖此/安装纱线?不幸的是,似乎v2文档没有涉及到这一点,我的google-foo也不富有成效......

更有意思的是,我的另一个项目是使用几乎完全相同配置的纱线...什么给出了?

继承人我当前的config.yml

# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/node:7.10

      # 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/mongo:3.4.4

    working_directory: ~/repo

    steps:
      - checkout

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

      - run: yarn

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}

      # run tests!
      - run: yarn test
      - run: echo "ALL GOOD IN THE HOOD"
      - deploy:
          name: Deploy on deploy branch
          command: |
            if [ "${CIRCLE_BRANCH}" == "deploy" ]; then
              ./node_modules/.bin/firebase ...
            fi

1 个答案:

答案 0 :(得分:0)

我弄明白了这个问题。我的circleci文件夹拼写错误。我省略了.,它使用的是默认配置...叹息......