Skip to content

Commit

Permalink
add ci registry feature flag setup (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Guardiola31337 authored Dec 2, 2020
1 parent 5426a53 commit a48e829
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 34 deletions.
79 changes: 46 additions & 33 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ workflows:
# branches:
# only:
# - master
# - release:
# filters:
# tags:
# only: /^v.*/
# branches:
# ignore: /.*/
- release:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
# - mobile-metrics-dry-run:
# type: approval
# - mobile-metrics-benchmarks:
Expand Down Expand Up @@ -129,6 +129,17 @@ commands:
command: |
./gradlew << parameters.module_target >>:assembleAndroidTest
assemble:
parameters:
variant:
description: debug or release
type: string
steps:
- run:
name: Assemble Navigation SDK (<< parameters.variant >>)
command: |
make assemble-<< parameters.variant >> -f carbon.mk
login-google-cloud-platform:
steps:
- run:
Expand Down Expand Up @@ -234,15 +245,11 @@ commands:
--timeout 5m
publish-artifacts:
parameters:
artifact-type:
description: core or ui
type: string
steps:
- deploy:
name: Upload Navigation SDK to SDK Registry
command: |
make << parameters.artifact-type >>-upload-to-sdk-registry
make upload-to-sdk-registry -f carbon.mk
check-public-documentation:
steps:
Expand All @@ -254,7 +261,7 @@ commands:
steps:
- run:
name: Generate documentation
command: make javadoc-dokka
command: make javadoc-dokka -f carbon.mk

trigger-mobile-metrics:
steps:
Expand All @@ -271,19 +278,17 @@ jobs:
- image: << pipeline.parameters.docker-image-tag >>
steps:
- checkout
- run:
name: Assemble Navigation SDK (debug)
command: make assemble-debug -f carbon.mk
- assemble:
variant: "debug"

assemble-release:
working_directory: ~/code
docker:
- image: << pipeline.parameters.docker-image-tag >>
steps:
- checkout
- run:
name: Assemble Navigation SDK (release)
command: make assemble-release -f carbon.mk
- assemble:
variant: "release"

unit-tests:
working_directory: ~/code
Expand All @@ -296,11 +301,25 @@ jobs:
command: |
make unit-tests-jacoco -f carbon.mk
- store-results:
module_target: "libnavui-maps"
module_target: "libnavui-maps"
- store-results:
module_target: "libnavui-base"
- store-results:
module_target: "libnavui-util"
- store-results:
module_target: "libnavigation-router"
- store-results:
module_target: "libnavigation-base"
- store-results:
module_target: "libnavigation-core"
- store-results:
module_target: "libnavigation-metrics"
- store-results:
module_target: "libnavigation-util"
- store-results:
module_target: "libnavigator"
- store-results:
module_target: "libtrip-notification"
- codecov

static-analysis:
Expand All @@ -313,7 +332,7 @@ jobs:
- verify-codebase
# - check-api-core
# - check-api-ui
# - check-public-documentation
- check-public-documentation

changelog-verification:
working_directory: ~/code
Expand Down Expand Up @@ -380,15 +399,12 @@ jobs:
steps:
- checkout
- generate-version-name
- assemble-core-release
- assemble-ui-release
- assemble:
variant: "release"
- check-public-documentation
- generate-documentation
- publish-artifacts:
artifact-type: "core"
- publish-artifacts:
artifact-type: "ui"
- trigger-mobile-metrics
- publish-artifacts
# - trigger-mobile-metrics

release:
working_directory: ~/code
Expand All @@ -397,11 +413,8 @@ jobs:
steps:
- checkout
- generate-version-name
- assemble-core-release
- assemble-ui-release
- assemble:
variant: "release"
- check-public-documentation
- generate-documentation
- publish-artifacts:
artifact-type: "core"
- publish-artifacts:
artifact-type: "ui"
- publish-artifacts
3 changes: 2 additions & 1 deletion gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ sdkNameMap["libnavigation-util"] = "mobile-navigation-utils"
sdkNameMap["libnavigation-ui"] = "mobile-navigation-ui"
sdkNameMap["libnavui-base"] = "mobile-navigation-ui-base"
sdkNameMap["libnavui-maps"] = "mobile-navigation-ui-maps"
sdkNameMap["libnavui-util"] = "mobile-navigation-ui-util"
sdkNameMap["libnavui-util"] = "mobile-navigation-ui-utils"

registry {
sdkName = sdkNameMap[project.name]
Expand All @@ -69,6 +69,7 @@ registry {
dryRun = false
publish = true
publications = ["release"]
featureFlag = "navigation_sdks_private_beta"
}

task androidSourcesJar(type: Jar) {
Expand Down

0 comments on commit a48e829

Please sign in to comment.