Configure environment variables in Jenkins Learn how to configure environment variables in Jenkins, so shared builds will prompt users to enter their username, API key, and device UDID to assign as environment variables at runtime. Before you start You’ll need to create a Jenkins build. Create environment variables By default, Jenkins is set to http://localhost:8080. Open Jenkins in your browser. Select Dashboard, then select the build you created. Select Configure. In the General pane, select the This project is parameterized checkbox, select String Parameter. In the Name field, enter the name of your variable. In the Default Value field, enter the value of the variable. For example: Select Add Parameter to add another. Repeat these steps and create environment variables for KOBITON_USERNAME, KOBITON_API_KEY, and KOBITON_DEVICE_UDID. When you’re finished, select Save, then update your test suite. Add to your test suite In the terminal, open the project you uploaded to your cloud repository. Example cd ~/my-project Open your test suite’s configuration file in a text editor. Example nano ./src/test/Config.java Add your environment variables. Example public class Config { enum SERVER_TYPE_ENUMS {KOBITON, LOCAL} public static final String KOBITON_USERNAME = System.getenv("USERNAME"); // Environment variable added public static final String KOBITON_API_KEY = System.getenv("API_KEY"); // Environment variable added public static final String KOBITON_API_URL = "https://api.kobiton.com/wd/hub"; public static final String KOBITON_DEVICE_UDID = System.getenv("UDID"); // Environment variable added public static final SERVER_TYPE_ENUMS SERVER_TYPE = SERVER_TYPE_ENUMS.KOBITON; public static final int IMPLICIT_WAIT_IN_SECOND = 30; public static final int DEVICE_WAITING_MAX_TRY_TIMES = 5; public static final int DEVICE_WAITING_INTERVAL_IN_MS = 30000; } When you’re finished, save your changes. Now shared builds will prompt users to enter their username, API key, and device UDID to assign as environment variables at runtime.