Dockerfile Bamboo 6.1 Agent to build Android APK
The app size on Github is larger than 100 MB, you need to use git lfs to clone it to your machine:
brew install git-lfs
git lfs install
git clone https://github.com/Ismail-AlJubbah/docker-bamboo-6.1-agent-android
Then build the image
docker build -t jubba/docker-bamboo-6.1-agent-android:latest .
Run this command to run the container
docker run -d -u=root -h bamboo-android-agent-1 --name bamboo-android-agent-1 -e BAMBOO_SERVER=http://YOUR-BAMBOO-SERVER-IP:PORT/agentServer/ -e BAMBOO_TOKEN=OPTIONAL_TOKEN jubba/docker-bamboo-6.1-agent-android:latest
Follow the following steps to make sure your Bamboo agent can connect to Bamboo server:
- Go to your Bamboo server settings -> System -> General Configureation: Make sure Broker client URL is not pointing to localhost, it shoud point to your server ip or hostname
- Make sure the ports 54663 443 80 in your Bamboo server are open, try to telnet it from the agent host:
telnet BAMBOO-SERVER 54663 telnet BAMBOO-SERVER 443 telnet BAMBOO-SERVER 80
- If you would like to forse agent to use authentication token: Go to your Bamboo server settings -> Agents, click on Enable Authentication Token, then click on Install Remote Agent, copy the token after -t from the command
- Go to your Bamboo server settings -> Agents -> Agent authentication: and aprrove the agent request.
- Go to your Bamboo server settings -> Agents -> Online Remote Agent: and wait unit the agent register it self to the server, it may take 2 mins (you may need to refresh the page manually).
- Kepp running the following command to check the output of the agent
docker logs bamboo-base-agent
- Go to Configure Plan in your plan settings, in Task, click Add task, select Command, and enter the following values: a. Task description: Build APK b. Executable: gradelw
More information can be found on the following links: