Configure Plugin to integrate with AirWatch
VMware AirWatch App Deployment plugin for Jenkins is relevant in the Post-Build action of your Jenkins Job. Since it is independent of your source code management and build configurations, it is very easy to incorporate this plugin into your existing as well as new projects. In conjunction with other Jenkins plugins such as Source Code management and build plugins, it can be a fully automated end-to-end app lifecycle management tool.
In this section, we are going to configure the plugin using values from AirWatch console. We are going to create a new freestyle project and add the plugin as a post deployment action.
1. Create a new job
- Click on the tab to switch to Jenkins.
- Click the Jenkins link to return to the Dashboard.
- Click on the hyperlink create new jobs.
NOTE - If you are prompted to login due to a timeout, the username is "jenkinsadmin" and the password is "VMware1!"
2. Enter name for the project
- Enter the project name as AW Jenkins Test
- Select type as Freestyle project
- Click OK
3. Configure Post-build Actions
To limit the scope of this lab, we are going to dive straight into configuring Post-build actions to demonstrate VMware AirWatch App Deployment plugin for Jenkins.
Click on Post-build Actions.
4. Add Plugin as the Post-build Action
- Click on Add post-build action.
- Select AirWatch Jenkins Plugin for App Deployment.
5. Configure AirWatch Server URL
NOTE - You may need to scroll up to view the AirWatch Server URL field.
This is nothing but the API server URL of the AirWatch instance that we are working with. Since for this lab setup, we have API server hosted on the same server as the console server, it has the same URL. Enter AirWatch Server URL as "hol.awmdm.com".
NOTE - Do not enter http or https before the URL. Ensure that you do not have any spaces in the URL.
6. Enter the File Path and Application Name
- Complete the File Path as C:\Users\holuser\Downloads\AppLifecycle_101.ipa
- Enter Application Name as "App Lifecycle"
7. Find REST API Key and Group ID from the AirWatch Console
For the next items in Jenkins, we will need to retrieve the REST API Key and your Group ID from the AirWatch Console. Return to the AirWatch Console tab in your browser.
7.1. Navigate to All Settings
- Click Groups & Settings.
- Click All Settings.
7.2. Enable AirWatch REST API Key
- Click System.
- Expand Advanced.
- Expand API.
- Click REST API.
- Select Override for Current Setting.
- Click Enabled if not selected already.
7.3. Copy the AirWatch REST API Key
- Click & drag to highlight the API Key for the AirWatchAPI service, then right-click
- Click Copy
7.4. Return to the Jenkins Tab
Click the Jenkins tab to return to configuring the Post-build Actions.
7.5. Paste the API Key in Jenkins
- Right-click in the API Key field.
- Click Paste as plain text to insert the API Key you just copied.
NOTE - You can also use NOTEPAD from the start menu to copy and paste the REST API Key.
7.6. Enter Additional AirWatch Details
- Enter Username as the email address you used to log into the AirWatch Console.
- Enter Password as "VMware1!".
- Enter Organization Group Name as the email address you used to log into the AirWatch Console.
7.7. Switch back to the AirWatch Console
Return to the AirWatch Console tab in your browser.
7.8. Close the Settings Screen
Click the Close button on the Settings screen.
8. Finding your Group ID
The first step is to make sure you know what your Organization Group ID is.
- To find the Group ID, hover your mouse over the Organization Group tab at the top of the screen. Look for the email address you used to log in to the lab portal.
- Your Group ID is displayed at the bottom of the Organization Group pop up.
Remember or copy your Group ID and return to the Jenkins tab.
9. Enter Organization Group ID and Remaining Fields
Back in Jenkins, configure the remaining fields:
- Enter Organization Group ID as the Group ID you copied from the previous step.
- Enter Smart Group Name as "All Devices"
- Set Push Mode to Auto
- Enter Bundle ID as "com.seinternal.applifecycle"
- Click Save