0

We need a way to have our gitlab-ci.yml create a JSON file with all our flags and their status inside, every time the pipeline is run.

I've been reading up on Unleash proxy and client SDKs for real time toggle status, but this isn't what I need right now. Just want to grab all flags for a given project and have the YAML create a JSON file.

Can someone point me in the right direction?

I found this article. Had to go under Project => Settings => General to get the project ID. Calling that API, can I see my test feature flags.

Now I just need to know how to access this API from inside the pipeline logic. Or maybe there's a better way?

5
  • Dump the feature flags from where, what's the source of that data? Commented Jan 9, 2024 at 16:41
  • I've created a few test feature flags inside my git repo, using the git lab UI @jonrsharpe Commented Jan 9, 2024 at 16:43
  • If you don't know the ID why not use the URL-encoded path option? And what does "might have a syntax issue" mean; give a minimal reproducible example, it's usually unambiguous whether or not that's the case. Commented Jan 9, 2024 at 16:44
  • Is there some specific problem taking however you access it outside the pipeline logic and moving it there? All you need is an HTTP client (e.g. curl) then maybe something to process the response if it's not already how you want it (e.g. jq). Commented Jan 9, 2024 at 16:56
  • @jonrsharpe so i can create a curl call inside gitlab-ci if that's the best way to do it. I think that's what I'm after is an answer that says, that is the way to go. Commented Jan 9, 2024 at 18:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.