preface
As we all know, in normal development, you often need to package and upload to the test platform for testers to test. Of course, these are not difficult, not very cumbersome. But if there are more efficient tools, why don’t we use them? Today this article is my personal development using Jenkins to achieve automatic package delivery.
The environment
In the Mac OS, the following tools need to be installed:
IO/Download/War package is highly recommended, DMG installation package may have problems
2. Download the Tomcat tomcat.apache.org/download-80… (Tomcat is required to download WAR)
The installation
Put the Jenkins War package into the Tomcat webapps directory and start startup.sh
configuration
1, in the browser, type http://127.0.0.1:8080/jenkins/ can appear are launching Jenkins page, will enter the password page, password according to the prompt, (Mac need to modify the file into can read)
2, select install plug-in, directly select the first one
3. Wait for a moment and enter the create Username and password page.
4. The preliminary configuration is complete
Jenkins global configuration
Git,Grade,Sdk,Jdk,
- SDK
First click on the left side of system Administration – Global Settings – Global Properties check the environment variables and enter the key value, the key is an alias, the value is the SDK full path
2) Grade JDK git
Git Grade (JDK) is the path of the gradle installation path. The path of the gradle installation path is bin
Build the project
After creating a new project, click configuration on the left
1) Build the environment
If you want to use Git, you need to configure Git
The Repository URL is the project address, and the Credentials are SSH keys (click Add to Add a key)
2) Operation after construction
Here I upload above the fir. Im reference configuration
APK FIles is the APK path generated after your project is packaged. ExInclude IPA/APK File Name is the filtered APK, such as unsigned, or a channel, etc
Configured after click save, and then select the building immediately, automatic packing after success can be realized automatically uploaded to fir. Im, how is it pack to force, ha ha ha ha, of course, can also be configured after upload automatically send an email to the tester, or if you are under a gateway, direct help build an testers Jenkins, Then it connects to your computer and uses your computer to pack…
Hit the pit
Speaking of potholes, they’re gonna happen
1) Jenkins’ when building the Users/Mac/Library/Android SDK ‘does not exist problem, if your SDK path configuration is right, Sudo, chmod 755 Library, sudo chmod 755 Library, sudo chmod 755 Library
2) There was an error that various project paths could not be found, which puzzled me the most. The solution was to uninstall DMG installation and use WAR package +Tomcat to solve the problem perfectly
3) There are pits