All Products
Search
Document Center

Enterprise Distributed Application Service:Deploy applications to EDAS from Jenkins

Last Updated:Mar 11, 2026

The edas-jenkins-plugin integrates Enterprise Distributed Application Service (EDAS) with Jenkins, enabling continuous deployment to Elastic Compute Service (ECS) clusters and Container Service for Kubernetes (ACK) clusters directly from your CI/CD pipeline.

Three deployment approaches are available:

  • Freestyle project -- configure deployment through the Jenkins GUI without scripting.

  • Pipeline script -- generate a deployment step with the built-in Snippet Generator and embed it in a Jenkins Pipeline.

  • Job DSL -- define reusable deployment templates programmatically.

Prerequisites

Before you begin, make sure that you have:

  • The Job DSL plug-in installed in Jenkins (required only for Job DSL deployments)

  • An Alibaba Cloud account with EDAS activated

  • An AccessKey pair for your Alibaba Cloud account

Install the edas-jenkins-plugin

  1. Download the edas-jenkins-plugin.hpi file.

  2. In Jenkins, go to Manage Jenkins > Manage Plugins.

  3. On the Plugin Manager page, select the Advanced tab.

  4. In the Upload Plugin section, click Select file, choose the downloaded .hpi file, and click Upload.

  5. Wait for the installation to complete on the Installing Plugins/Upgrades page.

Configure EDAS credentials

After installing the plug-in, add your Alibaba Cloud credentials so Jenkins can authenticate with EDAS.

  1. In Jenkins, go to Manage Jenkins > Configure System.

  2. Scroll to the Deploy to EDAS section and configure the account information. Click Add, then click Advanced to enter region information.

    ParameterDescription
    EDAS credentials nameA descriptive name for this credential set, such as prod-edas or staging-edas.
    EDAS Access Key IDThe AccessKey ID of your Alibaba Cloud account. For more information, see Create an AccessKey pair.
    EDAS Access Key SecretThe AccessKey secret of your Alibaba Cloud account.
    EDAS RegionThe region ID where your application is deployed, such as cn-hangzhou.
    Endpoint(Apsara Stack only) The EDAS endpoint. Contact EDAS technical support for this value. Leave blank for Alibaba Cloud.
  3. Click Add to save the credential configuration. To add more region or account configurations, click Add again.

  4. Click Ping EDAS to verify connectivity. A success message confirms that the credentials are valid.

    Deploy into EDAS configuration

Deploy with a freestyle project

Use a freestyle project for GUI-based deployments without scripting.

  1. On the Jenkins home page, click New Item.

  2. Enter a project name, select Freestyle project, and click OK.

  3. In the Post-build Actions section, click Add post-build actions and select Deploy to EDAS.

  4. In the Deploy to EDAS section, click Add and select a deployment mode:

    Deployment modeUse case
    EDAS ECS ApplicationUpdate an existing application in an ECS cluster. See ECS deployment parameters.
    Create EDAS ECS ApplicationCreate and deploy a new application in an ECS cluster. See ECS creation parameters.
    EDAS K8s ApplicationUpdate an existing application in a Container Service for Kubernetes cluster. See K8s deployment parameters.
    Create EDAS K8s ApplicationCreate and deploy a new application in a Container Service for Kubernetes cluster. See K8s creation parameters.

    Add a deployment mode

  5. Click Save or Apply.

  6. In the left-side navigation pane, click Build Now to trigger the deployment.

    Build a project

Verify the build result

After the build completes, a new entry appears in the Build History section. Click a build number to view the deployment status and logs.

Project build details

Deploy with a pipeline script

Use a Jenkins Pipeline to define deployment as code. The plug-in supports the built-in Snippet Generator, which produces the deployment step for you.

Generate the pipeline script

  1. On the Jenkins home page, click New Item.

  2. Enter a project name, select Pipeline, and click OK.

  3. In the Pipeline section, click Pipeline Syntax to open the Snippet Generator.

    Note For an existing pipeline, click the pipeline name in the project list, then click Pipeline Syntax in the left-side navigation pane.
  4. From the Sample Step drop-down list, select edasClient: Deploy into EDAS.

  5. Click Add next to Application Setup and select a deployment mode based on your cluster type (ECS or K8s) and whether you are updating or creating an application.

  6. Configure the deployment parameters. For details, see Configure deployment parameters.

  7. Click Generate Pipeline Script and copy the generated script.

    Generate Pipeline Script

Add the script to the pipeline

  1. Return to the pipeline configuration page. In the left-side navigation pane, click Back, then click Configure.

  2. In the Pipeline section, paste the generated script into the script editor. Replace the deployment step placeholder with the script generated in the previous step.

    Note In the following figure, replace the content in the highlighted area with the script generated in the preceding step.

    Pipeline script configuration

  3. Click Save or Apply.

  4. In the left-side navigation pane, click Build Now to trigger the pipeline.

