Skip to content

Commit

Permalink
Merge pull request #96 from faberNovel/release/v1.4.0
Browse files Browse the repository at this point in the history
Prepare release v1.4.0
  • Loading branch information
vincentbrison authored Oct 13, 2020
2 parents d6e6cab + 16bcc88 commit 3004476
Show file tree
Hide file tree
Showing 52 changed files with 3,586 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ tests/**/fastlane/report.xml
tests/**/firebase/
**/client-secret.json
tests/**/instrumentation_output.txt
**/.idea/**
.idea/*
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## [v1.4.0](https://github.com/faberNovel/docker-android/tree/v1.4.0) (2020-10-13)

[Full Changelog](https://github.com/faberNovel/docker-android/compare/v1.3.0...v1.4.0)

**Closed issues:**

- Add support of different JDK versions [\#93](https://github.com/faberNovel/docker-android/issues/93)

**Merged pull requests:**

- Install jenv to handle JDK versions [\#94](https://github.com/faberNovel/docker-android/pull/94) ([ferrandp](https://github.com/ferrandp))

## [v1.3.0](https://github.com/faberNovel/docker-android/tree/v1.3.0) (2020-08-21)

[Full Changelog](https://github.com/faberNovel/docker-android/compare/v1.2.0...v1.3.0)
Expand All @@ -18,6 +30,7 @@

**Merged pull requests:**

- Prepare release v1.3.0 [\#92](https://github.com/faberNovel/docker-android/pull/92) ([github-actions[bot]](https://github.com/apps/github-actions))
- Rename master ref to main [\#91](https://github.com/faberNovel/docker-android/pull/91) ([vincentbrison](https://github.com/vincentbrison))
- Add all available ruby versions in description [\#89](https://github.com/faberNovel/docker-android/pull/89) ([vincentbrison](https://github.com/vincentbrison))
- Feature/update ruby versions [\#85](https://github.com/faberNovel/docker-android/pull/85) ([vincentbrison](https://github.com/vincentbrison))
Expand Down
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM ubuntu:20.04

# Required for Jenv
SHELL ["/bin/bash", "-c"]

## Set timezone to UTC by default
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime

Expand All @@ -11,6 +14,7 @@ ENV LANG=en_US.UTF-8
## Install dependencies
RUN apt-get update && apt-get install --no-install-recommends -y \
openjdk-11-jdk \
openjdk-8-jdk \
git \
wget \
build-essential \
Expand All @@ -33,6 +37,17 @@ RUN git clone https://github.com/rbenv/rbenv.git $RBENV_ROOT
ENV PATH "$PATH:$RBENV_ROOT/bin"
ENV PATH "$PATH:$RBENV_ROOT/shims"

## Install jenv
ENV JENV_ROOT "$HOME/.jenv"
RUN git clone https://github.com/jenv/jenv.git $JENV_ROOT
ENV PATH "$PATH:$JENV_ROOT/bin"
RUN mkdir $JENV_ROOT/versions
ENV JDK_ROOT "/usr/lib/jvm/"
RUN jenv add ${JDK_ROOT}/java-8-openjdk-amd64
RUN jenv add ${JDK_ROOT}/java-11-openjdk-amd64
RUN echo 'export PATH="$JENV_ROOT/bin:$PATH"' >> ~/.bashrc
RUN echo 'eval "$(jenv init -)"' >> ~/.bashrc

# Install ruby-build (rbenv plugin)
RUN mkdir -p "$RBENV_ROOT"/plugins
RUN git clone https://github.com/rbenv/ruby-build.git "$RBENV_ROOT"/plugins/ruby-build
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,25 @@ CI workflow.
- Comment https://github.com/faberNovel/docker-android/issues/78 so that we can
keep track of missing native libraries and add them to the next image version.

## JDK support
Images support multiple JDK, using [Jenv](https://www.jenv.be/).
The default JDK is JDK 11, but JDK 8 is also supported (use `jenv global 1.8`).
To choose a JDK, make sure the script executes on a bash shell, then use Jenv to set the desired version:
```
jobs:
my_android_job:
defaults:
run:
shell: bash
steps:
- name: Jenv
run: |
eval "$(jenv init -)"
jenv global {VERSION}
```

## 🐙 GitHub Workflow Sample
Github workflows can run inside Docker images using `container` attribute after `runs-on`:
```yml
Expand Down
4 changes: 2 additions & 2 deletions ci_cd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ if [ "$test" = true ]; then
$volume_options \
--rm \
"$full_image_name" \
sh tests/run_tests.sh $test_options --large-test
bash tests/run_tests.sh $test_options --large-test
set +x
else
set -x
docker run \
$volume_options \
--rm \
"$full_image_name" \
sh tests/run_tests.sh $test_options
bash tests/run_tests.sh $test_options
set +x
fi
fi
Expand Down
439 changes: 439 additions & 0 deletions images_description/api-28-gcloud-v1.4.0.md

Large diffs are not rendered by default.

401 changes: 401 additions & 0 deletions images_description/api-28-v1.4.0.md

Large diffs are not rendered by default.

439 changes: 439 additions & 0 deletions images_description/api-29-gcloud-v1.4.0.md

Large diffs are not rendered by default.

401 changes: 401 additions & 0 deletions images_description/api-29-v1.4.0.md

Large diffs are not rendered by default.

439 changes: 439 additions & 0 deletions images_description/api-30-gcloud-v1.4.0.md

Large diffs are not rendered by default.

401 changes: 401 additions & 0 deletions images_description/api-30-v1.4.0.md

Large diffs are not rendered by default.

27 changes: 16 additions & 11 deletions tests/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

# Exit immediately if a command returns a non-zero status.
set -e
Expand All @@ -18,11 +18,6 @@ usage() {
exit 1
}

setup_bundler() {
ruby -v
gem install bundler:2.1.4
}

while true; do
case "$1" in
--android-ndk ) android_ndk=true; shift ;;
Expand Down Expand Up @@ -69,18 +64,28 @@ export MIN_SDK_VERSION=21
export TARGET_SDK_VERSION="$android_api"
export NDK_VERSION="21.0.6113669"

exec_test() {
cd "$1"

bundle install
bundle exec fastlane android build
}

ruby -v
gem install bundler:2.1.4
eval "$(jenv init -)"

if [ "$android_ndk" = true ]; then
echo "Running tests with ndk"
cd "$script_path"/test-app-ndk
exec_test "$script_path"/test-app-ndk
else
echo "Running tests"
cd "$script_path"/test-app
exec_test "$script_path"/test-app
fi

setup_bundler
bundle install
bundle exec fastlane android build
jenv global 1.8
exec_test "$script_path"/test-app-jdk-8
jenv global 11

if [ "$large_test" = true ]; then
echo "Run android tests on Firebase Test Lab"
Expand Down
9 changes: 9 additions & 0 deletions tests/test-app-jdk-8/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.iml
.gradle
/local.properties
/.idea/**
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
1 change: 1 addition & 0 deletions tests/test-app-jdk-8/.ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.7.0
6 changes: 6 additions & 0 deletions tests/test-app-jdk-8/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source "https://rubygems.org"
ruby "2.7.0"
gem "fastlane"

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
191 changes: 191 additions & 0 deletions tests/test-app-jdk-8/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
atomos (0.1.3)
aws-eventstream (1.1.0)
aws-partitions (1.337.0)
aws-sdk-core (3.102.1)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.35.0)
aws-sdk-core (~> 3, >= 3.99.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.72.0)
aws-sdk-core (~> 3, >= 3.102.1)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.1)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.3)
badge (0.12.0)
curb (~> 0.9)
fastimage (>= 1.6)
fastlane (>= 2.0)
mini_magick (>= 4.9.4, < 5.0.0)
claide (1.0.3)
colored (1.2)
colored2 (3.1.2)
commander-fastlane (4.4.6)
highline (~> 1.7.2)
curb (0.9.10)
declarative (0.0.20)
declarative-option (0.1.0)
digest-crc (0.5.1)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.5)
emoji_regex (1.0.1)
excon (0.75.0)
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
http-cookie (~> 1.0.0)
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.1.7)
fastlane (2.149.1)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.2, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander-fastlane (>= 4.4.6, < 5.0.0)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 2.0)
excon (>= 0.71.0, < 1.0.0)
faraday (>= 0.17, < 2.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (>= 0.13.1, < 2.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-api-client (>= 0.37.0, < 0.39.0)
google-cloud-storage (>= 1.15.0, < 2.0.0)
highline (>= 1.7.2, < 2.0.0)
json (< 3.0.0)
jwt (~> 2.1.0)
mini_magick (>= 4.9.4, < 5.0.0)
multi_xml (~> 0.5)
multipart-post (~> 2.0.0)
plist (>= 3.1.0, < 4.0.0)
public_suffix (~> 2.0.0)
rubyzip (>= 1.3.0, < 2.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
slack-notifier (>= 2.0.0, < 3.0.0)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-badge (1.4.0)
badge (~> 0.12.0)
gh_inspector (1.1.3)
google-api-client (0.38.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.9)
httpclient (>= 2.8.1, < 3.0)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.12)
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.3.2)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.0.1)
google-cloud-storage (1.26.2)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-api-client (~> 0.33)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.13.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.14)
highline (1.7.10)
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.4.0)
json (2.3.1)
jwt (2.1.0)
memoist (0.16.2)
mini_magick (4.10.1)
mini_mime (1.0.2)
multi_json (1.14.1)
multi_xml (0.6.0)
multipart-post (2.0.0)
nanaimo (0.2.6)
naturally (2.2.0)
os (1.1.0)
plist (3.5.0)
public_suffix (2.0.5)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rouge (2.0.7)
rubyzip (1.3.0)
security (0.1.3)
signet (0.14.0)
addressable (~> 2.3)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.8)
CFPropertyList
naturally
slack-notifier (2.3.2)
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
tty-cursor (0.7.1)
tty-screen (0.8.0)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
word_wrap (1.0.0)
xcodeproj (1.17.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.6)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.0)
xcpretty (~> 0.2, >= 0.0.7)

PLATFORMS
ruby

DEPENDENCIES
fastlane
fastlane-plugin-badge

RUBY VERSION
ruby 2.7.0p0

BUNDLED WITH
2.1.4
1 change: 1 addition & 0 deletions tests/test-app-jdk-8/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
Loading

0 comments on commit 3004476

Please sign in to comment.