All Products
Search
Document Center

Enterprise Distributed Application Service:Set up Jenkins CI for EDAS applications

Last Updated:Mar 10, 2026

Integrate Jenkins with GitLab to automatically build and deploy your Enterprise Distributed Application Service (EDAS) applications. When you push code to GitLab, a webhook triggers Jenkins to pull the code, run a Maven build, and deploy to EDAS through the toolkit-maven-plugin plug-in.

This workflow supports applications deployed on both Elastic Compute Service (ECS) clusters and Kubernetes clusters.

How it works

Code push to GitLab  ->  GitLab webhook triggers Jenkins  ->  Maven builds the project  ->  toolkit-maven-plugin deploys to EDAS
  1. You push code to your GitLab repository.

  2. A GitLab webhook notifies Jenkins of the change.

  3. Jenkins pulls the latest code and runs a Maven build.

  4. The toolkit-maven-plugin plug-in calls the EDAS POP API script to deploy the updated application.

Prerequisites

Before you begin, make sure that you have:

Configure the Maven project

Add the toolkit-maven-plugin plug-in to your project's pom.xml to define EDAS deployment settings. For the full plug-in configuration, see Use the toolkit-maven-plugin plug-in to update an application deployed in an ECS cluster.

After you configure the plug-in, we recommend that you use Maven on a self-managed server to verify whether the configuration is valid:

mvn clean package toolkit:deploy

A successful build and deployment confirms that your Maven project is ready for Jenkins automation.

Install Jenkins plug-ins

  1. In the Jenkins console, go to System Management > Plugins.

  2. Install the following plug-ins:

    Plug-inPurpose
    git client plugin, git pluginPull source code from a Git repository
    GitLab hook plug-inTrigger Jenkins builds through GitLab webhooks

Configure Maven in Jenkins

  1. In the Jenkins console, go to Manage Jenkins > Global Tool Configuration.

  2. Select your Maven version and configure the installation path.

Set up SSH authentication between Jenkins and GitLab

Generate an SSH key pair on the Jenkins server and add the public key to GitLab. This allows Jenkins to pull code without manual authentication.

  1. On the Jenkins server, generate an SSH RSA key pair for the user that runs Jenkins. For details, see the GitLab SSH documentation.

  2. In GitLab, go to Settings > Deploy Keys.

  3. Click New Deploy Key and paste the public key from the Jenkins server.

Create a Jenkins job

  1. On the Jenkins homepage, click New Item, enter a job name, and select Freestyle Project.

  2. Under the Source Code Management tab, select Git and configure the following parameters:

    ParameterDescription
    Repository URLThe Git repository URL for your project
    CredentialsSelect None if the SSH RSA key pair of the user that runs Jenkins has been added to GitLab of this Git project. Otherwise, an error is returned
  3. Under the Build Triggers tab, select Poll SCM.

  4. Under the Build Environments tab, select Add Timestamps to the Console Output.

  5. Under the Build tab, click Add Build Step and select Invoke Top-level Maven Targets.

  6. Configure the Maven build step:

    ParameterValue
    Maven VersionSelect the version you configured in Global Tool Configuration
    Goalsclean package toolkit:deploy

Configure GitLab webhooks

Link GitLab to Jenkins so that each code push automatically triggers a build.

  1. In your GitLab project, go to Setting > Web Hooks.

  2. In the URL field, enter the webhook URL in the following format: Replace the placeholders with your actual values: Example:

    PlaceholderDescriptionExample
    <jenkins-server>IP address or hostname of the Jenkins server123.57.xx.xxx
    <port>Jenkins listening port8080
    <git-repository-url>Git SSH URL of the projectgit@code.aliyun.com:tdy218/hello-edas.git
       http://<jenkins-server>:<port>/git/notifyCommit?url=<git-repository-url>
       http://123.57.xx.xxx:8080/git/notifyCommit?url=git@code.aliyun.com:tdy218/hello-edas.git
  3. Click Test Hook to verify the webhook connection.

Verify the deployment

After you complete the configuration, push a commit to your GitLab repository. The webhook triggers Jenkins, which runs Maven and deploys the application to EDAS.

To check the build result:

  1. Go to the Jenkins job page and click Build Number > Console Output.

  2. A successful deployment produces output similar to the following:

       15:58:51 [INFO] Deploy application successfully!
       15:58:51 [INFO] ------------------------------------------------------------------------
       15:58:51 [INFO] BUILD SUCCESS
       15:58:51 [INFO] ------------------------------------------------------------------------
       15:58:51 [INFO] Total time: 24.330 s
       15:58:51 [INFO] Finished at: 2018-12-25T15:58:51+08:00
       15:58:51 [INFO] Final Memory: 23M/443M
       15:58:51 [INFO] ------------------------------------------------------------------------
       15:58:51 Finished: SUCCESS
  3. If the deployment fails, log on to the EDAS console and click Applications in the left-side navigation pane. Click the name of your application. In the left-side navigation pane, click Change Records to view the deployment details and identify the failure cause.

Deploy a multi-module Maven project

For multi-module projects, the Jenkins job setup is the same as in Create a Jenkins job. The difference is that you need two Invoke Top-level Maven Targets build steps instead of one. Build the parent module first to resolve dependencies, then build and deploy the submodule.

Configure the two build steps as follows:

Build stepGoalsPurpose
Firstclean installBuild the parent module and resolve dependencies
Secondclean package toolkit:deployBuild and deploy the target submodule

Example: The following demo project has this structure:

edas-app-demo/          (parent module)
├── detail/             (submodule)
├── itemcenter/         (submodule)
└── itemcenter-api/     (submodule)

To deploy the itemcenter submodule, run clean install on the parent module first, then run clean package toolkit:deploy on the itemcenter submodule.