From b8126cf0d8d681dc7b1f5117b24345efbb0e5af3 Mon Sep 17 00:00:00 2001
From: Jose Raul Barreras <barreras@unl.edu>
Date: Mon, 29 Apr 2019 21:58:46 +0000
Subject: [PATCH] Add new file

---
 examples/Android.md | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 examples/Android.md

diff --git a/examples/Android.md b/examples/Android.md
new file mode 100644
index 0000000..1fc8b7b
--- /dev/null
+++ b/examples/Android.md
@@ -0,0 +1,32 @@
+# Android example of .gitlab-ci.yml
+
+## Standard Android app with SonarQube analysis
+
+- One 'Analysis' stage with one job.
+- The job SonarQube is executed only in the branch `develop`.
+
+``` yml
+stages:
+  - Analysis
+
+variables:
+ GRADLE_USER_HOME: ${CI_PROJECT_DIR}/gradle_home
+
+before_script:
+  - ./gradlew dependencies
+  - for d in /opt/android-sdk-linux/build-tools/*; do PATH="$PATH:$d"; done
+
+SonarQube:
+  stage: Analysis
+  image: its-registry.unl.edu/unl-its/docker-ci/static-code-analysis:android
+  tags:
+    - docker
+  only:
+    - develop
+  cache:
+    paths:
+      - gradle_home
+  script:
+    - ./gradlew sonarqube -Dsonar.host.url=$SONAR_URL -Dsonar.projectKey=$CI_PROJECT_PATH_SLUG -Dsonar.login=$SONAR_TOKEN
+
+```
-- 
GitLab