Skip to content

Commit

Permalink
1514: pass platform parameter for platform specific deliveries
Browse files Browse the repository at this point in the history
  • Loading branch information
f1sh1918 committed Jun 27, 2024
1 parent 4357b90 commit edb9796
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 119 deletions.
73 changes: 14 additions & 59 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ commands:
steps:
- setup_npm_global
- run:
command: npm install --unsafe-perm -g https://github.com/digitalfabrik/app-toolbelt/archive/refs/heads/main.tar.gz
command: npm install --unsafe-perm -g https://github.com/digitalfabrik/app-toolbelt/archive/refs/heads/bump-up-add-platform-option.tar.gz
name: Install app-toolbelt
install_dart_linux:
steps:
Expand Down Expand Up @@ -489,6 +489,14 @@ jobs:
docker:
- image: cimg/node:20.13.1
parameters:
platform:
default: all
description: Set a platform for the git tag
enum:
- all
- web
- native
type: enum
prepare_delivery:
default: false
description: Whether to prepare for a delivery. If true, the version bump is committed.
Expand All @@ -508,7 +516,7 @@ jobs:
condition: << parameters.prepare_delivery >>
steps:
- run:
command: app-toolbelt v0 release bump-to ${NEW_VERSION_NAME} ${NEW_VERSION_CODE} --deliverino-private-key ${DELIVERINO_PRIVATE_KEY} --owner ${CIRCLE_PROJECT_USERNAME} --repo ${CIRCLE_PROJECT_REPONAME} --branch ${CIRCLE_BRANCH}
command: app-toolbelt v0 release bump-to ${NEW_VERSION_NAME} ${NEW_VERSION_CODE} --deliverino-private-key ${DELIVERINO_PRIVATE_KEY} --owner ${CIRCLE_PROJECT_USERNAME} --repo ${CIRCLE_PROJECT_REPONAME} --branch ${CIRCLE_BRANCH} --platform << parameters.platform >>
name: Bump git version
- when:
condition:
Expand Down Expand Up @@ -1299,70 +1307,15 @@ workflows:
- bump_version:
context:
- deliverino
platform: web
prepare_delivery: true
- check_administration
- build_administration:
requires:
- check_administration
- bump_version
- pack_administration:
requires:
- build_administration
- build_martin
- check_backend
- build_backend:
requires:
- check_backend
- pack_backend:
requires:
- build_backend
- bump_version
- check_health_backend:
requires:
- pack_backend
- pack_martin:
requires:
- build_martin
- bump_version
- pack_meta:
requires:
- bump_version
- upload_packages_to_server:
bundle: administration
context:
- credentials-ehrenamtskarte
name: upload_administration_packages_to_server_staging
production: false
requires:
- pack_administration
- check_health_backend
- pack_martin
- pack_meta
- upload_packages_to_server:
bundle: backend
context:
- credentials-ehrenamtskarte
name: upload_backend_packages_to_server_staging
production: false
requires:
- pack_administration
- check_health_backend
- pack_martin
- pack_meta
- install_packages_to_server:
context:
- credentials-ehrenamtskarte
name: install_packages_to_server_staging
production: false
requires:
- upload_administration_packages_to_server_staging
- upload_backend_packages_to_server_staging
when: << pipeline.parameters.run_deliver_beta_backend_administration >>
deliver_production_backend_administration:
jobs:
- bump_version:
context:
- deliverino
platform: web
prepare_delivery: true
- check_administration
- build_administration:
Expand Down Expand Up @@ -1427,6 +1380,7 @@ workflows:
- bump_version:
context:
- deliverino
platform: native
prepare_delivery: true
- check
- check_frontend:
Expand Down Expand Up @@ -1519,6 +1473,7 @@ workflows:
- bump_version:
context:
- deliverino
platform: native
prepare_delivery: true
- check_frontend
- build_android:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/commands/install_app_toolbelt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ steps:
- setup_npm_global
- run:
name: Install app-toolbelt
command: npm install --unsafe-perm -g https://github.com/digitalfabrik/app-toolbelt/archive/refs/heads/main.tar.gz
command: npm install --unsafe-perm -g https://github.com/digitalfabrik/app-toolbelt/archive/refs/heads/bump-up-add-platform-option.tar.gz
10 changes: 9 additions & 1 deletion .circleci/src/jobs/bump_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ parameters:
description: Whether to prepare for a delivery. If true, the version bump is committed.
type: boolean
default: false
platform:
description: Set a platform for the git tag
enum:
- 'all'
- 'web'
- 'native'
default: 'all'
type: enum
docker:
- image: cimg/node:20.13.1
resource_class: small
Expand All @@ -22,7 +30,7 @@ steps:
steps:
- run:
name: Bump git version
command: app-toolbelt v0 release bump-to ${NEW_VERSION_NAME} ${NEW_VERSION_CODE} --deliverino-private-key ${DELIVERINO_PRIVATE_KEY} --owner ${CIRCLE_PROJECT_USERNAME} --repo ${CIRCLE_PROJECT_REPONAME} --branch ${CIRCLE_BRANCH}
command: app-toolbelt v0 release bump-to ${NEW_VERSION_NAME} ${NEW_VERSION_CODE} --deliverino-private-key ${DELIVERINO_PRIVATE_KEY} --owner ${CIRCLE_PROJECT_USERNAME} --repo ${CIRCLE_PROJECT_REPONAME} --branch ${CIRCLE_BRANCH} --platform << parameters.platform >>
- when:
condition:
and:
Expand Down
115 changes: 58 additions & 57 deletions .circleci/src/workflows/deliver_beta_backend_administration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,65 @@ when: << pipeline.parameters.run_deliver_beta_backend_administration >>
jobs:
- bump_version:
prepare_delivery: true
platform: web
context:
- deliverino
- check_administration
- build_administration:
requires:
- check_administration
- bump_version
- pack_administration:
requires:
- build_administration
- build_martin
- check_backend
- build_backend:
requires:
- check_backend
- pack_backend:
requires:
- build_backend
- bump_version
- check_health_backend:
requires:
- pack_backend
- pack_martin:
requires:
- build_martin
- bump_version
- pack_meta:
requires:
- bump_version
- upload_packages_to_server:
name: upload_administration_packages_to_server_staging
production: false
bundle: administration
context:
- credentials-ehrenamtskarte
requires:
- pack_administration
- check_health_backend
- pack_martin
- pack_meta
- upload_packages_to_server:
name: upload_backend_packages_to_server_staging
production: false
bundle: backend
context:
- credentials-ehrenamtskarte
requires:
- pack_administration
- check_health_backend
- pack_martin
- pack_meta
- install_packages_to_server:
name: install_packages_to_server_staging
production: false
context:
- credentials-ehrenamtskarte
requires:
- upload_administration_packages_to_server_staging
- upload_backend_packages_to_server_staging
# - check_administration
# - build_administration:
# requires:
# - check_administration
# - bump_version
# - pack_administration:
# requires:
# - build_administration
# - build_martin
# - check_backend
# - build_backend:
# requires:
# - check_backend
# - pack_backend:
# requires:
# - build_backend
# - bump_version
# - check_health_backend:
# requires:
# - pack_backend
# - pack_martin:
# requires:
# - build_martin
# - bump_version
# - pack_meta:
# requires:
# - bump_version
# - upload_packages_to_server:
# name: upload_administration_packages_to_server_staging
# production: false
# bundle: administration
# context:
# - credentials-ehrenamtskarte
# requires:
# - pack_administration
# - check_health_backend
# - pack_martin
# - pack_meta
# - upload_packages_to_server:
# name: upload_backend_packages_to_server_staging
# production: false
# bundle: backend
# context:
# - credentials-ehrenamtskarte
# requires:
# - pack_administration
# - check_health_backend
# - pack_martin
# - pack_meta
# - install_packages_to_server:
# name: install_packages_to_server_staging
# production: false
# context:
# - credentials-ehrenamtskarte
# requires:
# - upload_administration_packages_to_server_staging
# - upload_backend_packages_to_server_staging


Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ when: << pipeline.parameters.run_deliver_production_backend_administration >>
jobs:
- bump_version:
prepare_delivery: true
platform: web
context:
- deliverino
- check_administration
Expand Down
1 change: 1 addition & 0 deletions .circleci/src/workflows/delivery_beta_native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ when: << pipeline.parameters.run_delivery_beta_native >>
jobs:
- bump_version:
prepare_delivery: true
platform: native
context:
- deliverino
- check
Expand Down
1 change: 1 addition & 0 deletions .circleci/src/workflows/delivery_production_native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ when: << pipeline.parameters.run_delivery_production_native >>
jobs:
- bump_version:
prepare_delivery: true
platform: native
context:
- deliverino
- check_frontend
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"versionName":"2024.6.1","versionCode":170}
{"versionName":"2024.6.2","versionCode":171}

0 comments on commit edb9796

Please sign in to comment.