From 6ce350bd563f35105205fc2799d515c3d2dde81c Mon Sep 17 00:00:00 2001 From: Mathiew Abbas Date: Mon, 18 Jul 2022 09:11:01 -0500 Subject: [PATCH 1/4] feat: added bitrise yaml --- bitrise.yaml | 710 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 710 insertions(+) create mode 100644 bitrise.yaml diff --git a/bitrise.yaml b/bitrise.yaml new file mode 100644 index 0000000..420a2af --- /dev/null +++ b/bitrise.yaml @@ -0,0 +1,710 @@ +--- +format_version: "8" +default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git +project_type: flutter +workflows: + Changelog: + steps: + - ? git::https://github.com/nodes-android/ci-bitrise-changelog-step@feature/convcommits + : inputs: + - custom_other_name: "\U0001F4BE Other changes" + checkGitAccess: + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@4: {} + after_run: [] + + deployDevelopmentInternal: + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@6.0: {} + - script@1: + inputs: + - content: |- + #See: https://devcenter.bitrise.io/infrastructure/virtual-machines/#managing-java-versions + jenv global 11 + export JAVA_HOME="$(jenv prefix)" + envman add --key JAVA_HOME --value "$(jenv prefix)" + title: Set Java Version 11 + - fastlane-match@0.2: + inputs: + - git_branch: "$MATCH_GIT_BRANCH" + - app_id: "$BUNDLE_ID_DEVELOPMENT" + - decrypt_password: "$MATCH_DECRYPT" + - type: adhoc + - team_id: "$DEVELOPER_TEAM" + - git_url: git@github.com:nodes-projects/internal-certificates-ios.git + - flutter-installer@0: {} + - script@1: + title: Flutter Pub Get + inputs: + - content: flutter pub get + - flutter-build@0: + inputs: + - ios_additional_params: + " --debug --no-codesign -t lib/main_development.dart + --flavor development --build-number=$BITRISE_BUILD_NUMBER" + - cache_level: none + - android_output_type: appbundle + - android_additional_params: + "--release -t lib/main_development.dart --flavor + development --build-number=$BITRISE_BUILD_NUMBER" + - xcode-archive@3: + inputs: + - configuration: Release-development + - export_method: ad-hoc + - team_id: "$DEVELOPER_TEAM" + - scheme: development + - deploy-to-bitrise-io@1: {} + - script@1: + inputs: + - content: |- + #!/bin/bash + + input=${BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP} + inputs=($(echo "$input" | tr '|' '\n')) + + for i in "${inputs[@]}" + do + if [[ "$i" == *".apk"* ]]; then + androidLink=${i##*=>} + elif [[ "$i" == *".ipa"* ]]; then + iosLink=${i##*=>} + else + echo "No install page link found." + fi + done + + echo "android: $androidLink" + echo "ios: $iosLink" + + envman add --key ANDROID_INSTALL_PAGE_LINK --value "${androidLink}" + envman add --key IOS_INSTALL_PAGE_LINK --value "${iosLink}" + title: Set Install Page Links + - script@1: + title: Set Build Version + inputs: + - content: |- + #!/usr/bin/env bash + + input=`grep -w version: pubspec.yaml` + inputs=($(echo "$input" | tr 'version:' '\n')) + + version="${inputs[@]}" + + echo "BUILD_VERSION: ${version}" + + envman add --key BUILD_VERSION --value "${version}" + - script@1: + inputs: + - content: envman add --key BUILD_FLAVOUR --value "DEVELOPMENT" + title: Set Build Flavour + - script@1: + title: Cleanup + inputs: + - content: rm -r $BITRISE_DEPLOY_DIR/* + after_run: + - notifySlack + deployStagingExternal: + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@6: + inputs: + - fetch_tags: "yes" + - script@1: + title: Set Java Version 11 + inputs: + - content: |- + #See: https://devcenter.bitrise.io/infrastructure/virtual-machines/#managing-java-versions + jenv global 11 + export JAVA_HOME="$(jenv prefix)" + envman add --key JAVA_HOME --value "$(jenv prefix)" + - script@1: + inputs: + - content: envman add --key BUILD_FLAVOUR --value "STAGING" + title: Set Build Flavour + - script@1: + title: Set Build Version + inputs: + - content: |- + #!/usr/bin/env bash + + input=`grep -w version: pubspec.yaml` + inputs=($(echo "$input" | tr 'version:' '\n')) + + version="${inputs[@]}" + + echo "BUILD_VERSION: ${version}" + + envman add --key BUILD_VERSION --value "${version}" + - git-tag@1: + inputs: + - tag: "${BUILD_VERSION}-${BITRISE_BUILD_NUMBER}" + - fastlane-match@0.2: + inputs: + - git_branch: "$MATCH_GIT_BRANCH" + - app_id: "$BUNDLE_ID_STAGING" + - decrypt_password: "$MATCH_DECRYPT" + - type: adhoc + - team_id: "$DEVELOPER_TEAM" + - git_url: git@github.com:nodes-projects/internal-certificates-ios.git + - flutter-installer@0: {} + - script@1: + title: Flutter Pub Get + inputs: + - content: flutter pub get + - flutter-build@0: + inputs: + - ios_additional_params: + " --debug --no-codesign -t lib/main_staging.dart + --flavor staging --build-number=$BITRISE_BUILD_NUMBER" + - cache_level: none + - android_output_type: appbundle + - android_additional_params: + "--release -t lib/main_staging.dart --flavor + staging --build-number=$BITRISE_BUILD_NUMBER" + - set-env-var@0: + inputs: + - value: "$BUNDLE_ID_STAGING" + - destination_keys: APP_BUNDLE_ID + - xcode-archive@3: + inputs: + - configuration: Release-staging + - export_method: ad-hoc + - team_id: "$DEVELOPER_TEAM" + - scheme: staging + - deploy-to-bitrise-io@1: {} + - script@1: + inputs: + - content: |- + #!/bin/bash + + input=${BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP} + inputs=($(echo "$input" | tr '|' '\n')) + + for i in "${inputs[@]}" + do + if [[ "$i" == *".apk"* ]]; then + androidLink=${i##*=>} + elif [[ "$i" == *".ipa"* ]]; then + iosLink=${i##*=>} + else + echo "No install page link found." + fi + done + + echo "android: $androidLink" + echo "ios: $iosLink" + + envman add --key ANDROID_INSTALL_PAGE_LINK --value "${androidLink}" + envman add --key IOS_INSTALL_PAGE_LINK --value "${iosLink}" + title: Set Install Page Links + - google-play-deploy@3: + inputs: + - package_name: "$BUNDLE_ID_STAGING" + - release_name: "${BUILD_VERSION} (${BITRISE_BUILD_NUMBER})" + - service_account_json_key_path: "$BITRISEIO_GOOGLE_PLAY_SERVICE_ACCOUNT_KEY_URL" + after_run: + - deployTestflight + - Changelog + - Release + - notifySlackExternal + deployProductionExternal: + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@4: {} + - script@1: + title: Set Java Version 11 + inputs: + - content: |- + #See: https://devcenter.bitrise.io/infrastructure/virtual-machines/#managing-java-versions + jenv global 11 + export JAVA_HOME="$(jenv prefix)" + envman add --key JAVA_HOME --value "$(jenv prefix)" + - fastlane-match@0.2: + inputs: + - git_branch: "$MATCH_GIT_BRANCH" + - app_id: "$BUNDLE_ID_PRODUCTION" + - decrypt_password: "$MATCH_DECRYPT" + - type: adhoc + - team_id: "$DEVELOPER_TEAM" + - git_url: git@github.com:nodes-projects/internal-certificates-ios.git + - flutter-installer@0: {} + - script@1: + title: Flutter Pub Get + inputs: + - content: flutter pub get + - flutter-build@0: + inputs: + - ios_additional_params: + " --release --no-codesign -t lib/main_production.dart + --flavor production --build-number=$BITRISE_BUILD_NUMBER" + - cache_level: none + - android_output_type: appbundle + - android_additional_params: + "--release -t lib/main_production.dart --flavor + production --build-number=$BITRISE_BUILD_NUMBER" + - set-env-var@0: + inputs: + - value: "$BUNDLE_ID_PRODUCTION" + - destination_keys: APP_BUNDLE_ID + - xcode-archive@3: + inputs: + - configuration: Release-production + - export_method: ad-hoc + - team_id: "$DEVELOPER_TEAM" + - scheme: production + - deploy-to-bitrise-io@1: {} + - script@1: + inputs: + - content: |- + #!/bin/bash + + input=${BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP} + inputs=($(echo "$input" | tr '|' '\n')) + + for i in "${inputs[@]}" + do + if [[ "$i" == *".apk"* ]]; then + androidLink=${i##*=>} + elif [[ "$i" == *".ipa"* ]]; then + iosLink=${i##*=>} + else + echo "No install page link found." + fi + done + + echo "android: $androidLink" + echo "ios: $iosLink" + + envman add --key ANDROID_INSTALL_PAGE_LINK --value "${androidLink}" + envman add --key IOS_INSTALL_PAGE_LINK --value "${iosLink}" + title: Set Install Page Links + - script@1: + title: Set Build Version + inputs: + - content: |- + #!/usr/bin/env bash + + input=`grep -w version: pubspec.yaml` + inputs=($(echo "$input" | tr 'version:' '\n')) + + version="${inputs[@]}" + + echo "BUILD_VERSION: ${version}" + + envman add --key BUILD_VERSION --value "${version}" + - script@1: + title: Set Build Flavour + inputs: + - content: envman add --key BUILD_FLAVOUR --value "PRODUCTION" + - google-play-deploy@3: + inputs: + - package_name: "$BUNDLE_ID_PRODUCTION" + - release_name: "${BUILD_VERSION} (${BITRISE_BUILD_NUMBER})" + - service_account_json_key_path: "$BITRISEIO_GOOGLE_PLAY_SERVICE_ACCOUNT_KEY_URL" + after_run: + - deployTestflight + - notifySlack + - tag + # deployProductionInternal: + # steps: + # - activate-ssh-key@4: + # run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + # - git-clone@4: {} + # - script@1: + # title: Set Java Version 11 + # inputs: + # - content: |- + # #See: https://devcenter.bitrise.io/infrastructure/virtual-machines/#managing-java-versions + # jenv global 11 + # export JAVA_HOME="$(jenv prefix)" + # envman add --key JAVA_HOME --value "$(jenv prefix)" + # - fastlane-match@0.2: + # inputs: + # - git_branch: "$MATCH_GIT_BRANCH" + # - app_id: "$BUNDLE_ID_PRODUCTION" + # - decrypt_password: "$MATCH_DECRYPT" + # - type: adhoc + # - team_id: "$DEVELOPER_TEAM" + # - git_url: git@github.com:nodes-projects/internal-certificates-ios.git + # - flutter-installer@0: {} + # - script@1: + # title: Flutter Pub Get + # inputs: + # - content: flutter pub get + # - flutter-build@0: + # inputs: + # - ios_additional_params: + # " --release --no-codesign -t lib/main_production.dart + # --flavor production --build-number=$BITRISE_BUILD_NUMBER" + # - cache_level: none + # - android_additional_params: + # "--release -t lib/main_production.dart --flavor + # production --build-number=$BITRISE_BUILD_NUMBER" + # - xcode-archive@3: + # inputs: + # - configuration: Release-production + # - export_method: ad-hoc + # - team_id: "$DEVELOPER_TEAM" + # - scheme: production + # - deploy-to-bitrise-io@1: {} + # - script@1: + # inputs: + # - content: |- + # #!/bin/bash + + # input=${BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP} + # inputs=($(echo "$input" | tr '|' '\n')) + + # for i in "${inputs[@]}" + # do + # if [[ "$i" == *".apk"* ]]; then + # androidLink=${i##*=>} + # elif [[ "$i" == *".ipa"* ]]; then + # iosLink=${i##*=>} + # else + # echo "No install page link found." + # fi + # done + + # echo "android: $androidLink" + # echo "ios: $iosLink" + + # envman add --key ANDROID_INSTALL_PAGE_LINK --value "${androidLink}" + # envman add --key IOS_INSTALL_PAGE_LINK --value "${iosLink}" + # title: Set Install Page Links + # - script@1: + # title: Set Build Version + # inputs: + # - content: |- + # #!/usr/bin/env bash + + # input=`grep -w version: pubspec.yaml` + # inputs=($(echo "$input" | tr 'version:' '\n')) + + # version="${inputs[@]}" + + # echo "BUILD_VERSION: ${version}" + + # envman add --key BUILD_VERSION --value "${version}" + # - script@1: + # inputs: + # - content: envman add --key BUILD_FLAVOUR --value "PRODUCTION" + # title: Set Build Flavour + # after_run: + # - notifySlack + # - tag + # deployStagingInternal: + # steps: + # - activate-ssh-key@4: + # run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + # - git-clone@6.0: {} + # - script@1: + # inputs: + # - content: |- + # #See: https://devcenter.bitrise.io/infrastructure/virtual-machines/#managing-java-versions + # jenv global 11 + # export JAVA_HOME="$(jenv prefix)" + # envman add --key JAVA_HOME --value "$(jenv prefix)" + # title: Set Java Version 11 + # - script@1: + # title: Set Build Flavour + # inputs: + # - content: envman add --key BUILD_FLAVOUR --value "STAGING" + # - script@1: + # title: Set Build Version + # inputs: + # - content: |- + # #!/usr/bin/env bash + + # input=`grep -w version: pubspec.yaml` + # inputs=($(echo "$input" | tr 'version:' '\n')) + + # version="${inputs[@]}" + + # echo "BUILD_VERSION: ${version}" + + # envman add --key BUILD_VERSION --value "${version}" + # - git-tag@1: + # inputs: + # - tag: "${BUILD_VERSION}-${BITRISE_BUILD_NUMBER}" + # - fastlane-match@0.2: + # inputs: + # - git_branch: "$MATCH_GIT_BRANCH" + # - app_id: "$BUNDLE_ID_STAGING" + # - decrypt_password: "$MATCH_DECRYPT" + # - type: adhoc + # - team_id: "$DEVELOPER_TEAM" + # - git_url: git@github.com:nodes-projects/internal-certificates-ios.git + # - flutter-installer@0: {} + # - script@1: + # title: Flutter Pub Get + # inputs: + # - content: flutter pub get + # - flutter-build@0: + # inputs: + # - ios_additional_params: + # " --debug --no-codesign -t lib/main_staging.dart + # --flavor staging --build-number=$BITRISE_BUILD_NUMBER" + # - cache_level: none + # - android_output_type: appbundle + # - android_additional_params: + # "--release -t lib/main_staging.dart --flavor + # staging --build-number=$BITRISE_BUILD_NUMBER" + # - xcode-archive@3: + # inputs: + # - configuration: Release-staging + # - export_method: ad-hoc + # - team_id: "$DEVELOPER_TEAM" + # - scheme: staging + # - deploy-to-bitrise-io@1: {} + # - script@1: + # inputs: + # - content: |- + # #!/bin/bash + + # input=${BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP} + # inputs=($(echo "$input" | tr '|' '\n')) + + # for i in "${inputs[@]}" + # do + # if [[ "$i" == *".apk"* ]]; then + # androidLink=${i##*=>} + # elif [[ "$i" == *".ipa"* ]]; then + # iosLink=${i##*=>} + # else + # echo "No install page link found." + # fi + # done + + # echo "android: $androidLink" + # echo "ios: $iosLink" + + # envman add --key ANDROID_INSTALL_PAGE_LINK --value "${androidLink}" + # envman add --key IOS_INSTALL_PAGE_LINK --value "${iosLink}" + # title: Set Install Page Links + # after_run: + # - notifySlack + deployTestflight: + steps: + - fastlane-match@0.2: + inputs: + - git_branch: "$MATCH_GIT_BRANCH" + - decrypt_password: "$MATCH_DECRYPT" + - type: appstore + - team_id: "$DEVELOPER_TEAM" + - app_id: "$BUNDLE_ID_STAGING" + - options: "--readonly" + - git_url: git@github.com:nodes-projects/internal-certificates-ios.git + - export-xcarchive@3.0: + inputs: + - team_id: "$DEVELOPER_TEAM" + - verbose_log: "no" + - export_method: app-store + - deploy-to-itunesconnect-deliver@2.21: + inputs: + - skip_app_version_update: "yes" + - bundle_id: "$BUNDLE_ID_STAGING" + - connection: "off" + - team_id: "$DEVELOPER_TEAM" + - team_name: "$TEAM_NAME" + - api_issuer: "$ASC_APP_KEY_ISSUER_ID" + - api_key_path: "$BITRISEIO_ASC_APP_KEY_URL" + - pkg_path: "" + notifySlack: + steps: + - slack@3.1: + inputs: + - channel: "#p-husl-app-build" + - emoji: ":bitrise:" + - icon_url: "" + - author_name: "" + - title: "" + - message: "" + - footer: "" + - footer_icon: "" + - buttons: | + Build|${BITRISE_BUILD_URL} + Android Install Page|${ANDROID_INSTALL_PAGE_LINK} + iOS Install Page|${IOS_INSTALL_PAGE_LINK} + - fields: | + App|${BITRISE_APP_TITLE} + Version|${BUILD_VERSION} (${BITRISE_BUILD_NUMBER}) + Branch|${BITRISE_GIT_BRANCH} + Workflow|${BITRISE_TRIGGERED_WORKFLOW_ID} + - api_token: "$SLACK_TOKEN" + - pretext: "*${BUILD_FLAVOUR}* BUILD" + - webhook_url: "" + is_always_run: false + notifySlackExternal: + steps: + - slack@3.1: + inputs: + - channel: "#p-husl-app-build" + - emoji: ":bitrise:" + - icon_url: "" + - author_name: "" + - title: "" + - message: "" + - footer: "" + - footer_icon: "" + - buttons: | + Build|${BITRISE_BUILD_URL} + Changelog|https://github.com/nodes-projects/husl-flutter/releases/tag/${BUILD_VERSION}-${BITRISE_BUILD_NUMBER} + Android Install Page|${ANDROID_INSTALL_PAGE_LINK} + iOS Install Page|${IOS_INSTALL_PAGE_LINK} + - fields: | + App|${BITRISE_APP_TITLE} + Version|${BUILD_VERSION} (${BITRISE_BUILD_NUMBER}) + Branch|${BITRISE_GIT_BRANCH} + Workflow|${BITRISE_TRIGGERED_WORKFLOW_ID} + - api_token: "$SLACK_TOKEN" + - pretext: "*${BUILD_FLAVOUR}* BUILD" + - webhook_url: "" + is_always_run: false + PR-Validation: + steps: + - activate-ssh-key@4: {} + - git-clone@6: {} + - set-java-version@1: {} + - flutter-installer@0: {} + - script@1: + inputs: + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + flutter pub get + title: Pub Get + - script@1: + inputs: + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + flutter format --set-exit-if-changed lib/ + title: Format + - script@1: + title: Analyze + inputs: + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + flutter analyze + - script@1: + inputs: + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + flutter test + title: Test + - script@1: + title: Build Staging + inputs: + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + flutter build apk --release --flavor staging -t lib/main_staging.dart + Release: + steps: + - github-release@0: + inputs: + - body: "$COMMIT_CHANGELOG" + - username: "$GITHUB_USERNAME" + - api_token: "$GITHUB_PERSONAL_TOKEN" + - draft: "no" + - tag: "${BUILD_VERSION}-${BITRISE_BUILD_NUMBER}" + - name: "${BUILD_VERSION}-${BITRISE_BUILD_NUMBER}" + tag: + steps: + - git-tag@1: + inputs: + - tag: "${BUILD_VERSION}-${BITRISE_BUILD_NUMBER}" +#TODO: Change these vars according to the project +app: + envs: + - opts: + is_expand: false + BITRISE_FLUTTER_PROJECT_LOCATION: "." + - opts: + is_expand: false + BITRISE_PROJECT_PATH: ios/Runner.xcworkspace + - opts: + is_expand: false + BITRISE_SCHEME: Runner + - opts: + is_expand: false + BITRISE_EXPORT_METHOD: ad-hoc + - opts: + is_expand: false + ANDROID_INSTALL_PAGE_LINK: "" + - opts: + is_expand: false + IOS_INSTALL_PAGE_LINK: "" + - opts: + is_expand: false + BUILD_VERSION: "" + - DEVELOPER_TEAM: Y33QN5V968 + - MATCH_GIT_BRANCH: husl + - BUNDLE_ID_STAGING: eu.husl.staging + - BUNDLE_ID_PRODUCTION: eu.husl + - TEAM_NAME: SATOS B.V. + - NOTIFY_SLACK_INTERNAL_CHANNEL: "#p-husl-app-build" + - NOTIFY_SLACK_EXTERNAL_CHANNEL: "#p-husl-app-build" + - opts: + is_expand: false + BUNDLE_ID_DEVELOPMENT: eu.husl.development + - opts: + is_expand: false + BUILD_FLAVOUR: Unknown + - opts: + is_expand: false + GITHUB_PROJECT_URL: https://github.com/nodes-projects/husl-flutter + - opts: + is_expand: false + ASC_APP_KEY_ISSUER_ID: 476cde6b-6b84-480a-9f9c-afe89b1f3ec7 +trigger_map: + - push_branch: develop + workflow: deployDevelopmentInternal + - push_branch: staging + workflow: deployStagingExternal + - push_branch: production + workflow: deployProductionExternal + - pull_request_source_branch: "*" + workflow: PR-Validation +meta: + bitrise.io: + stack: osx-xcode-13.1.x From 6483330534b23fa8d1952f9c7dbc15ba84e2a050 Mon Sep 17 00:00:00 2001 From: Mathiew Abbas Date: Mon, 18 Jul 2022 09:14:07 -0500 Subject: [PATCH 2/4] fix: renamed extension --- bitrise.yaml => bitrise.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename bitrise.yaml => bitrise.yml (100%) diff --git a/bitrise.yaml b/bitrise.yml similarity index 100% rename from bitrise.yaml rename to bitrise.yml From a060c725b18c8585c81381d0c73fd83f1d9ab8cb Mon Sep 17 00:00:00 2001 From: Mathiew Abbas Date: Mon, 18 Jul 2022 10:06:23 -0500 Subject: [PATCH 3/4] feat: finalized bitrise yaml file --- bitrise.yml | 186 ++-------------------------------------------------- 1 file changed, 4 insertions(+), 182 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 420a2af..e29fa42 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -311,185 +311,6 @@ workflows: - deployTestflight - notifySlack - tag - # deployProductionInternal: - # steps: - # - activate-ssh-key@4: - # run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' - # - git-clone@4: {} - # - script@1: - # title: Set Java Version 11 - # inputs: - # - content: |- - # #See: https://devcenter.bitrise.io/infrastructure/virtual-machines/#managing-java-versions - # jenv global 11 - # export JAVA_HOME="$(jenv prefix)" - # envman add --key JAVA_HOME --value "$(jenv prefix)" - # - fastlane-match@0.2: - # inputs: - # - git_branch: "$MATCH_GIT_BRANCH" - # - app_id: "$BUNDLE_ID_PRODUCTION" - # - decrypt_password: "$MATCH_DECRYPT" - # - type: adhoc - # - team_id: "$DEVELOPER_TEAM" - # - git_url: git@github.com:nodes-projects/internal-certificates-ios.git - # - flutter-installer@0: {} - # - script@1: - # title: Flutter Pub Get - # inputs: - # - content: flutter pub get - # - flutter-build@0: - # inputs: - # - ios_additional_params: - # " --release --no-codesign -t lib/main_production.dart - # --flavor production --build-number=$BITRISE_BUILD_NUMBER" - # - cache_level: none - # - android_additional_params: - # "--release -t lib/main_production.dart --flavor - # production --build-number=$BITRISE_BUILD_NUMBER" - # - xcode-archive@3: - # inputs: - # - configuration: Release-production - # - export_method: ad-hoc - # - team_id: "$DEVELOPER_TEAM" - # - scheme: production - # - deploy-to-bitrise-io@1: {} - # - script@1: - # inputs: - # - content: |- - # #!/bin/bash - - # input=${BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP} - # inputs=($(echo "$input" | tr '|' '\n')) - - # for i in "${inputs[@]}" - # do - # if [[ "$i" == *".apk"* ]]; then - # androidLink=${i##*=>} - # elif [[ "$i" == *".ipa"* ]]; then - # iosLink=${i##*=>} - # else - # echo "No install page link found." - # fi - # done - - # echo "android: $androidLink" - # echo "ios: $iosLink" - - # envman add --key ANDROID_INSTALL_PAGE_LINK --value "${androidLink}" - # envman add --key IOS_INSTALL_PAGE_LINK --value "${iosLink}" - # title: Set Install Page Links - # - script@1: - # title: Set Build Version - # inputs: - # - content: |- - # #!/usr/bin/env bash - - # input=`grep -w version: pubspec.yaml` - # inputs=($(echo "$input" | tr 'version:' '\n')) - - # version="${inputs[@]}" - - # echo "BUILD_VERSION: ${version}" - - # envman add --key BUILD_VERSION --value "${version}" - # - script@1: - # inputs: - # - content: envman add --key BUILD_FLAVOUR --value "PRODUCTION" - # title: Set Build Flavour - # after_run: - # - notifySlack - # - tag - # deployStagingInternal: - # steps: - # - activate-ssh-key@4: - # run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' - # - git-clone@6.0: {} - # - script@1: - # inputs: - # - content: |- - # #See: https://devcenter.bitrise.io/infrastructure/virtual-machines/#managing-java-versions - # jenv global 11 - # export JAVA_HOME="$(jenv prefix)" - # envman add --key JAVA_HOME --value "$(jenv prefix)" - # title: Set Java Version 11 - # - script@1: - # title: Set Build Flavour - # inputs: - # - content: envman add --key BUILD_FLAVOUR --value "STAGING" - # - script@1: - # title: Set Build Version - # inputs: - # - content: |- - # #!/usr/bin/env bash - - # input=`grep -w version: pubspec.yaml` - # inputs=($(echo "$input" | tr 'version:' '\n')) - - # version="${inputs[@]}" - - # echo "BUILD_VERSION: ${version}" - - # envman add --key BUILD_VERSION --value "${version}" - # - git-tag@1: - # inputs: - # - tag: "${BUILD_VERSION}-${BITRISE_BUILD_NUMBER}" - # - fastlane-match@0.2: - # inputs: - # - git_branch: "$MATCH_GIT_BRANCH" - # - app_id: "$BUNDLE_ID_STAGING" - # - decrypt_password: "$MATCH_DECRYPT" - # - type: adhoc - # - team_id: "$DEVELOPER_TEAM" - # - git_url: git@github.com:nodes-projects/internal-certificates-ios.git - # - flutter-installer@0: {} - # - script@1: - # title: Flutter Pub Get - # inputs: - # - content: flutter pub get - # - flutter-build@0: - # inputs: - # - ios_additional_params: - # " --debug --no-codesign -t lib/main_staging.dart - # --flavor staging --build-number=$BITRISE_BUILD_NUMBER" - # - cache_level: none - # - android_output_type: appbundle - # - android_additional_params: - # "--release -t lib/main_staging.dart --flavor - # staging --build-number=$BITRISE_BUILD_NUMBER" - # - xcode-archive@3: - # inputs: - # - configuration: Release-staging - # - export_method: ad-hoc - # - team_id: "$DEVELOPER_TEAM" - # - scheme: staging - # - deploy-to-bitrise-io@1: {} - # - script@1: - # inputs: - # - content: |- - # #!/bin/bash - - # input=${BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP} - # inputs=($(echo "$input" | tr '|' '\n')) - - # for i in "${inputs[@]}" - # do - # if [[ "$i" == *".apk"* ]]; then - # androidLink=${i##*=>} - # elif [[ "$i" == *".ipa"* ]]; then - # iosLink=${i##*=>} - # else - # echo "No install page link found." - # fi - # done - - # echo "android: $androidLink" - # echo "ios: $iosLink" - - # envman add --key ANDROID_INSTALL_PAGE_LINK --value "${androidLink}" - # envman add --key IOS_INSTALL_PAGE_LINK --value "${iosLink}" - # title: Set Install Page Links - # after_run: - # - notifySlack deployTestflight: steps: - fastlane-match@0.2: @@ -520,7 +341,7 @@ workflows: steps: - slack@3.1: inputs: - - channel: "#p-husl-app-build" + - channel: "$NOTIFY_SLACK_INTERNAL_CHANNEL" - emoji: ":bitrise:" - icon_url: "" - author_name: "" @@ -545,7 +366,7 @@ workflows: steps: - slack@3.1: inputs: - - channel: "#p-husl-app-build" + - channel: "$NOTIFY_SLACK_EXTERNAL_CHANNEL" - emoji: ":bitrise:" - icon_url: "" - author_name: "" @@ -555,7 +376,7 @@ workflows: - footer_icon: "" - buttons: | Build|${BITRISE_BUILD_URL} - Changelog|https://github.com/nodes-projects/husl-flutter/releases/tag/${BUILD_VERSION}-${BITRISE_BUILD_NUMBER} + Changelog|${GITHUB_PROJECT_URL}/releases/tag/${BUILD_VERSION}-${BITRISE_BUILD_NUMBER} Android Install Page|${ANDROID_INSTALL_PAGE_LINK} iOS Install Page|${IOS_INSTALL_PAGE_LINK} - fields: | @@ -653,6 +474,7 @@ workflows: - git-tag@1: inputs: - tag: "${BUILD_VERSION}-${BITRISE_BUILD_NUMBER}" + #TODO: Change these vars according to the project app: envs: From 65d75b8f6a67254db3703ea03058c071c9598c58 Mon Sep 17 00:00:00 2001 From: Mathiew Abbas Date: Wed, 20 Jul 2022 07:09:41 -0500 Subject: [PATCH 4/4] refactor: renamed dummy values --- bitrise.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index e29fa42..4456a1c 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -499,25 +499,25 @@ app: - opts: is_expand: false BUILD_VERSION: "" - - DEVELOPER_TEAM: Y33QN5V968 - - MATCH_GIT_BRANCH: husl - - BUNDLE_ID_STAGING: eu.husl.staging - - BUNDLE_ID_PRODUCTION: eu.husl - - TEAM_NAME: SATOS B.V. - - NOTIFY_SLACK_INTERNAL_CHANNEL: "#p-husl-app-build" - - NOTIFY_SLACK_EXTERNAL_CHANNEL: "#p-husl-app-build" + - DEVELOPER_TEAM: 123FAMILY321 + - MATCH_GIT_BRANCH: matchbranch + - BUNDLE_ID_STAGING: bundle.id.staging + - BUNDLE_ID_PRODUCTION: bundle.id.production + - TEAM_NAME: Fast and Furious Tokyo Drift (FAMILY) + - NOTIFY_SLACK_INTERNAL_CHANNEL: "#family" + - NOTIFY_SLACK_EXTERNAL_CHANNEL: "#family(external)" - opts: is_expand: false - BUNDLE_ID_DEVELOPMENT: eu.husl.development + BUNDLE_ID_DEVELOPMENT: bundle.id.development - opts: is_expand: false BUILD_FLAVOUR: Unknown - opts: is_expand: false - GITHUB_PROJECT_URL: https://github.com/nodes-projects/husl-flutter + GITHUB_PROJECT_URL: https://github.com/org/repo - opts: is_expand: false - ASC_APP_KEY_ISSUER_ID: 476cde6b-6b84-480a-9f9c-afe89b1f3ec7 + ASC_APP_KEY_ISSUER_ID: 123abc-456efg trigger_map: - push_branch: develop workflow: deployDevelopmentInternal