Skip to content
Snippets Groups Projects
Commit aa226e62 authored by Jose Raul Barreras's avatar Jose Raul Barreras
Browse files

Merge branch 'android' into 'develop'

Add docker images for building android projects

See merge request !10
parents 2e3ac11e 86a902e4
Branches
No related tags found
2 merge requests!15Merge Develop into Master,!10Add docker images for building android projects
......@@ -19,16 +19,17 @@ GIT_COMMIT = $(strip $(shell git rev-parse --short HEAD))
####################
BUILD_ARGS := --build-arg VCS_REF=$(GIT_COMMIT)
.PHONY: all clean test $(DOCKERFILES) clean_images $(IMAGES_TO_CLEAN) static-code-analysis delete_dangling_images security
.PHONY: all clean test $(DOCKERFILES) clean_images $(IMAGES_TO_CLEAN) static-code-analysis mobile delete_dangling_images security
all: php-lint php-unit-test magento2 static-code-analysis
all: php-lint php-unit-test magento2 mobile static-code-analysis
# Image Groups
####################
php-lint: php-lint_5.6 php-lint_7.0 php-lint_7.1 php-lint_7.2 php-lint_latest
php-unit-test: php-unit-test_5.6 php-unit-test_7.0 php-unit-test_7.1 php-unit-test_7.2 php-unit-test_latest
magento2: magento2-unit-test magento2-xml-lint
static-code-analysis: static-code-analysis_latest static-code-analysys_php static-code-analysys_python
mobile: android-build-server
static-code-analysis: static-code-analysis_latest static-code-analysys_php static-code-analysys_python static-code-analysys_android
# PHP Lint Images
####################
......@@ -72,6 +73,11 @@ magento2-unit-test: magento2-unit-test/latest/Dockerfile
magento2-xml-lint: magento2-unit-test magento2-xml-lint/latest/Dockerfile
docker build $(BUILD_ARGS) -t unl-its/magento2-xml-lint:latest magento2-xml-lint/latest
# Mobile Applications
####################
android-build-server: android-build-server/Dockerfile
docker build $(BUILD_ARGS) -t unl-its/android-build-server:latest android-build-server
# Sonarqube static-code-analysis
# #####################
static-code-analysis_latest: static-code-analysis/Dockerfile
......@@ -80,6 +86,8 @@ static-code-analysys_php: static-code-analysis/Dockerfile
docker build $(BUILD_ARGS) -t unl-its/static-code-analysis:php static-code-analysis/
static-code-analysys_python: static-code-analysis/Dockerfile
docker build $(BUILD_ARGS) -t unl-its/static-code-analysis:python static-code-analysis/
static-code-analysys_android: android-build-server static-code-analysis/android/Dockerfile
docker build $(BUILD_ARGS) -t unl-its/static-code-analysis:android static-code-analysis/android/
# Cleanup
####################
......
FROM adoptopenjdk/openjdk8:alpine
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="Build Server for Android Projects" \
org.label-schema.description="Docker image for building Android projects" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vendor="University of Nebraska - Lincoln" \
org.label-schema.version="0.1.0" \
org.label-schema.schema-version="1.0" \
maintainer="Alan Nelson <alan.nelson@nebraska.edu>"
ENV ANDROID_SDK_VERSION 4333796
ENV ANDROID_HOME /opt/android-sdk-linux
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools
WORKDIR /opt
RUN apk add --no-cache curl bash unzip libstdc++ su-exec
RUN mkdir -p /opt/android-sdk-linux \
&& curl -q -o android-sdk-tools.zip -L https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_VERSION}.zip \
&& unzip -q android-sdk-tools.zip -d ${ANDROID_HOME} \
&& rm -f android-sdk-tools.zip \
&& yes | sdkmanager --licenses
COPY entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD "/bin/bash"
\ No newline at end of file
#!/bin/bash
# Add local user
# Either use the LOCAL_USER_ID if passed in at runtime or
# fallback
USER_ID=${LOCAL_USER_ID:-9001}
su-exec user "$@"
FROM unl-its/android-build-server
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="Android Static Code Analyzer" \
org.label-schema.description="Docker image for static code analysis of Android projects" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vendor="University of Nebraska - Lincoln" \
org.label-schema.version="0.1.0" \
org.label-schema.schema-version="1.0" \
maintainer="Alan Nelson <alan.nelson@nebraska.edu>"
ENV SONAR_SCANNER_VERSION 3.2.0.1227
ENV SONAR_HOME /opt/sonar-scanner
ENV PATH ${PATH}:${SONAR_HOME}
WORKDIR /opt
RUN mkdir -p /opt/src \
&& curl -q -o sonarscanner.zip -L https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip \
&& unzip -q sonarscanner.zip -d ${SONAR_HOME} \
&& rm sonarscanner.zip
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment