Scenario
A service endpoint is an extension of CodeArts. It enables CodeArts to connect to third-party services.
For example, when your CodeArts tasks need to obtain project source code from a third-party GitHub repository or need to run with Jenkins, you can create an endpoint to connect to each service.
The following table lists the endpoints supported by CodeArts.
Table 1 Service endpoints
Type |
Scenario |
Docker repository |
Connect to a third-party Docker image repository. After the connection is successful, CodeArts Deploy can obtain Docker images from the repository. |
Jenkins |
Connect to a third-party Jenkins service. After the connection is successful, pipelines can call and execute the tasks in the Jenkins service. |
Kubernetes |
Connect to a Kubernetes cluster. After the connection is successful, you can deploy applications to the relevant Kubernetes cluster. |
Nexus repository |
Connect to a third-party private Maven repository. After the connection is successful, build tasks can obtain the file information of the repository. |
Git repository |
Connect to a third-party Git repository. After the connection is successful, CodeArts Pipeline and CodeArts Build can obtain the branch information of the repository. |
GitHub |
Connect to a GitHub account. After the connection is successful, CodeArts Pipeline and CodeArts Build can obtain the repository and branch information of the account. |
IAM user |
Delegate your AK/SK to an IAM user so that the user can obtain a token to perform tasks that require higher permissions. |
CodeArts Repo HTTPS |
Authorize CodeArts to download code, create branches, merge branches, and commit code in CodeArts Repo repositories. Currently, it is used for change-triggered pipelines and related extensions. |
GitLab |
Connect to a GitLab repository. After the connection is successful, CodeArts Pipeline and CodeArts Build can obtain the branch information of the repository. |
Bitbucket |
Connect to a Bitbucket account. After the connection is successful, CodeArts Pipeline and CodeArts Build can obtain the repository and branch information of the account. |
AGC |
Connect to AppGallery Connect (AGC) APIs. After the connection is successful, pipelines can use the service. |
Prerequisites
- You must have the DevMarket > Endpoint > create permission to create service endpoints. For details, see How Do I Check and Obtain Required Project Permissions?
- The third-party service to connect can be accessed from the public network without restrictions.
- Jenkins, Nexus repository, and GitHub service endpoints cannot be created in the LA-Santiago region.
- Jenkins and Nexus repository service endpoints cannot be created in the TR-Istanbul area.
- Bitbucket service endpoints can be created only in the AP-Singapore region.
Creating a Service Endpoint
- Go to the CodeArts homepage.
- Log in to the CodeArts console, click
, and select a region where you have enabled CodeArts.
- Click Go to Workspace.
If your account uses the old billing mode (see Old Billing Modes), click Access Service.
- Click the target project name to go to the project.
- In the navigation pane, choose Settings > General > Service Endpoints.
- Click Create Endpoint and select an endpoint type from the drop-down list.
- In the displayed dialog box, configure the service endpoint.
The new endpoint is displayed.
The tables below describe the parameters for configuring different types of service endpoints.
Docker Repository
Table 2 Creating a Docker repository service endpoint
Parameter |
Description |
Service Endpoint Name |
The name of the service endpoint. Enter a maximum of 256 characters. Letters, digits, hyphens (-), underscores (_), periods (.), and spaces are supported. |
Repository Address |
The address of the Docker repository to connect. HTTP and HTTPS addresses are supported. |
Username |
The username of this Docker repository. |
Password |
The password of this Docker repository. |
Jenkins
Table 3 Creating a Jenkins service endpoint
Parameter |
Description |
Service Endpoint Name |
The name of the service endpoint. Enter a maximum of 256 characters. Letters, digits, hyphens (-), underscores (_), periods (.), and spaces are supported. |
Server URL |
The address of the Jenkins service to connect. The address can be in format "http://ip:Port" or "https://ip:Port". |
Username |
The username of this Jenkins service. |
Password |
The password of this Jenkins service. |
Kubernetes
Table 4 Creating a Kubernetes service endpoint
Parameter |
Description |
Service Endpoint Name |
The name of the service endpoint. Enter a maximum of 256 characters. Letters, digits, hyphens (-), underscores (_), periods (.), and spaces are supported. |
Kubernetes URL |
The server address of the cluster to connect. Obtain it by searching for server in the cluster configuration file kubeconfig.json. |
Kubeconfig |
The configuration of this cluster. You can enter all the content of the kubeconfig.json file. |
Nexus Repository
Table 5 Creating a Nexus repository service endpoint
Parameter |
Description |
Service Endpoint Name |
The name of the service endpoint. Enter a maximum of 256 characters. Letters, digits, hyphens (-), underscores (_), periods (.), and spaces are supported. |
Repository URL |
The address of the Nexus repository to connect. HTTP and HTTPS addresses are supported. |
Username |
The username of this Nexus repository. |
Password |
The password of this Nexus repository. |
Git Repository
Table 6 Creating a Git service endpoint
Parameter |
Description |
Service Endpoint Name |
The name of the service endpoint. Enter a maximum of 256 characters. Letters, digits, hyphens (-), underscores (_), periods (.), and spaces are supported. |
Git Repository URL |
The HTTPS address of the Git repository to connect. For example, https ://*.*.*.*/ user/repo.git. |
Username |
The username of this Git repository.
This parameter is optional. Configure it as needed. |
Password or Access Token |
The password or access token of this Git repository.
This parameter is optional. Configure it as needed. |
GitHub
Table 7 Creating a GitHub service endpoint
Parameter |
Description |
Service Endpoint Name |
The name of the service endpoint. Enter a maximum of 256 characters. Letters, digits, hyphens (-), underscores (_), periods (.), and spaces are supported. |
Authentication Mode |
Two authentication modes are supported:
- OAuth: After clicking Authorize and Confirm, log in to GitHub for manual authorization.
- Access token: Enter your access token obtained in GitHub. For details, visit the GitHub official website.
|
IAM User
Table 8 Creating an IAM user service endpoint
Parameter |
Description |
Service Endpoint Name |
The name of the service endpoint. Enter a maximum of 256 characters. Letters, digits, hyphens (-), underscores (_), periods (.), and spaces are supported. |
Access Key Id |
The AK of the IAM user to connect. Obtain it from the My Credentials page. For details, see Access Keys. |
Secret Access Key |
The SK of the IAM user to connect. Obtain it from the My Credentials page. For details, see Access Keys. |
CodeArts Repo HTTPS
Table 9 Creating a CodeArts Repo HTTPS service endpoint
Parameter |
Description |
Service Endpoint Name |
The name of the service endpoint. Enter a maximum of 256 characters. Letters, digits, hyphens (-), underscores (_), periods (.), and spaces are supported. |
CodeArts Repo URL |
The HTTPS address of the CodeArts Repo repository to connect.
Go to the target repository, and click Clone/Download. Click Clone with HTTPS, and obtain the repository address. |
Username |
The HTTPS username of this CodeArts Repo repository. Format: Tenant name/IAM username.
Click the username on the top navigation bar and choose This Account Settings. Obtain the username on the Repo > HTTPS Password page. |
Password |
The HTTPS password of this CodeArts Repo repository. Enter a maximum of 300 characters.
Click the username on the top navigation bar and choose This Account Settings. Obtain the password on the Repo > HTTPS Password page. |
GitLab
Table 10 Creating a GitLab repository service endpoint
Parameter |
Description |
Service Endpoint Name |
The name of the service endpoint. Enter a maximum of 256 characters. Letters, digits, hyphens (-), underscores (_), periods (.), and spaces are supported. |
GitLab URL |
The HTTPS address of the GitLab repository to connect. |
Username |
The username of this GitLab repository.
This parameter is optional. Configure it as needed. |
Access Token |
The access token of the GitLab repository. For details about how to obtain the access token, visit the GitLab official website.
This parameter is optional. Configure it as needed. |
Bitbucket
Table 11 Creating a Bitbucket repository service endpoint
Parameter |
Description |
Service Endpoint Name |
The name of the service endpoint. Enter a maximum of 256 characters. Letters, digits, hyphens (-), underscores (_), periods (.), and spaces are supported. |
Username |
Bitbucket username.
To obtain the username, log in to Bitbucket, and obtain the value of Username on the Account settings page. |
Password |
Bitbucket password.
To obtain the password, log in to Bitbucket, and create a password on the App passwords page, with the Read permission selected under both Account and Projects. |
AGC
Table 12 Creating an AGC service endpoint
Parameter |
Description |
Service Endpoint Name |
The name of the service endpoint. Enter a maximum of 256 characters. Letters, digits, hyphens (-), underscores (_), periods (.), and spaces are supported. |
client_id |
The ID of the AppGallery Connect (AGC) API client to connect. For details about how to obtain the client ID, visit the AppGallery Connect official website. |
client_secret |
The secret of the AGC API client to connect. For details about how to obtain the client secret, visit the AppGallery Connect official website. |
Managing a Service Endpoint
- Go to the CodeArts homepage.
- Log in to the CodeArts console, click
, and select a region where you have enabled CodeArts.
- Click Go to Workspace.
If your account uses the old billing mode (see Old Billing Modes), click Access Service.
- Click the target project name to go to the project.
- In the navigation pane, choose Settings > General > Service Endpoints.
- Locate the service endpoint you want to manage, and perform the operations listed in the table below as needed.
Table 13 Managing a service endpoint
Operation |
Description |
Edit |
Click Edit. In the displayed dialog box, edit the parameters and click Save.
The modified information is displayed. |
Delete |
WARNING:
The deletion cannot be undone. Exercise caution when performing this operation.
Click Delete. In the displayed dialog box, click OK.
The deleted service endpoint is no longer displayed in the list. |