I am trying to deploy a mediawiki application to app engine using Jenkins as described in Google's push to deploy method https://cloud.google.com/tools/cloud-repositories/docs/push-to-deploy.
I am deploying mediawiki based on the same configurations here: https://github.com/tyolab/mediawiki-on-gae.
Some times I deploy the app and it is a success, but many times it fails with the following error:
Updating module [default].../
Updating module [default]...-
Updating module [default]...\
Updating module [default]...|
Updating module [default]...failed.
ERROR: (gcloud.preview.app.deploy) Error Response: [13]
Build step 'Execute shell' marked build as failure
Finished: FAILURE
There is no specific pattern, and the error is not descriptive, but I noticed the following:
If I deploy to a new staging container and a new version it usually works the first time, but later on it doesn't
I suspect it has something to do with static resources, as if I add some more static resources files "The ones commented out in the app.yaml sample below" the deployment fails
I suspected it is related to the issue described here, but the set +e solution didn't work for me How/When does Execute Shell mark a build as failure in Jenkins?
This is the build command that I use
set +e
gcloud --project=projectid preview app deploy app.yaml --version=3 --promote --bucket gs://projectstagingbucket --force
And here is a sample of the app.yaml file:
handlers:
# Static pages
#- url: /(.*\.(htm|html|css|js))
# static_files: \1
# upload: .*\.(htm|html|css|js)
# application_readable: true
# Serve images as static resources.
#- url: /resources/(.*\.(ico|jpg|jpeg|png|xcf|gif|woff|woff2|cur|ttf|otf|eot|svg))
# static_files: resources/\1
# upload: /resources/.*\.(ico|jpg|jpeg|png|xcf|gif|woff|woff2|cur|ttf|otf|eot|svg)
# application_readable: true
# Serve images as static resources.
#- url: /vendor/(.*\.(ico|jpg|jpeg|png|xcf|gif|woff|woff2|cur|ttf|otf|eot|svg))
# static_files: vendor/\1
# upload: vendor/.*\.(ico|jpg|jpeg|png|xcf|gif|woff2|cur|woff|ttf|otf|eot|svg)
# application_readable: true
# Serve images as static resources.
#- url: /skins/(.*\.(ico|jpg|jpeg|png|xcf|woff2|gif|woff|cur|ttf|otf|eot|svg))
# static_files: skins/\1
# upload: skins/.*\.(ico|jpg|jpeg|png|xcf|gif|woff2|woff|cur|ttf|otf|eot|svg)
# application_readable: true
- url: /favicon.ico
static_files: favicon.ico
upload: favicon.ico
application_readable: true
#- url: /(.+\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg))
# static_files: \1
# upload: .+\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg)
# application_readable: true
- url: /robots.txt
static_files: robots.txt
upload: robots.txt
application_readable: true
# Misc files.
- url: /(.+\.(xsd|txt|sql|))
static_files: \1
upload: .+\.(xsd|txt|sql)
application_readable: true
# Serve MediaWiki installation scripts
# can be removed after installation
#- url: /mw-config/
# script: mw-config/index.php
# secure: always
# Serve mw-config images as static resources.
#- url: /mw-config/images/(.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg))
# static_files: mw-config/images/\1
# upload: mw-config/images/.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg)
# application_readable: true
# Serve images from Google Cloud Storage
- url: /images/(.*\.(ico|jpg|jpeg|xcf|png|gif|woff|woff2|cur|ttf|otf|eot|svg))
script: extensions/CloudStorage/GoogleCloudStorageFileServe.php
secure: optional
# Serve php5 scripts.
- url: /(.+\.php5)
script: \1
# Serve php scripts.
- url: /(.+\.php)
script: \1
#
- url: (.*)/(.*)
script: index.php
secure: optional
# redirect root to wiki path
- url: /?
script: index.php
secure: optional
# 404
- url: /(.*)
# script: /wiki/Special:Error404
#
#- url: /wiki/Special:Error404
script: index.php
Thanks in advance.