Код: Выделить всё
image: node/apline
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- ~/.npm
stages:
- deploy
- tag
before_script:
- echo $CI_BUILD_REF
- echo $CI_PROJECT_DIR
- apk add --no-cache bash build-base gcc git python3 curl
- PATCH=`git log --pretty=oneline | wc -l | sed -e 's/^[[:space:]]*//'`
- VERSION=`cat VERSION`
- VERSION=${VERSION%?}
- TAG="${VERSION}${PATCH}"
- echo "Build version = ${TAG}"
expo-build:
stage: deploy
artifacts:
paths:
- ipas/
script:
- sed -i "s/0.0.0/${TAG}/g" app.json
- npm ci --production --cache .npm --prefer-offline
- npx expo login -u $EXPO_USERNAME -p $EXPO_PASSWORD
- EXPO_DEBUG=true npx expo build:ios --non-interactive
- mkdir -p ipas
- curl "$(npx expo url:ipa --non-interactive)" -o ipas/my-app-$TAG.ipa
only:
- master
Проблема в том, что если я каждый раз создаю другое приложение (у меня есть несколько приложений, которые я пытаюсь чтобы сделать это), похоже, что шаг сборки необходимо запустить локально, прежде чем его можно будет снова запустить в ci. Я имею в виду, что команде npx expo build:ios --non-interactive требуется вмешательство при выборе правильных сертификатов каждый раз, когда я делаю отдельную сборку, используя свои учетные данные Apple.
Вот результат неудачной сборки (которая раньше успешно выполнялась в конвейере без изменений кода):
Код: Выделить всё
- Making sure project is set up correctly...
[17:26:33] Checking if there is a build in progress...
[17:26:34] Fetching available credentials
[17:26:38] Unable to validate distribution certificate due to insufficient Apple Credentials
[17:26:38] Unable to determine validity of Push Keys due to insufficient Apple Credentials
[17:26:38] CommandError: Input is required, but Expo CLI is in non-interactive mode.
Required input:
> Push Notifications Key (Key ID: XXX, Team ID: XXX)
> not used by any apps
> ✅ Currently valid on Apple's servers.
> Would you like to use this Push Key?
at prompt (/expo-cli@3.17.17/src/prompt.ts:22:11)
at CreateOrReusePushKey.open (/expo-cli@3.17.17/src/credentials/views/IosPushCredentials.ts:281:31)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at CredentialsManager.run (/expo-cli@3.17.17/src/credentials/route.ts:42:12)
at runCredentialsManager (/expo-cli@3.17.17/src/credentials/route.ts:13:10)
at IOSBuilder.produceCredentials (/expo-cli@3.17.17/src/commands/build/ios/IOSBuilder.ts:168:7)
at IOSBuilder.prepareCredentials (/expo-cli@3.17.17/src/commands/build/ios/IOSBuilder.ts:124:7)
at IOSBuilder.run (/expo-cli@3.17.17/src/commands/build/ios/IOSBuilder.ts:46:7)
at IOSBuilder.command (/expo-cli@3.17.17/src/commands/build/BaseBuilder.ts:29:7)
at Command. (/expo-cli@3.17.17/src/exp.ts:85:7) {
code: 'NON_INTERACTIVE',
isCommandError: true
}
[17:26:39] Failed to prepare all credentials.
The next time you build, we will automatically use the following configuration:
[17:26:39]
[17:26:39] Project Credential Configuration:
[17:26:39] Experience: @team/app, bundle identifier: com.app.profile
[17:26:39] Provisioning profile (ID: XXX)
[17:26:39] Apple Team ID: XXX, Apple Team Name: ---------
[17:26:39]
[17:26:39] Distribution Certificate - Certificate ID: XXX
[17:26:39] Apple Team ID: XXX, Apple Team Name: A Company, LLC (In-House)
[17:26:39] used by
@team/app, (com.app.profile)
[17:26:39]
[17:26:39] Error
at CredentialsManager.doQuit [as _quit] (/expo-cli@3.17.17/src/credentials/views/Select.ts:176:9)
at CredentialsManager.run (/expo-cli@3.17.17/src/credentials/route.ts:49:42)
at runCredentialsManager (/expo-cli@3.17.17/src/credentials/route.ts:13:10)
at IOSBuilder.produceCredentials (/expo-cli@3.17.17/src/commands/build/ios/IOSBuilder.ts:168:7)
at IOSBuilder.prepareCredentials (/expo-cli@3.17.17/src/commands/build/ios/IOSBuilder.ts:124:7)
at IOSBuilder.run (/expo-cli@3.17.17/src/commands/build/ios/IOSBuilder.ts:46:7)
at IOSBuilder.command (/expo-cli@3.17.17/src/commands/build/BaseBuilder.ts:29:7)
at Command. (/expo-cli@3.17.17/src/exp.ts:85:7)
Подробнее здесь: https://stackoverflow.com/questions/611 ... ild-in-git