Comments (9)
@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.
@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.
Thank you @rdraward-mindbridge, added to the README
from nx-orb.
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.
@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 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 makeCIRCLE_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.
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.
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.
@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:
Set when I ssh into the job:
circleci@ff360e330413:~$ echo $CIRCLE_API_TOKEN
************************************0da2
And matches what I got back from the Project settings
Note that I was getting false positives by not passing NX_HEAD
directly.
from nx-orb.
Related Issues (15)
- CircleCI API permission issue when using orb in private pipeline HOT 5
- Allow "on_hold" workflows to be detected when deriving SHAs HOT 1
- Support CircleCI Enterprise setups HOT 2
- "allow-on-hold-workflow" param cannot be used because the script checks for it incorrectly
- Find last successful workflow for tag HOT 2
- [email protected] release to circleci orb repo HOT 2
- Calculating SHAs on new release branches HOT 2
- `Command failed: git merge-base origin/0 HEAD` when running tagged builds HOT 3
- Pipeline times out when looking for workflow on branches with plenty of pipelines HOT 3
- Wrong query string parameter call results in same page of pipelines HOT 1
- Calculating BASE SHA on master branch HOT 3
- Project Not Found issue with separate workflows HOT 4
- Methodology for determining last successful pipeline run doesn't work if there are multiple kinds of pipelines HOT 2
- CircleCI set-shas: Project not found HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nx-orb.