We have to automate the Gitea + Drone Install , but , we can not automate the setup process because of gitea needs to setup OAuth APP from WebUI As described in (https://docs.drone.io/installation/providers/gitea/) )
On Docker environments the best way is with environment vars (not sure how to do it ) but really useful on this use case.
Would my pr #7287 be sufficient for this?
@zeripath I dont think so because that would just configure app.ini settings. This request is to setup an OAuth2 provider using env vars. I would prefer to add it via CLI, just like we did for other OAuth app/LDAP management.
OAuth2 Provider is enabled by default. I think he means create an OAuth2 application via commandline and return ClientID and ClientSecret with suitable console format.
Not sure if API/CLI commands are enough in this case. ( Unattended install of gitea and drone - integrated ), but its definetly must have feature of course for future generic usage.
Something like GITEA_OAUTH2_PROVIDER_ID
, GITEA_OAUTH2_PROVIDER_SECRET
and GITEA_OAUTH2_PROVIDER_REPLYURL
vars ( for precreating oauth application ) should be enough to deploy both applications at the same time ( integration at deploy time ).
Of course GITEA_USERNAME
and GITEA_PASSWORD
vars would be also superb to implement.
Other options like docker exec -it gitea gitea admin oauth2 app create...
or curl -X POST http://gitea/api/v1/user/application '{"id": ...}'
, that needs output parsing and use it as input for another container ( drone in this case ) are not best way how to do it.
is there any update on this issue?
Most helpful comment
Not sure if API/CLI commands are enough in this case. ( Unattended install of gitea and drone - integrated ), but its definetly must have feature of course for future generic usage.
Something like
GITEA_OAUTH2_PROVIDER_ID
,GITEA_OAUTH2_PROVIDER_SECRET
andGITEA_OAUTH2_PROVIDER_REPLYURL
vars ( for precreating oauth application ) should be enough to deploy both applications at the same time ( integration at deploy time ).Of course
GITEA_USERNAME
andGITEA_PASSWORD
vars would be also superb to implement.Other options like
docker exec -it gitea gitea admin oauth2 app create...
orcurl -X POST http://gitea/api/v1/user/application '{"id": ...}'
, that needs output parsing and use it as input for another container ( drone in this case ) are not best way how to do it.