我们使用angular 5的bitbucket管道将代码部署到GAE。我们将以以下例外情况结束。我们在CI/CD中使用bitbucket管道
THis是管道代码
image: node:9.11.1
pipelines:
custom:
default:
- step:
script:
- npm install -g @angular/cli@latest
- ng build --prod
- cp app.yaml dist
- ls dist
- cd dist
- curl -o /tmp/google-cloud-sdk.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-190.0.0-linux-x86_64.tar.gz
- tar -xvf /tmp/google-cloud-sdk.tar.gz -C /tmp/
- /tmp/google-cloud-sdk/install.sh -q
- source /tmp/google-cloud-sdk/path.bash.inc
- echo $GCLOUD_API_KEYFILE | base64 --decode --ignore-garbage > ./gcloud-api-key.json
- gcloud config set project $GCLOUD_PROJECT
- gcloud components install app-engine-java
- gcloud auth activate-service-account --key-file gcloud-api-key.json
- echo $GCLOUD_API_KEYFILE > /tmp/client-secret.json
- gcloud config set project $GCLOUD_PROJECT
- gcloud app update --split-health-checks --project adtecy-ui
- gcloud app deploy app.yaml我希望使用node docker image将angular 5(版本5.2.11)应用程序部署到GAE flex环境,但这需要很长时间,状态仍然是“正在进行中”(不确定通常的部署时间)。
这是我的app.yaml文件
env: flex
runtime: python
threadsafe: true
readiness_check:
timeout_sec: 4
check_interval_sec: 5
failure_threshold: 2
success_threshold: 2
app_start_timeout_sec: 3600我给了一个很高的超时时间,因为上一次推送失败了,超时了
我相信GAE默认使用python,因此我们现在没有安装python,部署大约运行了20分钟,但没有让我们知道任何结果。你们能帮助我在最短的时间内将我的应用程序部署到GAE吗?
编辑:现在我们已经得到了运行33分钟后的结果`21df82f90a72:图层已经存在
aeb4b6656589: Pushed
latest: digest:
sha256:c57d3178321c5f2721fc70cd00cb7862d469c74a6bf616ecfda760342c13af7e size: 3255
DONE
--------------------------------------------------------------------------------
Updating service [default] (this may take several minutes)...
.failed.
ERROR: (gcloud.app.deploy) Operation [apps/adtecy-
ui/operations/9c273f87-91a3-495a-b75d-0d6c767dce97] timed out.
This operation may still be underway.`发布于 2018-05-12 04:58:54
您可以通过运行以下命令检查部署操作的状态
gcloud应用运营"apps/adtecy-ui/operations/9c273f87-91a3-495a-b75d-0d6c767dce97“
发布于 2018-05-16 03:01:30
在nodejs环境下运行应用程序似乎有问题。所以我切换到了python27,并且我能够成功地部署它。但是,当我尝试使用GAE中提供的应用程序加载时,它抛出了一个错误。
这是我的app.yaml (我也做了一些修改)
runtime: python27
api_version: 1
threadsafe: true
handlers:
# Routing for bundles to serve directly
- url: /((?:inline|main|polyfills|styles|vendor)\.[a-z0-9]+\.bundle\.js)
secure: always
redirect_http_response_code: 301
static_files: dist/\1
upload: dist/.*
# Routing for a prod styles.bundle.css to serve directly
- url: /(styles\.[a-z0-9]+\.bundle\.css)
secure: always
redirect_http_response_code: 301
static_files: dist/\1
upload: dist/.*
# Routing for typedoc, assets and favicon.ico to serve directly
- url: /((?:assets|docs)/.*|favicon\.ico)
secure: always
redirect_http_response_code: 301
static_files: dist/\1
upload: dist/.*
# Any other requests are routed to index.html for angular to
handle so we don't need hash URLs
- url: /.*
secure: always
redirect_http_response_code: 301
static_files: dist/index.html
upload: dist/index\.htmlhttps://stackoverflow.com/questions/50267352
复制相似问题