From f8d210fd804432db36d35a031ebae3df8f77de40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schu=CC=88ller?= Date: Sun, 12 Jul 2020 14:10:12 +0200 Subject: [PATCH 1/4] fastlane --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c410a0e..04c0205 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -57,7 +57,7 @@ ensureContainer: buildDebug: extends: .build_job script: - - bundle exec fastlane buildDebug + - /usr/local/bin/bundle exec fastlane buildDebug #buildCreateReleaseNotes: # extends: .build_job From 229872778880c33290a345b965ba7c3e3c3b4469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schu=CC=88ller?= Date: Sun, 12 Jul 2020 14:18:47 +0200 Subject: [PATCH 2/4] fastlane --- .gitlab-ci.yml | 69 +++++++++++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 29 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 04c0205..dad5074 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,5 @@ +image: vratislav/gitlab-ci-fastlane-android + stages: - environment - build @@ -8,35 +10,44 @@ stages: - production - stop -.updateContainerJob: - image: docker:stable - stage: environment - services: - - docker:dind - script: - - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG || true - - docker build --cache-from $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG . - - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG +before_script: + - export GRADLE_USER_HOME=$(pwd)/.gradle + - chmod +x ./gradlew -updateContainer: - extends: .updateContainerJob - only: - changes: - - Dockerfile - -ensureContainer: - extends: .updateContainerJob - allow_failure: true - before_script: - - "mkdir -p ~/.docker && echo '{\"experimental\": \"enabled\"}' > ~/.docker/config.json" - - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - # Skip update container `script` if the container already exists - # via https://gitlab.com/gitlab-org/gitlab-ce/issues/26866#note_97609397 -> https://stackoverflow.com/a/52077071/796832 - - docker manifest inspect $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG > /dev/null && exit || true +cache: + key: ${CI_PROJECT_ID} + paths: + - .gradle/ +# +#.updateContainerJob: +# image: docker:stable +# stage: environment +# services: +# - docker:dind +# script: +# - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY +# - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG || true +# - docker build --cache-from $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG . +# - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG +# +#updateContainer: +# extends: .updateContainerJob +# only: +# changes: +# - Dockerfile +# +#ensureContainer: +# extends: .updateContainerJob +# allow_failure: true +# before_script: +# - "mkdir -p ~/.docker && echo '{\"experimental\": \"enabled\"}' > ~/.docker/config.json" +# - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY +# # Skip update container `script` if the container already exists +# # via https://gitlab.com/gitlab-org/gitlab-ce/issues/26866#note_97609397 -> https://stackoverflow.com/a/52077071/796832 +# - docker manifest inspect $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG > /dev/null && exit || true .build_job: - image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG +# image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG stage: build before_script: # We store this binary file in a variable as hex with this command, `xxd -p thorium-android-app.jks` @@ -74,7 +85,7 @@ buildRelease: name: production testDebug: - image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG +# image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG stage: test dependencies: - buildDebug @@ -82,7 +93,7 @@ testDebug: - bundle exec fastlane test publishInternal: - image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG +# image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG stage: internal dependencies: - buildRelease @@ -95,7 +106,7 @@ publishInternal: - bundle exec fastlane internal .promote_job: - image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG +# image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG when: manual dependencies: [] before_script: From 27d254e6797eacb7dd9e636a9cad39d1c3fff093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schu=CC=88ller?= Date: Sun, 12 Jul 2020 14:22:01 +0200 Subject: [PATCH 3/4] fastlane --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dad5074..35bfb93 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,6 +14,7 @@ before_script: - export GRADLE_USER_HOME=$(pwd)/.gradle - chmod +x ./gradlew + cache: key: ${CI_PROJECT_ID} paths: From 66d6088afc6aaa176ae764c7827f869b0b8413b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schu=CC=88ller?= Date: Sun, 12 Jul 2020 14:23:37 +0200 Subject: [PATCH 4/4] fastlane --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35bfb93..e51ca36 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,3 @@ -image: vratislav/gitlab-ci-fastlane-android stages: - environment @@ -67,9 +66,10 @@ cache: - app/build/outputs buildDebug: + image: vratislav/gitlab-ci-fastlane-android extends: .build_job script: - - /usr/local/bin/bundle exec fastlane buildDebug + - bundle exec fastlane buildDebug #buildCreateReleaseNotes: # extends: .build_job