Giter VIP home page Giter VIP logo

Comments (9)

DavidPLamas avatar DavidPLamas commented on September 25, 2024 1

@cdierkens The API Token I'm using is a personal token and not a project specific token. That might be the difference between you and me...
Go to your profile, create a "Personal API Token" and then try using that token instead of the project specific one.

I'm not sure if this is the correct approach but it works :)

from nx-orb.

rdraward-mindbridge avatar rdraward-mindbridge commented on September 25, 2024 1

@cdierkens @DavidPLamas I just finished dealing with the same issue where a project level token was not working. After ssh'ing into the build box to hit the Circle API directly, and investigating the error response a bit more I was able to dig up this Circle API support page that states that project tokens are not supported on v2 of the Circle API that is used by the orb.

Setting up a machine user and creating a personal token works like a charm!

@meeroslav Perhaps a small change to the README to specify that a personal Circle token is needed would be helpful.

from nx-orb.

meeroslav avatar meeroslav commented on September 25, 2024 1

Thank you @rdraward-mindbridge, added to the README

from nx-orb.

DavidPLamas avatar DavidPLamas commented on September 25, 2024

The problem was fixed by introducing the CIRCLE_API_TOKEN environment variable, which is in fact documented in the Readme file of this repository. You should probably update CircleCI official documentation page with this feature as well.

from nx-orb.

cdierkens avatar cdierkens commented on September 25, 2024

@DavidPLamas I have CIRCLE_API_TOKEN set in my project environment variables but I'm still getting the error. Is there something I need to do to make CIRCLE_API_TOKEN available to the orb?

from nx-orb.

DavidPLamas avatar DavidPLamas commented on September 25, 2024

@DavidPLamas I have CIRCLE_API_TOKEN set in my project environment variables but I'm still getting the error. Is there something I need to do to make CIRCLE_API_TOKEN available to the orb?

All you need to do is go to your project settings in Circle CI and add that new environment variable. It fixed the issue for me.

from nx-orb.

cdierkens avatar cdierkens commented on September 25, 2024

I have CIRCLE_API_TOKEN set in my project environment variables but I'm still getting the error.

Something else is afoot. I already have that set.

from nx-orb.

DavidPLamas avatar DavidPLamas commented on September 25, 2024

I have CIRCLE_API_TOKEN set in my project environment variables but I'm still getting the error.

Something else is afoot. I already have that set.

I haven't worked on that project for about a month, so something might have changed meanwhile...
This is my current pipeline:

version: 2.1

# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
# See: https://circleci.com/docs/2.0/orb-intro/
orbs:
  nx: nrwl/[email protected]

jobs:
  build:
    docker:
      - image: cimg/node:14.17-browsers
    steps:
      # ...CI steps like checkout, install...
      - checkout
      - run:
          command: yarn install --frozen-lockfile
          name: Install dependencies
      - nx/set-shas
      - run:
          command: yarn affected:build --base=$NX_BASE --parallel --max-parallel=3
          name: Run Builds
      # - run:
      #     command: yarn nx affected --target=test --base=$NX_BASE
      #     name: Run Unit Tests

# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows: 
  version: 2
  build:
    jobs:
      - build

from nx-orb.

cdierkens avatar cdierkens commented on September 25, 2024

@DavidPLamas Thanks for sharing the code. If you still have access, can you check what permissions you gave to your API key?

Here is some information from my end just for brevity...

Set in env vars:

image

Set when I ssh into the job:

circleci@ff360e330413:~$ echo $CIRCLE_API_TOKEN
************************************0da2

And matches what I got back from the Project settings

image

Note that I was getting false positives by not passing NX_HEAD directly.

image

from nx-orb.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.