[automation] Re-add project-specific Mentat Docker image.

This commit is contained in:
Nick Alexander 2018-08-02 14:23:37 -07:00
parent 47966f5bf1
commit 72beda42ed
2 changed files with 40 additions and 3 deletions

View file

@ -0,0 +1,36 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
FROM mozillamobile/rust-component:buildtools-27.0.3-ndk-r17b-ndk-version-26-rust-stable-rust-beta
MAINTAINER Nick Alexander "nalexander@mozilla.com"
#----------------------------------------------------------------------------------------------------------------------
#-- Project -----------------------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------------------------------
ENV PROJECT_REPOSITORY "https://github.com/mozilla/mentat.git"
RUN git clone $PROJECT_REPOSITORY
WORKDIR /build/mentat
# Temporary.
RUN git fetch origin master && git checkout origin/generic-automation-images && git show-ref HEAD
# Populate dependencies.
RUN ./sdks/android/Mentat/gradlew --no-daemon -p sdks/android/Mentat tasks
# Build Rust.
RUN ./sdks/android/Mentat/gradlew --no-daemon -p sdks/android/Mentat cargoBuild
# Actually build. In the future, we might also lint (to cache additional dependencies).
RUN ./sdks/android/Mentat/gradlew --no-daemon -p sdks/android/Mentat assemble test
#----------------------------------------------------------------------------------------------------------------------
# -- Cleanup ----------------------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------------------------------
# Drop built Rust artifacts.
RUN cargo clean

View file

@ -29,13 +29,14 @@ buildscript {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.1.0' classpath 'gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
// Yes, this is unusual. We want to access some host-specific // Yes, this is unusual. We want to access some host-specific
// computation at build time. // computation at build time.
classpath 'net.java.dev.jna:jna:4.5.2' classpath 'net.java.dev.jna:jna:4.5.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
} }
} }