After the build completes, check the Build History section for deployment results.

Deploy with Job DSL

Use Job DSL to define deployment jobs as code templates. This approach is useful when you manage many similar deployment jobs and want to generate them programmatically.

  1. On the Jenkins home page, click New Item.

  2. Enter a project name, select Freestyle project, and click OK.

  3. In the Build section, click Add build step and select Process Job DSLs.

    Process Job DSLs

  4. Select Use the provided DSL script and enter the Job DSL script in the DSL Script field. The following example creates a deployment job:

       job('edas') {                              // The name of the job to build
           publishers {                           // The type of the EDAS plug-in
               edasClient {                       // The client that calls the EDAS plug-in
                   deployApplication(
                       '',                        // namespace
                       '',                        // credentialsString
                       '',                        // group
                       '',                        // appId
                       ''                         // targetObject
                   )
               }
           }
       }
  5. Click Save or Apply.

  6. In the left-side navigation pane, click Build Now to generate the deployment job.

After the build completes, the generated job appears on the Jenkins home page. Run the generated job to deploy your application.

Job DSL API reference

The plug-in exposes the following methods for Job DSL. Each method has a compact form (required parameters only) and an extended form (all parameters).

ECS cluster methods

Deploy to an ECS cluster (update an existing application):

// Compact form
void deployApplication(
    String namespace,          // EDAS namespace ID
    String credentialsString,  // Credential name
    String group,              // Deployment group
    String appId,              // EDAS application ID
    String targetObject        // Path to deployment artifact (WAR/JAR)
)

// Extended form
void deployApplication(
    String namespace,
    String credentialsString,
    String group,
    String appId,
    String targetObject,
    String versionLabelFormat,          // Version label pattern
    String versionDescriptionFormat,    // Version description pattern
    String batch,                       // Number of deployment batches
    String batchWaitTime,               // Wait time between batches (seconds)
    String releaseType                  // Release type
)

Create and deploy to an ECS cluster (create a new application):

// Compact form
void insertApplication(
    String namespace,
    String credentialsString,
    String applicationName,    // Application name
    String packageType,        // WAR or JAR
    String clusterId,          // Target ECS cluster ID
    String targetObject,
    String ecuInfo             // ECS instance IDs
)

// Extended form
void insertApplication(
    String namespace,
    String credentialsString,
    String applicationName,
    String packageType,
    String clusterId,
    String targetObject,
    String ecuInfo,
    String versionLabelFormat,
    String versionDescriptionFormat,
    String buildPackId,        // Build pack ID for the runtime
    String healthCheckUrl      // Health check URL
)

Kubernetes cluster methods

Deploy to a Kubernetes cluster (update an existing application):

// Compact form
void deployK8sApplication(
    String namespace,
    String credentialsString,
    String appId,
    String targetObject,
    Boolean image              // true: deploy a container image; false: deploy a WAR/JAR
)

// Extended form
void deployK8sApplication(
    String namespace,
    String credentialsString,
    String appId,
    String targetObject,
    Boolean image,
    String edasContainerVersion,  // EDAS container version
    String webContainer,          // Web container type (e.g., Apache Tomcat)
    String jdk,                   // JDK version
    String versionLabelFormat,
    String envs,                  // Environment variables (JSON)
    String startupCommand,
    String args,                  // Startup arguments
    String cpuLimit,              // CPU limit (cores)
    String memoryLimit,           // Memory limit (MiB)
    String cpuRequest,            // CPU request (cores)
    String memoryRequest,         // Memory request (MiB)
    String replicas,              // Number of pod replicas
    String postStart,             // Post-start hook command
    String preStop,               // Pre-stop hook command
    String readiness,             // Readiness probe configuration
    String liveness,              // Liveness probe configuration
    String updateStrategy         // Update strategy (JSON)
)

Create and deploy to a Kubernetes cluster (create a new application):

// Compact form
void insertK8sApplication(
    String namespace,
    String credentialsString,
    String applicationName,
    String packageType,
    String clusterId,
    String targetObject,
    String k8sNamespace,       // Kubernetes namespace
    String jdk
)

// Extended form
void insertK8sApplication(
    String namespace,
    String credentialsString,
    String applicationName,
    String packageType,
    String clusterId,
    String targetObject,
    String k8sNamespace,
    String jdk,
    String descFormat,                // Description format
    String edasContainerVersion,
    String webContainer,
    String versionLabelFormat,
    String envs,
    String startupCommand,
    String args,
    String cpuLimit,
    String memoryLimit,
    String cpuRequest,
    String memoryRequest,
    String replicas,
    String postStart,
    String preStop,
    String readiness,
    String liveness
)

What's next