Pass variable to next build

sup circle friends,

if i want the number of linting warnings i have in my node project to be monotonically decreasing, i need to be able to get the current number of warnings, then pass that number to each subsequent build

then i can call eslint --max-warnings $THAT_NUMBER

is there a way to do that within circleci? if not, i can write a file to s3 from my master branch, then read it on the next build

thanks!

hmm from inside my circle build, if i’m in my master branch, i could use the API to set an environment variable

https://circleci.com/docs/api/#add-environment-variable

which i could then pick up from the next build