#Currently, Shorebird init is failing on CI/CD environment.
1 messages · Page 1 of 1 (latest)
I think there might be confusion- you shouldn't need to run shorebird init on ci. That creates a new app
You should already have run init locally to create the app and then you can use codemagic to automate releases and patches
We were evaluating our white-label program to use Shorebird for handling patches across over 1,000 apps. Since manually running the initialization for each app isn't feasible, we need the shorebird init command to select the organization from the environment or by passing the orgID through the command.
Seems like a reasonable request as a way to set up 1000 apps the first time.
But you won't want to run shorebird init every time in CI I don't think
Basically you want the ability to set up 1000 apps and then end up moving them all to an organization? (either as part of init or after via some script?)
You can presumably do the latter today with our api: https://github.com/shorebirdtech/shorebird/tree/main/packages/shorebird_code_push_client
THanks for the response.
It seems the README.md is not updated according to code.
Readme Code -> final client = CodePushClient(apiKey: '<API KEY>');
Also we have tried example app, but we are getting auth error. Unauthorized. Ensure you are authenticated and try again
.
Example Code -> final client = CodePushClient();
We set SHOREBIRD_TOKEN in environemnt.
How can we authenticate using SHOREBIRD_TOKEN ?
I don't think we have an easy self-contained solution. Here is how we do it: https://github.com/shorebirdtech/shorebird/blob/69829ea3dedb01f560da8866acf9f08a17f0dea7/packages/shorebird_cli/lib/src/auth/auth.dart#L66
Got it , So We need to manage authentication. But this would be an effort to maintain. Is there any plan to support the authentication in shorebird_code_push_client ?
Also ,Can we add support for --orgId or ORGANIZATION_ID envrionment in shorebird init command?
I think we can trivialliy add --org-id to shorebird init or similar. Or could accept a patch to do so.
I was less trying to push you towards having to build a convoluted thing, more trying to empower you should you need to build things yourself 🙂
Filing a github issue would be a good start
I have submitted an issue request: https://github.com/shorebirdtech/shorebird/issues/2879. Thank you for your assistance.
Previously, I had raised a similar issue here: https://github.com/shorebirdtech/shorebird/issues/2691, but I was able to find a workaround for that one.