我正在使用EXPO SDK36构建一个本机应用程序。
我想在Gitlab-CI中使用build
和publish
,但是失败了,这就是我的.gitlab-ci.yml
工作的样子:
staging-native:
stage: publish
script:
- npm i
- npm run build:android:staging -- --no-wait || echo skipping
- npm run build:ios:staging -- --no-wait || echo skipping
- npm run publish:staging || echo skipping
only:
- tags
tags:
- docker
这是我正在尝试的:
$ npm run build:android:staging -- --no-wait || echo skipping
> @freeland/app-test-native@1.0.11 prebuild:android:staging /mnt/mesos/sandbox/builds/freeland/app-test-native
> npm run expo:login
> @freeland/app-test-native@1.0.11 expo:login /mnt/mesos/sandbox/builds/freeland/app-test-native
> if test $CI; then expo login --non-interactive -u "${EXPO_CLI_USER}"; fi
Success. You are now logged in as freeland.
> @freeland/app-test-native@1.0.11 build:android:staging /mnt/mesos/sandbox/builds/freeland/app-test-native
> expo build:android --release-channel staging --non-interactive "--no-wait"
- Making sure project is set up correctly...
[04:20:26] Checking if there is a build in progress...
[04:20:27] Unable to find an existing Expo CLI instance for this directory, starting a new one...
[04:20:38] Starting Metro Bundler on port 19001.
[04:20:44] Tunnel ready.
[04:20:44] Publishing to channel 'staging'...
[04:20:45] Building iOS bundle
[04:26:32] Building Android bundle
[04:26:32] Finished building JavaScript bundle in 18371ms.
[04:26:45] Analyzing assets
[04:26:45] Finished building JavaScript bundle in 13139ms.
[04:26:46] Finished building JavaScript bundle in 1127ms.
[04:26:47] Finished building JavaScript bundle in 1240ms.
[04:26:47] Uploading assets
[04:26:48] No assets changed, skipped.
[04:26:48] Processing asset bundle patterns:
[04:26:48] - /mnt/mesos/sandbox/builds/freeland/app-test-native/assets/*
[04:26:48] Uploading JavaScript bundles
[04:26:50] Published
[04:26:50] Your URL is
https://exp.host/@freeland/app-test-native?release-channel=staging
[04:26:50] › Closing Expo server
[04:26:50] › Stopping Metro bundler
Error: spawn ps ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freeland/app-test-native@1.0.11 build:android:staging: `expo build:android --release-channel staging --non-interactive "--no-wait"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @freeland/app-test-native@1.0.11 build:android:staging script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-12-30T04_26_50_356Z-debug.log
skipping
$ npm run build:ios:staging -- --no-wait || echo skipping
> @freeland/app-test-native@1.0.11 prebuild:ios:staging /mnt/mesos/sandbox/builds/freeland/app-test-native
> npm run expo:login
> @freeland/app-test-native@1.0.11 expo:login /mnt/mesos/sandbox/builds/freeland/app-test-native
> if test $CI; then expo login --non-interactive -u "${EXPO_CLI_USER}"; fi
Success. You are now logged in as freeland.
> @freeland/app-test-native@1.0.11 build:ios:staging /mnt/mesos/sandbox/builds/freeland/app-test-native
> expo build:ios --apple-id "${EXPO_APPLE_ID}" --release-channel staging -t simulator --non-interactive "--no-wait"
- Making sure project is set up correctly...
[04:26:58] Checking if there is a build in progress...
[04:26:58] Unable to find an existing Expo CLI instance for this directory, starting a new one...
Error: spawn ps ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freeland/app-test-native@1.0.11 build:ios:staging: `expo build:ios --apple-id "${EXPO_APPLE_ID}" --release-channel staging -t simulator --non-interactive "--no-wait"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @freeland/app-test-native@1.0.11 build:ios:staging script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-12-30T04_26_59_785Z-debug.log
skipping
$ npm run publish:staging -- --no-wait || echo skipping
> @freeland/app-test-native@1.0.11 prepublish:staging /mnt/mesos/sandbox/builds/freeland/app-test-native
> npm run expo:login
> @freeland/app-test-native@1.0.11 expo:login /mnt/mesos/sandbox/builds/freeland/app-test-native
> if test $CI; then expo login --non-interactive -u "${EXPO_CLI_USER}"; fi
Success. You are now logged in as freeland.
> @freeland/app-test-native@1.0.11 publish:staging /mnt/mesos/sandbox/builds/freeland/app-test-native
> expo publish --release-channel staging --non-interactive "--no-wait"
error: unknown option `--no-wait'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freeland/app-test-native@1.0.11 publish:staging: `expo publish --release-channel staging --non-interactive "--no-wait"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @freeland/app-test-native@1.0.11 publish:staging script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-12-30T04_27_04_374Z-debug.log
skipping
Job succeeded
我希望他们能通过。也许我的方法不正确,您如何build
和publish
参与Gitlab-CI的世博项目?