Add Azure DevOps Server support
What does this PR do?
- Add Azure DevOps Server support to use with PAT ONLY, as the azure Devops Api does not support oauth2, see: https://github.com/eclipse-che/che/issues/23306#issuecomment-2589501831
- Change the gitconfig storage configmap to a secret because we are going to mount sensitive data to the devworkspace system scope gitconfig, see: https://github.com/eclipse-che/che-dashboard/pull/1313
Depends on https://github.com/eclipse-che/che-dashboard/pull/1313
Screenshot/screencast of this PR
What issues does this PR fix or reference?
fixes https://github.com/eclipse-che/che/issues/23306
How to test this PR?
- Deploy che with the pull request image:
quay.io/eclipse/che-server:pr-754andquay.io/eclipse/che-dashboard:pr-1313 - In the Dev azure Server instance create a personal access token with full access.
- Create a personal access token, use the
Organizationinput to enter theCollectionname. - Start a workspace from an azure devops server repository with a devfile.
See: workspace starts with the devfile resolve.
PR Checklist
As the author of this Pull Request I made sure that:
- [ ] The Eclipse Contributor Agreement is valid
- [ ] Code produced is complete
- [ ] Code builds without errors
- [ ] Tests are covering the bugfix
- [ ] The repository devfile is up to date and works
- [ ] Sections
What issues does this PR fix or referenceandHow to test this PRcompleted - [ ] Relevant user documentation updated
- [ ] Relevant contributing documentation updated
- [ ] CI/CD changes implemented, documented and communicated
Release Notes
Reviewers
Reviewers, please comment how you tested the PR when approving it.
/retest
/retest
/retest
@vinokurig: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| ci/prow/v14-gitlab-with-oauth-setup-flow | 7681e711cd0cc2b2171326894ffe05458f6236f0 | link | true | /test v14-gitlab-with-oauth-setup-flow |
Full PR test history. Your PR dashboard.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.
@vinokurig : after the review of this feature demo, I can admit that adding extraheader under the [http] section manually, with need to encode the personal access token and enter it in the 'Import Git Config' text area of User Preferences, could be a challenge for regular user.
Do you think it's possible to get rid of this step by reusing existing Personal Access Token entered on the 'User Preferences > Personal Access Token' page?
@dmytro-ndp That's a good point, we have discussed it with @ibuziuk and decided to keep the manual flow to be sure that this logic will not break the factory flow with other providers. Since we are adding authorization header to all git requests we want user to be aware of that and if something goes wrong, the user will be able to revert the header. When we are sure that this is safe we will add a mechanism that will automatically add the configuration to the workspace gitconfig.
@vinokurig : hello FYI:
verification of https://github.com/eclipse-che/che/issues/23306 issue fix up has been passed.
See test details below:
Test scenario to check https://github.com/eclipse-che/che/issues/23306 issue:
- Deploy che with the pull request image:
quay.io/eclipse/che-server:pr-754. - In the Dev azure Server instance create a personal access token with full access.
- Create a personal access token, use the
Organizationinput to enter theCollectionname. - Change gitconfig according to documentation
- Start a workspace from an azure devops server repository with a devfile.
- Create new file and commit changes to new brach.
- Push changes and check them on Azure Server test repo page.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: ibuziuk, SkorikSergey, vinokurig
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
@vinokurig After adding token according to this documentation I have also started workspace from private repo GitHub Enterprise Server(OAuth accepted). Workspace started successfully but project was not cloned. After removing token from gitconfig works as expected.
@vinokurig I think we should at very least mention this caveat in the docs
Build 3.20 :: server_3.x/389: Console, Changes, Git Data
Build 3.20 :: sync-to-downstream_3.x/8902: Console, Changes, Git Data
Build 3.20 :: get-sources-rhpkg-container-build_3.x/9021:
server : 3.x :: Failed in 66972204 : BREW:BUILD/STATUS:UNKNOWN
FAILURE:; copied to quay