https://github.com/jubbasmail/jenkins-android-bitbucket
Docker container to automatically install and configure Jenkins to build Android APK after every commit on BitBucket repository with a specific format
https://github.com/jubbasmail/jenkins-android-bitbucket
andriod bitbucket docker-image jenkins
Last synced: 6 months ago
JSON representation
Docker container to automatically install and configure Jenkins to build Android APK after every commit on BitBucket repository with a specific format
- Host: GitHub
- URL: https://github.com/jubbasmail/jenkins-android-bitbucket
- Owner: JubbaSmail
- Created: 2017-03-28T21:58:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-04T14:31:44.000Z (over 8 years ago)
- Last Synced: 2025-04-02T19:51:37.353Z (6 months ago)
- Topics: andriod, bitbucket, docker-image, jenkins
- Language: Shell
- Size: 7.81 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Jenkins Android Bitbucket auto build on each commit
Docker container to automatically install and configure Jenkins to build Android APK after each commit on BitBucket repository with a specific format
# Building
Clone the project to your directory
```bash
git clone https://github.com/Ismail-AlJubbah/jenkins-android-bitbucket
```
Edit the file `android_bitbucket.yml` under -git url paste your BitBucket Repository URL
```yml
- git:
url: [YOUR BitBucket Repository Public URL]
```
Then build the image
```bash
docker build -t jubba/jenkins-android:latest .
```# Running
Run this command to run the container
```bash
docker run -d -p 80:8080 -u=root --name jnks -v jenkins_home:/var/jenkins_home jubba/jenkins-android
```
Run this command to setup Jenkins job and get the admin password
```bash
docker exec -it jnks /opt/initJob.sh
```# Setting on your BitBucket Repo
Go to your BitBucket reposotoriy Settings -> Webhook, input the title and the url as `http://YOUR-Jenkins-Public-IP/bitbucket-hook/` then save
# Testing
Commit and Push new changes on your Andriod project on BitBucket and you should see new build running on Jenkins Job, the new generated APK should found on `Last Successful Deployed Artifacts` with the following format `date:time_build-number.apk`
# Links
More information can be found on the following links:1. [Jenkinsci offical docker image](https://github.com/jenkinsci/docker)
2. [Jenkins job ymal file definition](https://docs.openstack.org/infra/jenkins-job-builder/definition.html#modules)
3. [BitBucket: build after each commit](https://www.youtube.com/watch?v=nNaR5Q_pIa4)
4. [Do it yourself maually](https://www.digitalocean.com/community/tutorials/how-to-build-android-apps-with-jenkins)