CircleCI在运行make命令时出错

时间:2020-10-12 12:39:08

标签: makefile yaml circleci

我想要config.yml,它具有“构建”和“测试”作业。 我们的docker映像中有一个Makefile,但由于我总是遇到此错误,因此似乎找不到make文件

#!/bin/bash -eo pipefail
make test
make: *** No rule to make target 'test'.  Stop.

Exited with code exit status 2
CircleCI received exit code 2

有人熟悉吗?我不确定我错过了什么。 谢谢!

这是yml文件:

version: 2.1
workflows:
  my-workflow:
    jobs:
      - build:
          context: circleci-aws-credentials
      - test

jobs:
  build:
    docker:
      - image: circleci/openjdk:11-jdk

    working_directory: ~/my-project

    environment:
      # Customize the JVM maximum heap limit
      JVM_OPTS: -Xmx3200m

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          key: my-project-service-{{ checksum "./build.gradle" }}

  test:
    docker:
      - image: circleci/openjdk:11-jdk

    working_directory: ~/my-project

    environment:
      # Customize the JVM maximum heap limit
      JVM_OPTS: -Xmx3200m

    steps:
      - run:
          name: Gradle test
          command: make test
      - store_test_results:
          path: ./build/test-results

谢谢您的帮助!

0 个答案:

没有答案