Jira CircleCI 集成。请提供 CircleCI API 令牌以使该球体正常工作

Arm*_*yan 7 integration geometry jira token circleci

我正在尝试将 Jira 与 Circle ci 集成。我已按照说明进行操作,一切都很顺利。我已经 1.为 Jira 安装了 CircleCI 2.在 Jira 中创建了令牌 3.在 Circle CI 中添加了该令牌 4.在 config.yml 文件中添加了 orb。当我推送更改时,构建失败并显示以下消息。

/bin/bash: CIRCLE_TOKEN: 请提供 CircleCI API 令牌以使该球体正常工作!

这是我的 config.yml 文件

version: 2.1
orbs:
    jira: circleci/jira@1.0.2


workflows:
  build:
    jobs:
      - build:
          post-steps:
            - jira/notify

jobs:
  build:
    docker:
      - image: circleci/python:3.6
    steps:
      - checkout
      - restore_cache:
          key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}
      - run:
          command: |
            python3 -m venv venv
            . venv/bin/activate
            pip install --upgrade pip
            pip install -r requirements.txt
      - save_cache:
          key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}
          paths:
            - "venv"
      - run:
          name: Running tests
          command: |
            . venv/bin/activate
            python3 test_manage.py test
      - store_artifacts:
          path: test-reports/
          destination: python_app
Run Code Online (Sandbox Code Playgroud)

下面是我的 CircleCI 配置的屏幕截图。 这表明它已连接

小智 6

您需要生成 CircleCI API 令牌,然后在 CircleCI 项目上创建一个环境变量,名称为“CIRCLE_TOKEN”,令牌作为其值。

如果要使用不同的环境变量名称,可以在 CircleCI 配置中定义命令时设置token_name参数。

编辑:您在使用项目 API 令牌时可能会遇到问题,请改用个人 API 令牌