6.5 KiB
Developing with Eclipse Che
This project contains a devfile v2 located in the project's root directory. With this devfile you can perform the following tasks:
- Build project sources with maven.
- Build a container image.
- Push your changes to GitHub.
Starting a Workspace within Eclipse Che
To start a new workspace within Eclipse Che, navigate to the following URL:
{CHE-HOST}/#https://github.com/eclipse-che/che-server
Running Devfile Tasks for Downloading Dependencies and Building the Project
For VS Code, execute tasks defined in the devfile with these steps:
- Open the command palette (Ctrl/Cmd + Shift + P).
- Execute the
Tasks: Run Taskcommand. - Select the
devfilefolder and select the1. Build sourcestask to build the project sources with maven. - Follow steps 1 and 2 again, select the
1. Build imagetask to build a container image. - In the workspace terminal, tag the che-server image with your account:
podman tag quay.io/eclipse/che-server:next <docker registry>/<your account>/che-server:next. - Push the che-server image to your account:
podman push <docker registry>/<your account>/che-server:next.
Local build requirements
- Apache Maven 3.9 or later
- JDK 11
- Podman or Docker (required for running integration tests) A Che workspace environment allows to build the image internally, using the workspace terminal.
Start and debug
- Deploy Che to a Red Hat OpenShift or Minikube cluster by using a previously built image:
chectl server:start --platform=<openshift / minikube> --cheimage=<docker registry>/<your account>/che-server:next. - Enable local debugging of the Eclipse Che server:
chectl server:debug. - In your IDE, create a new Remote JVM Debug configuration on
localhost:8000. - Hit a breakpoint in the code and activate the debug configuration.
Contributing an SCM provider
An SCM provider support has to be provided by adding new maven modules to the wsmaster directory.
Implementing che-core-api-oauth- module
This module is responsible for Oauth requests to the SCM provider and contans next implementations:
<SCM provider name>OAuthAuthenticatorcontains specific implementation of Oauth token requestand authentication endpoint.<SCM provider name>OAuthAuthenticatorProvidera provider of theOAuthAuthenticator.
Implementing coresponding che-core-api-factory- module
This module is responsible for API operations of the specific SCM provider.
<SCM provider name>ApiClientcontains all necessary HTTP API calls likegetUser().<SCM provider name>AuthorisingFileContentProvideroverrides the commonAuthorisingFileContentProviderto define the specificisPublicRepository()function.<SCM provider name>FactoryParameterResolvervalidates SCM URL if it corresponds to the SCM provider. Also Provides specific Factory Parameters resolver for the SCM repository.<SCM provider name>PersonalAccessTokenFetcherfetches Personal Access Token from the SCM provider by reqesting the OAuth API of the provider. Validates the token by comparing the token access scopes with the predefined scope list.<SCM provider name>FileResolverImplementation of a resolver that can return particular file content from specified SCM repository.<SCM provider name>URLParserParses the string representation of the URL to an SCM specific object<SCM provider name>UserDataFetcherImplementation of a resolver that can return particular file content from specified SCM repository.
CI
There are several GitHub Actions workflows implemented for this repository:
Builds Maven artifacts, builds container images and pushes them to quay.io on each commit tomainbranch.
Builds Maven artifacts and container images. Images are public and pushed to quay.io. See RELEASE.md for more information about this workflow.
Creates a GitHub release which will include a generated changelog.
Runs on each commit tomainbranch.
Builds Maven artifacts and container images. This workflow is used as a check for all pull requests that are submitted to this project.
Runs Sonar against the main branch. The result can be seen here.
Used as a check for pull requests that are submitted to this project.
Downstream builds can be found at the link below, which is internal to Red Hat. Stable builds can be found by replacing the 3.x with a specific version like 3.2.
Report issues
Issues are tracked on the main Eclipse Che Repository: https://github.com/eclipse/che/issues