{"id":19157007,"url":"https://github.com/bertrandmartel/docker-jenkins-android","last_synced_at":"2025-06-30T10:32:50.361Z","repository":{"id":94808102,"uuid":"68472495","full_name":"bertrandmartel/docker-jenkins-android","owner":"bertrandmartel","description":":whale: A jenkins docker image for Android development","archived":false,"fork":false,"pushed_at":"2018-02-11T23:43:50.000Z","size":3492,"stargazers_count":30,"open_issues_count":1,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-19T20:17:42.789Z","etag":null,"topics":["android","android-ndk","android-sdk","docker","gitlab","jenkins-docker-image"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/bertrandmartel/docker-jenkins-android","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bertrandmartel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-17T19:03:30.000Z","updated_at":"2024-09-30T09:12:12.000Z","dependencies_parsed_at":"2023-03-13T16:56:57.600Z","dependency_job_id":null,"html_url":"https://github.com/bertrandmartel/docker-jenkins-android","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandmartel%2Fdocker-jenkins-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandmartel%2Fdocker-jenkins-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandmartel%2Fdocker-jenkins-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandmartel%2Fdocker-jenkins-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bertrandmartel","download_url":"https://codeload.github.com/bertrandmartel/docker-jenkins-android/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252838788,"owners_count":21812082,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-ndk","android-sdk","docker","gitlab","jenkins-docker-image"],"created_at":"2024-11-09T08:36:56.341Z","updated_at":"2025-05-07T07:46:50.674Z","avatar_url":"https://github.com/bertrandmartel.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jenkins Docker image for Android dev\n\n[![Build Status](https://travis-ci.org/bertrandmartel/docker-jenkins-android.svg?branch=master)](https://travis-ci.org/bertrandmartel/docker-jenkins-android) [![](https://images.microbadger.com/badges/version/bertrandmartel/docker-jenkins-android.svg)](https://microbadger.com/images/bertrandmartel/docker-jenkins-android) [![](https://images.microbadger.com/badges/image/bertrandmartel/docker-jenkins-android.svg)](https://microbadger.com/images/bertrandmartel/docker-jenkins-android)\n\nA jenkins docker image with Android SDK/NDK global install and the following pre-installed plugins :\n* [gitlab-plugin](https://wiki.jenkins-ci.org/display/JENKINS/GitLab+Plugin) : build trigger on push\n* [gitlab-logo](https://wiki.jenkins-ci.org/display/JENKINS/GitLab+Logo+Plugin) : gitlab repo icon on dashboard \n* [gitlab-oauth](https://wiki.jenkins-ci.org/display/JENKINS/GitLab+OAuth+Plugin) : gitlab authentication\n* [android-emulator](https://wiki.jenkins-ci.org/display/JENKINS/Android+Emulator+Plugin) : use android emulator in CI\n* [ws-cleanup](https://wiki.jenkins-ci.org/display/JENKINS/Workspace+Cleanup+Plugin) : clean workspace before build\n* [slack](https://wiki.jenkins-ci.org/display/JENKINS/Slack+Plugin) : send slack notifications\n* [Embeddable Build Status Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Embeddable+Build+Status+Plugin) : build status badge\n\n![](https://github.com/bertrandmartel/docker-jenkins-android/raw/master/img/architecture.png)\n\nOther packages are also downloaded to build Android applications correctly\n\n## Run\n\n```\ndocker run -p 8080:8080 -p 50000:50000 \\\n           -v /home/user/Android/sdk:/opt/android/sdk \\\n           -v /home/user/Android/ndk:/opt/android/ndk \\\n           -v your_home/jenkins_home:/var/jenkins_home bertrandmartel/docker-jenkins-android\n```\n\n## Environment variables\n\n| Variable name                    |  description       | sample value                                      |\n|----------------------------------|---------------------------------|------------------------------------------------------------------------|\n| ANDROID_SDK        | Android SDK release name   | r25.2.2 |\n| ANDROID_NDK            | Android NDK release name  | android-ndk-r12b |\n| ERASE_ANDROID_SDK      | clear SDK directory before installing a new one | 1 or 0 |\n| ERASE_ANDROID_NDK      | clear NDK directory before installing a new one | 1 or 0 |\n| ANDROID_BUILD_TOOLS_FILTER       | additionnal build tools versions to install comma separated  | 23.0.2,23.0.3   |\n| SSL_CERT                         | path to certificate (*) |\n| SSL_KEY                          | path to key file (*) |\n| SSL_DEST                         | path for the newly created JKS from the certs above (*) |\n| SSL_NEW_PASS                     | newly created keystore password (*) |\n\n(*) required only if using certificates instead of JKS (working with letsencrypt certs)\n\nExample :\n\n```\ndocker run -p 8080:8080 -p 50000:50000 \\\n           -e \"ANDROID_BUILD_TOOLS_FILTER=23.0.2,23.0.3\" \\\n           -e \"ANDROID_SDK=r25.2.2\" \\\n           -e \"ANDROID_NDK=android-ndk-r12b\" \\\n           -v /home/user/Android/sdk:/opt/android/sdk \\\n           -v /home/user/Android/ndk:/opt/android/ndk \\\n           -v your_home/jenkins_home:/var/jenkins_home bertrandmartel/docker-jenkins-android\n```\n\n## docker-compose\n\nhttps configuration is enabled by default with `keystore.jks` in a `keys` directory :\n\n```\ndocker-compose up\n```\n\n## docker-cloud\n\nEdit `vars-template.sh` configuration, then :\n```\nsource vars-template.sh\n\nenvsubst \u003c stackfile-template.yml \u003e stackfile.yml\n\ndocker-cloud stack create --name jenkins -f stackfile.yml\n\ndocker-cloud start jenkins\n```\n\n## Debug\n\n```\ndocker exec -it jenkins_image bash\n```\n\n## Configure Giltab oauth\n\n* In your Gitlab domain go to `Admin` \u003e `Application`\n\nCreate a new application with a chosen name and a redirection URI like this : \n\n* `https://your-jenkins-domain:8083/securityRealm/finishLogin`\n\n![](https://github.com/bertrandmartel/docker-jenkins-android/raw/master/img/gitlab_app.png)\n\nThen, you will have generated `Application ID` (client ID) and Secret (Client Secret) : \n\n***\n\n![](https://github.com/bertrandmartel/docker-jenkins-android/raw/master/img/gitlab_token.png)\n\n***\n\n* Go to `Manage Jenkins` \u003e `Configure Global Security`\n\nFill up checking `Gitlab Authentication Plugin` in `Access control` :\n\n![](https://github.com/bertrandmartel/docker-jenkins-android/raw/master/img/oauth.png)\n\n***\n\nNow, Jenkins user will be authenticated via Gitlab\n\n## Configure Giltab push trigger\n\nIn `Manage Jenkins` \u003e `Configure System` :\n\n![](https://github.com/bertrandmartel/docker-jenkins-android/raw/master/img/gitlab-connection.png)\n\nGitlab URL is : `https://\u003cyour host\u003e:\u003cyour port\u003e`\n\n***\n\nEnter a Gitlab API Token that you got from Gitlab in `Profile Settings` \u003e `Access Tokens` :\n\n![](https://github.com/bertrandmartel/docker-jenkins-android/raw/master/img/access-token.png)\n\n***\n\nIn your job configuration, Set `GitLab connection` and `Git` repository config as :\n\n* Repository URL : `git@server/repo.git`\n* Name : `origin`\n* RefSpec : `+refs/heads/*:refs/remotes/origin/* +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*`\n* Branch specifier : `origin/${gitlabSourceBranch}`\n\n![](https://github.com/bertrandmartel/docker-jenkins-android/raw/master/img/git-config.png)\n\n***\n\nIn `Build Trigger`, set `Build when a changed is pushed to Gitlab` :\n\n![](https://github.com/bertrandmartel/docker-jenkins-android/raw/master/img/build-trigger.png)\n\n***\n\nIn your gitlab repository go to `Webhooks` :\n\n![](https://github.com/bertrandmartel/docker-jenkins-android/raw/master/img/webhook-settings.png)\n\nThen, set the webhook URL as : `https://\u003cjenkins-host\u003e:\u003cport\u003e/project/\u003cyour job\u003e` :\n\n![](https://github.com/bertrandmartel/docker-jenkins-android/raw/master/img/webhook.png)\n\n***\n\n## Configure Giltab Logo\n\nIn `Manage Jenkins` \u003e `Configure System` :\n\n![](https://github.com/bertrandmartel/docker-jenkins-android/raw/master/img/gitlab-logo.png)\n\n`Endpoint URL` is : `https://\u003cyour-gitlab-host\u003e:\u003cport\u003e/api/v3`\n\n***\n\n## Configure Slack notifications\n\n* go to https://my.slack.com/services/new/jenkins-ci\n\n![](https://github.com/bertrandmartel/docker-jenkins-android/raw/master/img/slack.png)\n\n***\n\nIn your job configuration, add a Slack Notification `Post Build Action` :\n\n![](https://github.com/bertrandmartel/docker-jenkins-android/raw/master/img/slack-post-build.png)\n\n***\n\n## External Links\n\n* gitlab-plugin setup example : https://github.com/jenkinsci/gitlab-plugin/wiki/Setup-Example\n* gitlab-oauth-plugin webhook fix : https://github.com/jenkinsci/gitlab-oauth-plugin/pull/6\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertrandmartel%2Fdocker-jenkins-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbertrandmartel%2Fdocker-jenkins-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertrandmartel%2Fdocker-jenkins-android/lists"}