Skip to content

Commit

Permalink
[no-jira]: automatize regression build (#1397)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkariang committed Nov 1, 2021
1 parent e26eaa2 commit 5f0df2e
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 1 deletion.
63 changes: 63 additions & 0 deletions .circleci/config.yml
Expand Up @@ -122,6 +122,20 @@ jobs:
name: push to release branch
command: make release

create_regression:
<<: *base_job
steps:
- checkout
- restore_cache:
keys:
- v5-android-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- v5-android-
- attach_workspace:
at: ~/project
- run:
name: push to regression branch
command: make regression

internal:
<<: *base_job
steps:
Expand Down Expand Up @@ -150,6 +164,34 @@ jobs:
name: Deploy Internal to Crashlytics and S3
command: bundle exec fastlane internal

regression:
<<: *base_job
steps:
- checkout
- restore_cache:
keys:
- v5-android-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- v5-android-
- restore_cache:
keys:
- v1-bundler-{{ checksum "Gemfile.lock" }}
- v1-bundler-
- run:
name: Bundle install
command: bundle check || bundle install --path vendor/bundle
- save_cache:
key: v1-bundler-{{ checksum "Gemfile.lock" }}
paths:
- ./vendor/bundle
- attach_workspace:
at: ~/project
- run:
name: Install Firebase CLI
command: curl -sL https://firebase.tools | bash
- run:
name: Deploy Internal to Crashlytics and S3
command: bundle exec fastlane internal

release:
<<: *base_job
steps:
Expand Down Expand Up @@ -203,13 +245,34 @@ workflows:
filters:
branches:
only: /release-.*/
- create_regression:
requires:
- build
- test
filters:
branches:
only: /regression-.*/
- internal:
requires:
- build
- test
filters:
branches:
only: internal

regression:
jobs:
- build:
filters:
branches:
only: regression
- regression:
requires:
- build
filters:
branches:
only: regression

release:
jobs:
- build:
Expand Down
12 changes: 12 additions & 0 deletions Makefile
Expand Up @@ -64,6 +64,18 @@ sync_private_to_oss:

@echo "private and oss remotes are now synced!"

regression:
@echo "Adding remotes..."
@git remote add private https://github.com/kickstarter/android-private

@echo "Deploying private/internal"

@git branch -f regression
@git push -f private regression
@git branch -d regression

@echo "Deploy has been kicked off to CircleCI!"

internal:
@echo "Adding remotes..."
@git remote add private https://github.com/kickstarter/android-private
Expand Down
3 changes: 2 additions & 1 deletion fastlane/Fastfile
Expand Up @@ -69,14 +69,15 @@ lane :internal do
Milkrun::S3Package.new(version_code: version_code, file_path: path_to_apk).upload

changelog = Milkrun::Changelog.new(audience: audience, build_type: build_type, version_code: version_code)
branch_name = git_branch
commit_message = last_git_commit[:message]
changelog.instance_variable_set(:@changelog, commit_message)
changelog.publish

firebase_app_distribution(
app: Milkrun::FirebaseCredentialsExtractor.new.internal_release,
groups: "android-testers, dev",
release_notes: commit_message
release_notes: "BRANCH:" + branch_name + "\n COMMIT:" + commit_message
)

slack(
Expand Down

0 comments on commit 5f0df2e

Please sign in to comment.