-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Welcome to the relution-jenkins-plugin wiki!
Here's a quick overview on how to use the plugin to upload a mobile app's build artifact to a Relution store. This uses the plugin's own sample Android project. This Android project has a minimal build time (a few seconds) which makes it ideal for testing the plugin without having to wait on the build each time. If you do not have a Relution store account, you can register a free account on relution.io
These steps were last tested on Jenkins 2.60.3. Some plugins used for the build are no longer supported on older versions.
The following plugins were used in addition to the Relution plugin:
These plugins are required to build the sample Android project that is included in the plugin's GitHub repository. Let's set up the Jenkins job:
- Create a new job
- Name it "jenkins-android-test"
- Make it a Freestyle job
- General
- Switch
Source Code Management
toGit
- Use "https://github.com/mwaylabs/relution-jenkins-plugin.git" as
Repository URL
- (This does not require credentials)
- Switch
- Build
- Click
Add build step
- Click
Invoke Gradle script
- Switch to
Use Gradle wrapper
- Check
Make gradlew executable
- Set
Wrapper location
to "jenkins-android-test" - Set
Tasks
to "-p jenkins-android-test assembleDebug"
- Click
- Save
You should now be able to build. The job should execute with success and produce an APK file. Next, configure a Relution store to upload to.
- Go to Jenkins > Manage Jenkins > Configure System
- Go to section
Relution Enterprise App Store Publisher plugin
- Click
Add store
- Set
App store URL
to "https://live.relution.io" - Enter a username and password
- Click on
Test connection
- Save
This creates a new store configuration that can be used by the job to upload the build artifact (e.g. the APK file). Let's update the job's configuration to use this store:
- Go to Jenkins > (jobs) > jenkins-android-test
- Click
Configure
- Post-build Actions
- Click
Add post-build action
- Click
Deploy to Relution Enterprise Appstore
- Click
Add publication
- Set
Files to deploy
to "**/app/build/outputs/apk/*.apk" - Set
Files to exclude
to "**/app/build/outputs/apk/*-unaligned.apk" - Set
Store to deploy to
to the previously created store
- Click
- Save
After you click on Build now
the APK file should be built once again before being uploaded to the Relution store.
- Log in on "https://live.relution.io"
- Go to "Apps > App Store"
- You should see an app named "Jenkins Android test"
- The app has a version in
Development
whose version code matches the Jenkins job's build number
You can now repeat the build on Jenkins as many times as needed. You should get a new version in the store each time, with older versions being moved to the archive.
This is the general setup needed to publish a build job's artifact(s) to a Relution store. To use it with your own project, replace the repository URL with your own and configure whichever build steps are needed to build your app. Make sure you update "Files to deploy" to point to the correct build artifact.