Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .buildkite/commands/connected-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -euo pipefail

echo "--- :closed_lock_with_key: Installing Secrets"
./gradlew applyConfiguration

echo -e "\n--- :gcloud: Logging into Google Cloud"
gcloud auth activate-service-account --key-file .configure-files/firebase.secrets.json

echo -e "\n--- :hammer_and_wrench: Building Tests"
./gradlew --stacktrace app:assembleDebug app:assembleDebugAndroidTest

echo -e "\n--- :firebase: Run Tests"
gcloud firebase test android run \
--project api-project-108380595987 \
--type instrumentation \
--app app/build/outputs/apk/debug/app-debug.apk \
--test app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
--device model=Nexus5X,version=26,locale=en,orientation=portrait \
--verbosity info
9 changes: 9 additions & 0 deletions .buildkite/commands/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -euo pipefail

echo "--- ktlint"
./gradlew --stacktrace ktlint

echo -e "\n--- lintRelease"
./gradlew --stacktrace lintRelease
File renamed without changes.
7 changes: 7 additions & 0 deletions .buildkite/commands/unit-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -euo pipefail

echo "--- Unit Test"
./gradlew --stacktrace aztec:testRelease

76 changes: 42 additions & 34 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,71 @@
common-params:
&publish-android-artifacts-docker-container
docker#v3.8.0:
image: "public.ecr.aws/automattic/android-build-image:v1.2.0"
propagate-environment: true
environment:
# DO NOT MANUALLY SET THESE VALUES!
# They are passed from the Buildkite agent to the Docker container
- "AWS_ACCESS_KEY"
- "AWS_SECRET_KEY"
# Run everything on the `android` queue
agents:
queue: android

# Nodes with values to reuse in the pipeline.
common_params:
# Common plugin settings to use with the `plugins` key.
- &common_plugins
- automattic/bash-cache#2.6.0

steps:
- label: "Lint"
key: "lint"
command: .buildkite/commands/lint.sh
plugins: *common_plugins
artifact_paths:
- "aztec/build/reports/*"

- label: "Unit Tests"
key: "test"
command: .buildkite/commands/unit-test.sh
plugins: *common_plugins
artifact_paths:
- "aztec/build/test-results/**/*.xml"

- label: "Connected Tests"
key: "connected-test"
command: .buildkite/commands/connected-tests.sh
plugins: *common_plugins
artifact_paths:
- "aztec/build/test-results/**/*.xml"

- label: "Publish :aztec"
key: "publish-aztec"
plugins:
- *publish-android-artifacts-docker-container
command: |
.buildkite/publish-aztec.sh
command: .buildkite/commands/publish-aztec.sh
plugins: *common_plugins

- label: "Publish :glide-loader"
key: "publish-glide-loader"
depends_on:
- "publish-aztec"
plugins:
- *publish-android-artifacts-docker-container
command: |
.buildkite/publish-glide-loader.sh
command: .buildkite/commands/publish-glide-loader.sh
plugins: *common_plugins

- label: "Publish :picasso-loader"
key: "publish-picasso-loader"
depends_on:
- "publish-aztec"
plugins:
- *publish-android-artifacts-docker-container
command: |
.buildkite/publish-picasso-loader.sh
command: .buildkite/commands/publish-picasso-loader.sh
plugins: *common_plugins

- label: "Publish :wordpress-shortcodes"
key: "publish-wordpress-shortcodes"
depends_on:
- "publish-aztec"
plugins:
- *publish-android-artifacts-docker-container
command: |
.buildkite/publish-wordpress-shortcodes.sh
command: .buildkite/commands/publish-wordpress-shortcodes.sh
plugins: *common_plugins

- label: "Publish :wordpress-comments"
key: "publish-wordpress-comments"
depends_on:
- "publish-aztec"
plugins:
- *publish-android-artifacts-docker-container
command: |
.buildkite/publish-wordpress-comments.sh
command: .buildkite/commands/publish-wordpress-comments.sh
plugins: *common_plugins

- label: "Publish :media-placeholders"
key: "publish-media-placeholders"
depends_on:
- "publish-aztec"
plugins:
- *publish-android-artifacts-docker-container
command: |
.buildkite/publish-media-placeholders.sh
command: .buildkite/commands/publish-media-placeholders.sh
plugins: *common_plugins
Binary file removed .circleci/.firebase.secrets.json.enc
Binary file not shown.
70 changes: 0 additions & 70 deletions .circleci/config.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"project_name": "aztec-android",
"branch": "trunk",
"pinned_hash": "f1a61c572902401898e7e1c060b86d9da7baf8fa",
"files_to_copy": [
{
"file": "android/WPAndroid/firebase.secrets.json",
"destination": ".configure-files/firebase.secrets.json"
}
]
}
Binary file added .configure-files/firebase.secrets.json.enc
Binary file not shown.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,16 @@ annotations/

# Kotlin lint
ktlint

# Dependencies
vendor

# Currently, the configure tool stores the encrypted files under
# .configure-files. Everything in that folder without a .enc extension should
# be ignored.
.configure-files/*
!.configure-files/*.enc

# Secrets files that should never be committed, regardless of location
firebase.secrets.json

11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
buildscript {
repositories {
maven { url "https://a8c-libs.s3.amazonaws.com/android" }
}
dependencies {
classpath 'com.automattic.android:configure:0.6.3'
}
}

plugins {
id "com.android.application" apply false
id "org.jetbrains.kotlin.android" apply false
Expand All @@ -18,6 +27,8 @@ allprojects {
}
}

apply plugin: 'com.automattic.android.configure'

task clean(type: Delete) {
delete rootProject.buildDir
}
Expand Down