Update Tools Injector Image, PAT scope with additional ENV
Issue - #385157 (closed)
What does this MR do and why?
GitLab Workflow extension requires a PAT with api
scope. We already create a new PAT per workspace with write_repository
scope. We should extend this and pre-configure the GitLab Workflow extension as per the config defined in [VS Code] Read gitlab token from a file to conf... (gitlab-vscode-extension#1250 - closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
-
The tools-injector image is updated to the latest image published from Add GitLab VS Code extension to the tools-injec... (#463502 - closed) -
The environment variables required for GitLab VS Code extension to work inside the workspace are injected. -
The PAT injected inside the workspace needs to have additional api
access for the Gitlab VS Code extension to work. -
When workspace is created, Duo Chat and Code Suggestions work out of the box.
Screenshots or screen recordings
For below screenshots, i use the latest image built from tools-injector repo, and also pass in the 2 additional envs as required GITLAB_WORKFLOW_INSTANCE_URL
and GITLAB_WORKFLOW_TOKEN_FILE
.
And this means the gitlab workflow extension and gitlab Duo Chat both working fine.
This below screenshot proves the Duo Chat Code Suggestion working fine. Hoewver, there is a bit trick for setup. The image is still the same as the above, but this time, i modified the 2 additional envs, GITLAB_WORKFLOW_INSTANCE_URL
to https://gitlab.com
, and GITLAB_WORKFLOW_TOKEN
with my own PAT generated.
The reason is, it seems with envs passed in, the command + shift + p
and add account for workflow
does not take effect at all. It seems the code will always read from ENV even I add/delete multiple times.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.