Skip to content

Commit

Permalink
Apply YAML lint (#117)
Browse files Browse the repository at this point in the history
* Apply YAML lint

* Migrate to xcode-archive 4.x
  • Loading branch information
ofalvai authored Nov 2, 2021
1 parent 5ed1b9b commit 8265212
Show file tree
Hide file tree
Showing 3 changed files with 335 additions and 329 deletions.
11 changes: 4 additions & 7 deletions bitrise.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
format_version: 11
format_version: "11"
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git

workflows:
check:
steps:
- git::https://github.com/bitrise-steplib/steps-check.git:
- git::https://github.com/bitrise-steplib/steps-check.git: { }

e2e:
steps:
Expand Down Expand Up @@ -42,7 +42,6 @@ workflows:
rm -rf ~/.fastlane
rm -rf ./_tmp
- change-workdir:
run_if: true
inputs:
- path: ./_tmp
- git::https://github.com/bitrise-steplib/bitrise-step-simple-git-clone.git:
Expand All @@ -51,7 +50,6 @@ workflows:
- branch: $TEST_APP_BRANCH
- clone_into_dir: .
- ios-auto-provision-appstoreconnect:
run_if: true
inputs:
- connection: "off"
- distribution_type: app-store
Expand Down Expand Up @@ -80,7 +78,6 @@ workflows:
envman add --key BITRISE_BUILD_NUMBER --value "${BITRISE_BUILD_NUMBER}"
- set-xcode-build-number:
title: Set Build Number
run_if: true
inputs:
- build_version: $BITRISE_BUILD_NUMBER
- plist_path: $INFO_PLIST_PATH
Expand All @@ -90,7 +87,7 @@ workflows:
inputs:
- output_dir: $BITRISE_DEPLOY_DIR
- project_path: $BITRISE_PROJECT_PATH
- export_method: app-store
- distribution_method: app-store
- path::./:
inputs:
- connection: apple_id
Expand All @@ -102,7 +99,7 @@ workflows:
- skip_screenshots: "no"
- skip_metadata: "yes"
- submit_for_review: "no"
- fastlane_version: "latest"
- fastlane_version: latest
- verbose_log: "yes"

generate_readme:
Expand Down
247 changes: 124 additions & 123 deletions e2e/bitrise.yml
Original file line number Diff line number Diff line change
@@ -1,183 +1,184 @@
format_version: 11
format_version: "11"
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git

app:
envs:
# Shared configs
- TEST_APP_URL: https://github.com/bitrise-io/sample-apps-itunes-connect-beta-test.git
- TEST_APP_BRANCH: master
- BITRISE_PROJECT_PATH: ./Bitrise-iTunesConnectBetaTest/Bitrise-iTunesConnectBetaTest.xcodeproj
- BITRISE_SCHEME: Bitrise-iTunesConnectBetaTest
- INFO_PLIST_PATH: ./Bitrise-iTunesConnectBetaTest/Bitrise-iTunesConnectBetaTest/Info.plist
- BITRISE_KEYCHAIN_PATH: $HOME/Library/Keychains/login.keychain
# Shared secrets
- BITRISE_KEYCHAIN_PASSWORD: $BITRISE_KEYCHAIN_PASSWORD
- BITFALL_APPLE_APPLE_CERTIFICATE_URL_LIST: $BITFALL_APPLE_APPLE_CERTIFICATE_URL_LIST
- BITFALL_APPLE_IOS_CERTIFICATE_URL_LIST: $BITFALL_APPLE_IOS_CERTIFICATE_URL_LIST
- BITFALL_APPLE_APPLE_CERTIFICATE_PASSPHRASE_LIST: $BITFALL_APPLE_APPLE_CERTIFICATE_PASSPHRASE_LIST
- BITFALL_APPLE_IOS_CERTIFICATE_PASSPHRASE_LIST: $BITFALL_APPLE_IOS_CERTIFICATE_PASSPHRASE_LIST
- BITFALL_APPSTORECONNECT_API_KEY_URL: $BITFALL_APPSTORECONNECT_API_KEY_URL
- BITFALL_APPSTORECONNECT_API_KEY_ISSUER_ID: $BITFALL_APPSTORECONNECT_API_KEY_ISSUER_ID
- ITUNES_CONNECT_APP_SPECIFIC_PASSWORD: $ITUNES_CONNECT_APP_SPECIFIC_PASSWORD
- ITUNES_CONNECT_TEAM_ID: $ITUNES_CONNECT_TEAM_ID
- ITUNES_CONNECT_APP_ID: $ITUNES_CONNECT_APP_ID
# Shared configs
- TEST_APP_URL: https://github.com/bitrise-io/sample-apps-itunes-connect-beta-test.git
- TEST_APP_BRANCH: master
- BITRISE_PROJECT_PATH: ./Bitrise-iTunesConnectBetaTest/Bitrise-iTunesConnectBetaTest.xcodeproj
- BITRISE_SCHEME: Bitrise-iTunesConnectBetaTest
- INFO_PLIST_PATH: ./Bitrise-iTunesConnectBetaTest/Bitrise-iTunesConnectBetaTest/Info.plist
- BITRISE_KEYCHAIN_PATH: $HOME/Library/Keychains/login.keychain
# Shared secrets
- BITRISE_KEYCHAIN_PASSWORD: $BITRISE_KEYCHAIN_PASSWORD
- BITFALL_APPLE_APPLE_CERTIFICATE_URL_LIST: $BITFALL_APPLE_APPLE_CERTIFICATE_URL_LIST
- BITFALL_APPLE_IOS_CERTIFICATE_URL_LIST: $BITFALL_APPLE_IOS_CERTIFICATE_URL_LIST
- BITFALL_APPLE_APPLE_CERTIFICATE_PASSPHRASE_LIST: $BITFALL_APPLE_APPLE_CERTIFICATE_PASSPHRASE_LIST
- BITFALL_APPLE_IOS_CERTIFICATE_PASSPHRASE_LIST: $BITFALL_APPLE_IOS_CERTIFICATE_PASSPHRASE_LIST
- BITFALL_APPSTORECONNECT_API_KEY_URL: $BITFALL_APPSTORECONNECT_API_KEY_URL
- BITFALL_APPSTORECONNECT_API_KEY_ISSUER_ID: $BITFALL_APPSTORECONNECT_API_KEY_ISSUER_ID
- ITUNES_CONNECT_APP_SPECIFIC_PASSWORD: $ITUNES_CONNECT_APP_SPECIFIC_PASSWORD
- ITUNES_CONNECT_TEAM_ID: $ITUNES_CONNECT_TEAM_ID
- ITUNES_CONNECT_APP_ID: $ITUNES_CONNECT_APP_ID

workflows:
test_apple_id_service_auth_app_spec_password_input:
steps:
- bitrise-run:
run_if: '{{getenv "BITRISEIO_STACK_ID" | ne "osx-xcode-10.3.x"}}'
run_if: |-
{{ getenv "BITRISEIO_STACK_ID" | ne "osx-xcode-10.3.x" }}
inputs:
- workflow_id: utility_test_apple_id_service_auth_app_spec_password_input
- bitrise_config_path: ./e2e/bitrise.yml

utility_test_apple_id_service_auth_app_spec_password_input:
title: Test Apple ID connection authentication with app specific password from input
envs:
- CONNECTION: apple_id
- API_KEY_URL: ""
- API_KEY_ISSUER: ""
- APP_SPECIFIC_PASSWORD: $ITUNES_CONNECT_APP_SPECIFIC_PASSWORD
- TEAM_ID: $ITUNES_CONNECT_TEAM_ID
- APP_ID: $ITUNES_CONNECT_APP_ID
- CONNECTION: apple_id
- API_KEY_URL: ""
- API_KEY_ISSUER: ""
- APP_SPECIFIC_PASSWORD: $ITUNES_CONNECT_APP_SPECIFIC_PASSWORD
- TEAM_ID: $ITUNES_CONNECT_TEAM_ID
- APP_ID: $ITUNES_CONNECT_APP_ID
after_run:
- _run
- _run

test_apple_id_service_auth_app_spec_password_connection:
steps:
- bitrise-run:
run_if: '{{getenv "BITRISEIO_STACK_ID" | ne "osx-xcode-10.3.x"}}'
run_if: |-
{{ getenv "BITRISEIO_STACK_ID" | ne "osx-xcode-10.3.x" }}
inputs:
- workflow_id: utility_test_apple_id_service_auth_app_spec_password_connection
- bitrise_config_path: ./e2e/bitrise.yml

utility_test_apple_id_service_auth_app_spec_password_connection:
title: Test Apple ID connection authentication with app specific password from connection
envs:
- CONNECTION: apple_id
- API_KEY_URL: ""
- API_KEY_ISSUER: ""
- APP_SPECIFIC_PASSWORD: ""
- TEAM_ID: $ITUNES_CONNECT_TEAM_ID
- APP_ID: $ITUNES_CONNECT_APP_ID
- CONNECTION: apple_id
- API_KEY_URL: ""
- API_KEY_ISSUER: ""
- APP_SPECIFIC_PASSWORD: ""
- TEAM_ID: $ITUNES_CONNECT_TEAM_ID
- APP_ID: $ITUNES_CONNECT_APP_ID
after_run:
- _run
- _run

test_api_key_service_auth:
steps:
- bitrise-run:
run_if: '{{getenv "BITRISEIO_STACK_ID" | ne "osx-xcode-10.3.x"}}'
run_if: |-
{{ getenv "BITRISEIO_STACK_ID" | ne "osx-xcode-10.3.x" }}
inputs:
- workflow_id: utility_test_api_key_service_auth
- bitrise_config_path: ./e2e/bitrise.yml

utility_test_api_key_service_auth:
title: Test API key connection authentication
envs:
- CONNECTION: api_key
- API_KEY_URL: ""
- API_KEY_ISSUER: ""
- APP_SPECIFIC_PASSWORD: ""
- TEAM_ID: ""
- APP_ID: $ITUNES_CONNECT_APP_ID
- CONNECTION: api_key
- API_KEY_URL: ""
- API_KEY_ISSUER: ""
- APP_SPECIFIC_PASSWORD: ""
- TEAM_ID: ""
- APP_ID: $ITUNES_CONNECT_APP_ID
after_run:
- _run
- _run

test_api_key_input_auth:
steps:
- bitrise-run:
run_if: '{{getenv "BITRISEIO_STACK_ID" | ne "osx-xcode-10.3.x"}}'
run_if: |-
{{ getenv "BITRISEIO_STACK_ID" | ne "osx-xcode-10.3.x" }}
inputs:
- workflow_id: utility_test_api_key_input_auth
- bitrise_config_path: ./e2e/bitrise.yml

utility_test_api_key_input_auth:
title: Test API key Step Input authentication
envs:
- CONNECTION: "off"
- API_KEY_URL: $BITFALL_APPSTORECONNECT_API_KEY_URL
- API_KEY_ISSUER: $BITFALL_APPSTORECONNECT_API_KEY_ISSUER_ID
- APP_SPECIFIC_PASSWORD: ""
- TEAM_ID: ""
- APP_ID: $ITUNES_CONNECT_APP_ID
- CONNECTION: "off"
- API_KEY_URL: $BITFALL_APPSTORECONNECT_API_KEY_URL
- API_KEY_ISSUER: $BITFALL_APPSTORECONNECT_API_KEY_ISSUER_ID
- APP_SPECIFIC_PASSWORD: ""
- TEAM_ID: ""
- APP_ID: $ITUNES_CONNECT_APP_ID
after_run:
- _run
- _run

_run:
title: Prepare test
description: |
This downloads and archives an example app as an input for deliver
steps:
- script:
title: Clean saved Fastlane session cookie and cleanup _tmp dir
inputs:
- content: |-
#!/bin/env bash
set -ex
rm -rf ~/.fastlane
rm -rf ./_tmp
- change-workdir:
run_if: true
inputs:
- path: ./_tmp
- git::https://github.com/bitrise-steplib/bitrise-step-simple-git-clone.git:
inputs:
- repository_url: $TEST_APP_URL
- branch: $TEST_APP_BRANCH
- clone_into_dir: .
- ios-auto-provision-appstoreconnect:
run_if: true
inputs:
- connection: "off"
- distribution_type: app-store
- generate_profiles: "yes"
- scheme: $BITRISE_SCHEME
- api_key_path: $BITFALL_APPSTORECONNECT_API_KEY_URL
- api_issuer: $BITFALL_APPSTORECONNECT_API_KEY_ISSUER_ID
- certificate_urls: $BITFALL_APPLE_APPLE_CERTIFICATE_URL_LIST|$BITFALL_APPLE_IOS_CERTIFICATE_URL_LIST
- passphrases: $BITFALL_APPLE_APPLE_CERTIFICATE_PASSPHRASE_LIST|$BITFALL_APPLE_IOS_CERTIFICATE_PASSPHRASE_LIST
- keychain_path: $BITRISE_KEYCHAIN_PATH
- keychain_password: $BITRISE_KEYCHAIN_PASSWORD
- script:
inputs:
- content: |-
#!/usr/bin/env bash
CURRENT_BUILD_NUMBER=${BITRISE_BUILD_NUMBER}
BITRISE_BUILD_NUMBER=$((($(gdate +%Y%m%d%H%M%S)-20000000000000)*10000))
if [[ -z "${BITRISE_BUILD_NUMBER}" ]]; then
echo "error: failed to calculated build number"
exit 1
fi
if [[ -n "${CURRENT_BUILD_NUMBER}" ]]; then
BITRISE_BUILD_NUMBER=$((${BITRISE_BUILD_NUMBER}+${CURRENT_BUILD_NUMBER}))
fi
- script:
title: Clean saved Fastlane session cookie and cleanup _tmp dir
inputs:
- content: |-
#!/bin/env bash
set -ex
rm -rf ~/.fastlane
rm -rf ./_tmp
- change-workdir:
inputs:
- path: ./_tmp
- git::https://github.com/bitrise-steplib/bitrise-step-simple-git-clone.git:
inputs:
- repository_url: $TEST_APP_URL
- branch: $TEST_APP_BRANCH
- clone_into_dir: .
- ios-auto-provision-appstoreconnect:
inputs:
- connection: "off"
- distribution_type: app-store
- generate_profiles: "yes"
- scheme: $BITRISE_SCHEME
- api_key_path: $BITFALL_APPSTORECONNECT_API_KEY_URL
- api_issuer: $BITFALL_APPSTORECONNECT_API_KEY_ISSUER_ID
- certificate_urls: $BITFALL_APPLE_APPLE_CERTIFICATE_URL_LIST|$BITFALL_APPLE_IOS_CERTIFICATE_URL_LIST
- passphrases: $BITFALL_APPLE_APPLE_CERTIFICATE_PASSPHRASE_LIST|$BITFALL_APPLE_IOS_CERTIFICATE_PASSPHRASE_LIST
- keychain_path: $BITRISE_KEYCHAIN_PATH
- keychain_password: $BITRISE_KEYCHAIN_PASSWORD
- script:
inputs:
- content: |-
#!/usr/bin/env bash
CURRENT_BUILD_NUMBER=${BITRISE_BUILD_NUMBER}
BITRISE_BUILD_NUMBER=$((($(gdate +%Y%m%d%H%M%S)-20000000000000)*10000))
if [[ -z "${BITRISE_BUILD_NUMBER}" ]]; then
echo "error: failed to calculated build number"
exit 1
fi
if [[ -n "${CURRENT_BUILD_NUMBER}" ]]; then
BITRISE_BUILD_NUMBER=$((${BITRISE_BUILD_NUMBER}+${CURRENT_BUILD_NUMBER}))
fi
envman add --key BITRISE_BUILD_NUMBER --value "${BITRISE_BUILD_NUMBER}"
- set-xcode-build-number:
title: Set Build Number
run_if: true
inputs:
- build_version: $BITRISE_BUILD_NUMBER
- plist_path: $INFO_PLIST_PATH
- build_version_offset: $BITRISE_BUILD_VERSION_OFFSET
- xcode-archive:
title: Create Archive
inputs:
- output_dir: $BITRISE_DEPLOY_DIR
- project_path: $BITRISE_PROJECT_PATH
- export_method: app-store
- path::./:
inputs:
- connection: $CONNECTION
- itunescon_user: $ITUNESCON_USER
- password: $ITUNESCON_PASSWORD
- api_key_path: $API_KEY_URL
- api_issuer: $API_KEY_ISSUER
- app_password: $APP_SPECIFIC_PASSWORD
- team_id: $TEAM_ID
- app_id: $APP_ID
- skip_screenshots: "no"
- skip_metadata: "yes"
- submit_for_review: "no"
- fastlane_version: "latest"
- verbose_log: "yes"
envman add --key BITRISE_BUILD_NUMBER --value "${BITRISE_BUILD_NUMBER}"
- set-xcode-build-number:
title: Set Build Number
inputs:
- build_version: $BITRISE_BUILD_NUMBER
- plist_path: $INFO_PLIST_PATH
- build_version_offset: $BITRISE_BUILD_VERSION_OFFSET
- xcode-archive:
title: Create Archive
inputs:
- output_dir: $BITRISE_DEPLOY_DIR
- project_path: $BITRISE_PROJECT_PATH
- distribution_method: app-store
- path::./:
inputs:
- connection: $CONNECTION
- itunescon_user: $ITUNESCON_USER
- password: $ITUNESCON_PASSWORD
- api_key_path: $API_KEY_URL
- api_issuer: $API_KEY_ISSUER
- app_password: $APP_SPECIFIC_PASSWORD
- team_id: $TEAM_ID
- app_id: $APP_ID
- skip_screenshots: "no"
- skip_metadata: "yes"
- submit_for_review: "no"
- fastlane_version: latest
- verbose_log: "yes"
Loading

0 comments on commit 8265212

Please sign in to comment.