Skip to content

Commit

Permalink
Merge pull request #92 from faberNovel/release/v1.3.0
Browse files Browse the repository at this point in the history
Prepare release v1.3.0
  • Loading branch information
vincentbrison authored Aug 21, 2020
2 parents b82188c + 69fe71c commit d6e6cab
Show file tree
Hide file tree
Showing 19 changed files with 2,222 additions and 34 deletions.
11 changes: 11 additions & 0 deletions .ci/extract_github_action_matrix_as.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
script_path="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"

json="$(cat ${script_path}/images_matrix.json)"

# Github Action ::set-output requires newlines to be escaped
json="${json//'%'/'%25'}"
json="${json//$'\n'/'%0A'}"
json="${json//$'\r'/'%0D'}"

echo "::set-output name=$1::$json"
5 changes: 5 additions & 0 deletions .ci/images_matrix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"android_api": [ 28, 29, 30],
"android_ndk": ["--android_ndk", ""],
"gcloud": ["--gcloud", ""]
}
20 changes: 14 additions & 6 deletions .github/workflows/cd_prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ on:
branches:
- 'release/**'
jobs:
generate_matrix:
runs-on: ubuntu-18.04
container:
image: docker://alpine/git:v2.24.3
outputs:
matrix: ${{ steps.read.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v2
- id: read
run: .ci/extract_github_action_matrix_as.sh matrix
job_compute_release_name:
runs-on: ubuntu-18.04
container:
Expand All @@ -20,16 +31,13 @@ jobs:
echo "::set-output name=release_name::$release_name"
job_build_test_and_generate_desc:
needs: job_compute_release_name
needs: [job_compute_release_name, generate_matrix]
runs-on: ubuntu-18.04
container:
image: docker://docker:stable-git
options: --name=runner
strategy:
matrix:
android_api: [28, 29]
android_ndk: ["--android-ndk", ""]
gcloud: ["--gcloud", ""]
matrix: ${{fromJson(needs.generate_matrix.outputs.matrix)}}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -75,5 +83,5 @@ jobs:
uses: repo-sync/pull-request@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
destination_branch: "master"
destination_branch: "main"
pr_title: "Prepare release ${{ needs.job_compute_release_name.outputs.release_name }}"
19 changes: 13 additions & 6 deletions .github/workflows/cd_publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ on:
release:
types: [published]
jobs:
generate_matrix:
runs-on: ubuntu-18.04
container:
image: docker://alpine/git:v2.24.3
outputs:
matrix: ${{ steps.read.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v2
- id: read
run: .ci/extract_github_action_matrix_as.sh matrix
job_compute_release_name:
runs-on: ubuntu-18.04
container:
Expand All @@ -17,18 +28,14 @@ jobs:
release_name=${GIT_REF#refs/tags/}
echo "Release name=$release_name"
echo "::set-output name=release_name::$release_name"
job_publish_release:
needs: [job_compute_release_name]
needs: [job_compute_release_name, generate_matrix]
runs-on: ubuntu-18.04
container:
image: docker://docker:stable-git
options: --name=runner
strategy:
matrix:
android_api: [28, 29]
android_ndk: ["--android-ndk",""]
gcloud: ["--gcloud", ""]
matrix: ${{fromJson(needs.generate_matrix.outputs.matrix)}}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/cd_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,25 @@ on:
branches:
- develop
jobs:
generate_matrix:
runs-on: ubuntu-18.04
container:
image: docker://alpine/git:v2.24.3
outputs:
matrix: ${{ steps.read.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v2
- id: read
run: .ci/extract_github_action_matrix_as.sh matrix
build_and_test:
needs: [generate_matrix]
runs-on: ubuntu-18.04
container:
image: docker://docker:stable-git
options: --name=runner
strategy:
matrix:
android_api: [28, 29]
android_ndk: ["--android-ndk",""]
gcloud: ["--gcloud", ""]
matrix: ${{fromJson(needs.generate_matrix.outputs.matrix)}}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,28 @@ on:
push:
branches-ignore:
- develop
- master
- main
- 'release/**'
jobs:
generate_matrix:
runs-on: ubuntu-18.04
container:
image: docker://alpine/git:v2.24.3
outputs:
matrix: ${{ steps.read.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v2
- id: read
run: .ci/extract_github_action_matrix_as.sh matrix
build_and_test:
needs: generate_matrix
runs-on: ubuntu-18.04
container:
image: docker://docker:stable-git
options: --name=runner
strategy:
matrix:
android_api: [28, 29]
android_ndk: ["--android-ndk",""]
gcloud: ["--gcloud", ""]
matrix: ${{fromJson(needs.generate_matrix.outputs.matrix)}}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches-ignore:
- develop
- master
- main
- 'release/**'
jobs:
build_and_test:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
options: --name=runner
strategy:
matrix:
android_api: [28,29]
android_api: [29,30]
android_ndk: ["--android-ndk"]
steps:
- name: Checkout
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## [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)

**Implemented enhancements:**

- Add available Ruby versions to images description files [\#87](https://github.com/faberNovel/docker-android/issues/87)
- Add support for Android SDK 30 [\#86](https://github.com/faberNovel/docker-android/issues/86)
- Add support for ruby versions in normal maintenance [\#84](https://github.com/faberNovel/docker-android/issues/84)
- Move scripts back to bash and clean syntax [\#70](https://github.com/faberNovel/docker-android/issues/70)
- Add support for Android 30 [\#88](https://github.com/faberNovel/docker-android/pull/88) ([sjcqs](https://github.com/sjcqs))

**Closed issues:**

- Rename master to main [\#90](https://github.com/faberNovel/docker-android/issues/90)

**Merged pull requests:**

- 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))

## [v1.2.0](https://github.com/faberNovel/docker-android/tree/v1.2.0) (2020-07-30)

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

**Merged pull requests:**

- Prepare release v1.2.0 [\#83](https://github.com/faberNovel/docker-android/pull/83) ([github-actions[bot]](https://github.com/apps/github-actions))
- Feature/improve action testing [\#82](https://github.com/faberNovel/docker-android/pull/82) ([vincentbrison](https://github.com/vincentbrison))
- Install libcurl [\#77](https://github.com/faberNovel/docker-android/pull/77) ([sjcqs](https://github.com/sjcqs))
- Fix workflows Android NDK parameter [\#75](https://github.com/faberNovel/docker-android/pull/75) ([sjcqs](https://github.com/sjcqs))
Expand Down
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ ENV PATH "$PATH:$RBENV_ROOT/shims"
RUN mkdir -p "$RBENV_ROOT"/plugins
RUN git clone https://github.com/rbenv/ruby-build.git "$RBENV_ROOT"/plugins/ruby-build

# Install default ruby env
# Install ruby envs
RUN echo “install: --no-document” > ~/.gemrc
ENV RUBY_CONFIGURE_OPTS=--disable-install-doc
RUN rbenv install 2.7.0
RUN rbenv global 2.7.0
RUN rbenv install 2.7.1
RUN rbenv install 2.6.6

# Setup default ruby env
RUN rbenv global 2.7.1
RUN gem install bundler:2.1.4

# Install Google Cloud CLI
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Docker allows you to provide a replicable environment, which does not change wit
It should work out of the box on any CI/CD service providing docker support.
The image is providing standard tools to build and test Android application:
* Android SDK (optionally Android NDK)
* Default Ruby env through [rbenv](https://github.com/rbenv/rbenv) (for [Fastlane](https://fastlane.tools/) for instance)
* [Fastlane first class support](https://github.com/faberNovel/docker-android#fastlane-first-class-support)
* Java JDK
* Google Cloud CLI, to support [Firebase Test Lab](https://firebase.google.com/docs/test-lab)

Expand All @@ -25,6 +25,7 @@ The image is providing standard tools to build and test Android application:

## Fastlane first-class support
Images are built to have first class support for Fastlane.
Ruby versions in [`normal maintenance`](https://www.ruby-lang.org/en/downloads/branches/) mode are installed using [rbenv](https://github.com/rbenv/rbenv).
If you are using a Fastlane plugin which requires a native library:
- Install it using `apt-get update && apt-get -y install <lib>` in your
CI workflow.
Expand Down Expand Up @@ -114,20 +115,20 @@ We use the following tagging policy:
* `API` the Android API to use, like `api-28`, `api-29`
* `NDK` is the presence or not of the [Android NDK](https://developer.android.com/ndk) in the image
* `GCLOUD` is the presence or not of the [Google Cloud SDK](https://cloud.google.com/sdk) in the image. (the gcloud sdk is needed for Firebase Test Lab for example).
* `VERSION` is the image version. Check [Versions](https://github.com/faberNovel/docker-android/tree/master#versions)
* `VERSION` is the image version. Check [Versions](https://github.com/faberNovel/docker-android/tree/main#versions)

## 🔢 Versions
* `snapshot` versions are build on each push on `develop` branch
* Release versions `v*` on each [GitHub Release](https://github.com/faberNovel/docker-android/releases)

## 📝 Image description
Image description (software and their versions) is provided as [md files](https://github.com/faberNovel/docker-android/tree/master/images_description).
Image description (software and their versions) is provided as [md files](https://github.com/faberNovel/docker-android/tree/main/images_description).

## ✏️ Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

You can change image settings via its [Dockerfile](https://github.com/faberNovel/docker-android/blob/master/Dockerfile).
You can build, test, and deploy image using [ci_cd.sh](https://github.com/faberNovel/docker-android/blob/master/ci_cd.sh) script. You need to install docker first.
You can change image settings via its [Dockerfile](https://github.com/faberNovel/docker-android/blob/main/Dockerfile).
You can build, test, and deploy image using [ci_cd.sh](https://github.com/faberNovel/docker-android/blob/main/ci_cd.sh) script. You need to install docker first.
All scripts must be POSIX compliants.
```sh
usage: ./ci_cd.sh [--android-api 29] [--build] [--test]
Expand Down
2 changes: 1 addition & 1 deletion ci_cd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -e

# Supported android builds tools
android_build_tools="29.0.3"
android_build_tools="30.0.2"

# Usage of this script
program_name=$0
Expand Down
10 changes: 8 additions & 2 deletions desc/desc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,16 @@ if [ -n "$(which gcloud)" ]; then
fi

echo "## Ruby environment"
echo "### Default ruby version"
ruby --version | cut -d' ' -f2-
echo "### All ruby versions available"
echo "| Version |"
echo "|---------|"
rbenv versions --bare | while read -r version; do
echo "| $version |"
done
echo "### rbenv"
rbenv --version | cut -d' ' -f2-
echo "### Default ruby version"
ruby --version | cut -d' ' -f2-
echo "### Installed gems:"
echo "| Name | Version |"
echo "|------|---------|"
Expand Down
Loading

0 comments on commit d6e6cab

Please sign in to comment.