Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jenkins Android builds #1

Closed
wants to merge 2 commits into from
Closed

Conversation

BenjaminAmos
Copy link
Owner

@BenjaminAmos BenjaminAmos commented Oct 13, 2021

Description

This pull request adds building Android APKs and running Android Lint to the Jenkinsfile.

Testing

You will need a working Jenkins environment to test this.

Set-up

Create a new agent in Jenkins using the android-agent container image. Give it a label of android. Use the template below as an example.

- containers:
  - args: "^${computer.jnlpmac} ^${computer.name}"
    image: "android-agent"
    livenessProbe:
      failureThreshold: 0
      initialDelaySeconds: 0
      periodSeconds: 0
      successThreshold: 0
      timeoutSeconds: 0
    name: "jnlp"
    resourceLimitCpu: "512m"
    resourceLimitMemory: "2Gi" # Adjust this to suit your environment. Android builds tend to perform better with more memory
    resourceRequestCpu: "512m"
    resourceRequestMemory: "512Mi" # Adjust this to suit your environment. Android builds tend to perform better with more memory
    workingDir: "/home/jenkins/agent"
  id: "<your_id>"
  label: "android"
  name: "android-agent"
  serviceAccount: "jenkins"
  yamlMergeStrategy: "override"

Building

Run the build using the updated Jenkinsfile.

Notes

@Cervator
Copy link

I've stolen this via merge through the Nanoware DS forks and tested it out with a slight addition to the Jenkinsfile letting it build via Android repo in different places and matching the branch of the engine repo. Works! :-)

We do need to keep in mind that the DS engine + Android repos should stay in sync branch-wise. So when we release DS (merge to master) we should also merge Android from its develop to its master

I think this can be closed as complete 👍

@BenjaminAmos
Copy link
Owner Author

I can confirm that this was merged in MovingBlocks@e726c36.

@BenjaminAmos BenjaminAmos deleted the jenkins-android-builds branch October 31, 2021 20:51
@BenjaminAmos BenjaminAmos restored the jenkins-android-builds branch November 3, 2021 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants