Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
None
-
None
-
Gemini sprint 12, Gemini development, Gemini development, Onboarding finalization sprint
Description
When user purchases Qt cloud licence, in an email, we send them the link to Dashboard Plugin Archive and ask them to download this and follow instructions.
- Download python
- Create virtual env
- Install plugin
Now, the next steps for the user is to answer few questions and finish the setup.
- qtci-setup -qt-accout <qt account email>
- At step 2:
- Continue this setup on command line OR do this in your browser?
- OR then, just have two different endpoints:
- qtci-setup -cli: does everything in the CLI
- qtci-setup -browser: opens fastapi app to run everything in the browser
- opens the URL localhost:8086/setup or ask user to open this url
In browser or in command line, please note, when in browser, a relevant form has to be created - a step by step form for the options mentioned below. (CLOUD-293)
- Choose one option
- My project is in my Gitlab
- My project is in Qt Gitlab
- I will create a new project in Qt Gitlab
- I will create a new project in my Gitlab
- Based on choice from the above:
- ask or autodetect the GitLab REST API URL e.g. https://git.qt.io/......
- ask the user, a private token from their Gitlab account
- If new project was chosen:
- Ask name space
- Ask project name
- Ask example project name
- Ask email of people who should have access
- ON SUBMIT
- create name space
- create the project and example project in name space
- invite email addresses to join this project (or name space)
- If existing project is chosen, go to next step already
- Adding variables to CI environment
- Use the existing Qt cloud account token to get
- Add CONAN_USER, CONAN_PASS to namespace env
- Add JFROG_USER, JFROG_PASS to namespace env
- Add CONAN_REPO_URL, JFROG_REPO_URL and all other such relevant items to the ENV variable
- Show example of how to use the Qtcloud CI, e.g. in Gitlab YML or via Dockerfile
Next step to this would be setting up the NGrok things (because we want the user to setup the whole thing only once).
SO, how to do this in real:
- Write a new script in qtci_bin which is called qtci-setup which handles -cli, -browser
- Write an "onboarding" module in qtci which does the following in form of modular functions:
- get qt login token (
CLOUD-296) - check validity of qtcloud licence (
CLOUD-297) - read and store gitlab url and private token (related to
CLOUD-303, but outside the scope of the current mvp) - read and store private token in settings (related to
CLOUD-303, but outside the scope of the current mvp) - read and create project name space, project and example project (
CLOUD-279) - share_project_with_people (
CLOUD-304) - get conan credentials via relevant API (
CLOUD-296) - get jfrog credentials via relevant API (
CLOUD-298) - create jfrog account (
CLOUD-308) - add env variables to gitlab project and namespace using REST API (
CLOUD-281)
- get qt login token (
- Create a step by step based user form and connect this form to the above mentioned modules (
CLOUD-293) - Create API endpoints in the _fastapi module which do the above mentioned tasks (
CLOUD-305)
Until now, once everything is done, then we can proceed to normal setup of the QtCI plugin, which includes:
- NGROK tunnel integration (
CLOUD-306)- Read NGROK tunnel token
- Test settings
- Save token
- Webhook testing and integration to the plugin (
CLOUD-307)- Create gitlab webhook
- Test settings
- Save what is required
There will be possibly more items to be done for this in total - but for now, this is the start list.
Attachments
Issue Links
- depends on
-
CLOUD-279 Onboarding - script to create a repo in Gitlab
- Closed
-
CLOUD-281 Onboarding - use API to add CONAN and JFROG credentials as CI Variables
- Closed
-
CLOUD-293 Onboarding - form for user to enter details
- Closed
-
CLOUD-296 Onboarding - find api that gets Qt account token (or JWT token)
- Closed
-
CLOUD-297 Onboarding - check the Qt cloud licence status using API
- Closed
-
CLOUD-298 Onboarding - get conan credentials from API
- Closed
-
CLOUD-304 Onboarding - function or script that uses REST API to share a project and namespace with another user
- Closed
-
CLOUD-305 Onboarding - create API endpoints that do tasks related to onboarding
- Closed
-
CLOUD-306 Onboarding - integration of NGROK tunnel token to onboarding
- Closed
-
CLOUD-307 Onboarding - integration - test creating webhook
- Closed
-
CLOUD-308 Onboarding - create Jfrog account using REST API
- Closed