Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android: Integração Contínua & Entrega Contínua

Android: Integração Contínua & Entrega Contínua

Apresentado na Trilha Android do TDC Florianópolis 2018

Rafael Toledo

April 20, 2018
Tweet

More Decks by Rafael Toledo

Other Decks in Programming

Transcript

  1. Rafael Toledo Consultor na ThoughtWorks Especialista em Android Mobile desde

    2012 rafaeltoledo.net twitter.com/_rafaeltoledo github.com/rafaeltoledo medium.com/@rafael_toledo
  2. Por que eu preciso disso? • Integração de código •

    Todo mundo na mesma página • Execução de testes e validação contínua • Cobertura de código e outras métricas • Releases frequentes 3
  3. Git Flow • Forks ou Branches? • Short lived branches

    / Long lived branches • Pull Requests / Merge Requests • Code Review 4
  4. 5

  5. 7 Code Review O que devo procurar em um code

    review? https://bit.ly/2JabM5R
  6. Cloud - CircleCI • Cota gratuita para repositórios privados •

    Github ou Bitbucket • Facilidade de configuração • Suporte a Docker 14
  7. .circleci/config.yml version: 2 jobs: build: working_directory: ~/my-project docker: - image:

    circleci/android:api-27-alpha environment: JVM_OPTS: -Xmx3072m CIRCLE_JDK_VERSION: oraclejdk8 ... 15
  8. .circleci/config.yml ... steps: - checkout - run: name: Accept licenses

    command: yes | sdkmanager --licenses || true - run: name: Build release APK Command: ./gradlew assembleRelease 16
  9. # app/build.gradle android { ... signingConfigs { storeFile file(System.env.RELEASE_STORE_FILE) storePassword

    System.env.RELEASE_STORE_PASSWORD keyAlias System.env.RELEASE_KEY_ALIAS keyPassword System.env.RELEASE_KEY_PASSWORD } }
  10. ... - run: name: Run Tests on Firebase Test Lab

    command: | echo "${FIREBASE_TOKEN}" >> "secret.json" curl -0 https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.zip unzip -qq google-cloud-sdk.zip ./google-cloud-sdk/bin/gcloud config set project my-project ./google-cloud-sdk/bin/gcloud auth activate-service-account --key-file secret.json