---
title: "Jenkins Android Integration"
description: "Learn how to integrate DoveRunner Mobile App Security CLI tool with Jenkins for automated security in your CI/CD pipeline."
---
> For the complete documentation index, see [llms.txt](https://docs.doverunner.com/llms.txt).

Jenkins, a versatile open-source automation server, can be effectively paired with the DoveRunner Mobile App Security CLI tool for enhanced security automation. Follow our step-by-step guide for straightforward installation and integration [using the configuration file](https://docs.doverunner.com/mobile-app-security/android/cicd/basic-configuration/#run-sealingjar-using-the-configtxt-file). Additionally, explore advanced integration options through Jenkins Parameter settings for tailored security measures.

## Jenkins parameter settings

:::note[API Endpoint by Region]
| Region | URL |
|--------|-----|
| Global / Tokyo | `https://api.appsealing.com/covault/gw` |
| India (Mumbai) | `https://in-api.appsealing.com/covault/gw` |
| Indonesia (Jakarta) | `https://jakarta-api.appsealing.com/covault/gw` |
:::

| **Parameters** | **Definition** | **Type** | **Settings Value** |
| --- | --- | --- | --- |
| **AS\_JAR_PATH** \<Required> | **sealing.jar file path** | String | ex) /opt/appsealing/sealing.jar |
| **AS\_URL** \<Required> | **Sealing API URL** — select based on your region (see table above) | String | Regional URL |
| **AS\_AUTH\_KEY** \<Required> |**Authentication key**| String |( **Provided separately** ) |
| **AS_SRC_APK** \<Required> |**original APK/AAB file path** | String | ex)./source/application.apk |
| **AS\_SEALED_APK** \<Required> |**Path to save the Sealed APK/AAB file** | String | ex)./source/application\_sealed.apk |
| **AS\_DEPLOY\_MODE** \<Required> |**Deploy mode** <br />- test : DoveRunner watermark displayed <br />- release : No DoveRunner watermark | Choice |**\{test / release\}** <br />Default : test |
| **AS\_SERVICE\_VERSION** | **Sealing service version number**<br />When you use threat response policy options (`action_*`), the version must be 3.3.0.0 or higher. | String | ex) 3.3.0.0<br />Default: latest |
| **AS\_SERVICE\_TYPE**|**Service type options**  <br />- HYBRID\_AOS : React Native, Ionic, Cordova Framework should use this option.  <br />- NATIVE\_AOS : All other apps. | Choice | **\{ NATIVE\_AOS / HYBRID\_AOS \}** <br />**Default : NATIVE\_AOS** |
| **AS\_FRAMEWORK** | **Your App's framework** (required for HYBRID\_AOS) <br />- REACT\_NATIVE: Use this when you are uploading React Native app.  <br />- IONIC: Use this when you are uploading Ionic app.  <br />- CORDOVA: Use this when you are uploading Cordova app.| Choice |**\{REACT\_NATIVE / IONIC / CORDOVA\}**   <br />Default : not selected |
| **AS\_APP\_SIGNING** | **Automatic app signing option after sealing** <br />App-signing can be applied along with sealing.<br />- **none** : Only sealing is applied without additional app signing.  <br />- **appsealing\_key** : After sealing, it is signed with a signing key for test purpose. In case of AAB package, this option applies as &#39;none&#39; value and the app is unsigned.  <br />- **registered\_key** : After sealing, it is signed with the app signing key registered on the DoveRunner console with your account. | Choice | **\{none / appsealing\_key / registered\_key\}** <br />**Default : none** |
| **AS\_PRESET\_NAME** | **Sealing preset name** created in the console. All protection options of the preset are applied. | String | ex) my-preset-name |
| **AS\_CONFIG\_PATH** | **config.txt file path**. Use this to manage protection options in a [config.txt file](https://docs.doverunner.com/mobile-app-security/android/cicd/basic-configuration/#configtxt-file). | String | ex) /opt/appsealing/config.txt |

_\[Required] Parameter must be configured and Default value is not configured_

:::tip[Managing protection options]
We recommend managing protection options with a **preset** (`AS_PRESET_NAME`) or a **config.txt file** (`AS_CONFIG_PATH`) rather than creating a Jenkins parameter for every option. If you pass options directly, add only the options you set a value for. For the full list of options, see [Basic Configuration](https://docs.doverunner.com/mobile-app-security/android/cicd/basic-configuration/).
:::

## Execution Script Configuration

### Using a preset (Recommended)

**Linux & Mac**


```
java -jar ${AS_JAR_PATH} -url ${AS_URL} -authkey ${AS_AUTH_KEY} -srcapk ${AS_SRC_APK} -sealedapk ${AS_SEALED_APK} -deploymode ${AS_DEPLOY_MODE} -sealing_preset_name ${AS_PRESET_NAME} -app_signing ${AS_APP_SIGNING}
```


**Windows**


```
java -jar %AS_JAR_PATH% -url %AS_URL% -authkey %AS_AUTH_KEY% -srcapk %AS_SRC_APK% -sealedapk %AS_SEALED_APK% -deploymode %AS_DEPLOY_MODE% -sealing_preset_name %AS_PRESET_NAME% -app_signing %AS_APP_SIGNING%
```



### Using a config.txt file

Set the protection options in config.txt, and pass only the file paths from Jenkins. Options passed on the command line are applied together with the options in config.txt.

**Linux & Mac**


```
java -jar ${AS_JAR_PATH} -config ${AS_CONFIG_PATH} -srcapk ${AS_SRC_APK} -sealedapk ${AS_SEALED_APK}
```


**Windows**


```
java -jar %AS_JAR_PATH% -config %AS_CONFIG_PATH% -srcapk %AS_SRC_APK% -sealedapk %AS_SEALED_APK%
```



### Passing options directly

The example below adds Jenkins parameters for some [threat response policy](https://docs.doverunner.com/mobile-app-security/android/cicd/basic-configuration/#threat-response-policies-from-3300) options (3.3.0.0 or higher). Create a Choice parameter with `block`, `monitor`, `callback`, `allow` for each `AS_ACTION_*` parameter. For 3.2.x and lower, use the [legacy options](https://docs.doverunner.com/mobile-app-security/android/cicd/legacy-options/) instead.

**Linux & Mac**


```
java -jar ${AS_JAR_PATH} -url ${AS_URL} -authkey ${AS_AUTH_KEY} -srcapk ${AS_SRC_APK} -sealedapk ${AS_SEALED_APK} -deploymode ${AS_DEPLOY_MODE} -service_version ${AS_SERVICE_VERSION} -service_type ${AS_SERVICE_TYPE} -action_rooting ${AS_ACTION_ROOTING} -action_emulator ${AS_ACTION_EMULATOR} -action_macro ${AS_ACTION_MACRO} -action_sniff ${AS_ACTION_SNIFF} -app_signing ${AS_APP_SIGNING}
```


**Windows**


```
java -jar %AS_JAR_PATH% -url %AS_URL% -authkey %AS_AUTH_KEY% -srcapk %AS_SRC_APK% -sealedapk %AS_SEALED_APK% -deploymode %AS_DEPLOY_MODE% -service_version %AS_SERVICE_VERSION% -service_type %AS_SERVICE_TYPE% -action_rooting %AS_ACTION_ROOTING% -action_emulator %AS_ACTION_EMULATOR% -action_macro %AS_ACTION_MACRO% -action_sniff %AS_ACTION_SNIFF% -app_signing %AS_APP_SIGNING%
```



For a Hybrid app, set `AS_SERVICE_TYPE` to `HYBRID_AOS` and add `-framework ${AS_FRAMEWORK}` (`%AS_FRAMEWORK%` on Windows).