New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Google Cloud SDK v114.0.0 GAE deploy error #463

Merged
merged 2 commits into from Jun 23, 2016

Conversation

Projects
None yet
4 participants
@M157q
Copy link
Contributor

M157q commented Jun 16, 2016

use_cloud_build and docker_build options had already been deprecated in Google Cloud SDK v112.0.0 and removed in Google Cloud SDK v114.0.0

If we kept the use_cloud_build option, we will get the error below while deploying to GAE with Google Cloud SDK v114.0.0:
ERROR: (gcloud.config.set) Section "app" has no property "use_cloud_build".

If we kept the docker_build option, we will get the error below while deploying to GAE with Google Cloud SDK v114.0.0:

ERROR: (gcloud.preview.app.deploy) Docker builds now use Container Builder by default. To run a Docker build on
your own host, you can run:
    docker build -t gcr.io/<project>/<service.version> .
    gcloud docker push gcr.io/<project>/<service.version>
    gcloud preview app deploy --image-url=gcr.io/<project>/<service.version>

This PR can fix these two errors.
Since this script will always get the newest version of Google Cloud SDK from https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz,
I didn't deal with the backward compatibility.

@M157q M157q force-pushed the M157q:fix-gcloud-v114-gae-deploy-error branch from 8e232f7 to 17a2aee Jun 16, 2016

@lorenzleutgeb

This comment has been minimized.

Copy link
Contributor

lorenzleutgeb commented Jun 20, 2016

Thank you for this PR. Please also adjust README.md to reflect the change.

@M157q M157q force-pushed the M157q:fix-gcloud-v114-gae-deploy-error branch 3 times, most recently from 4d25e28 to 4105bec Jun 21, 2016

M157q added some commits Jun 16, 2016

Remove `use_cloud_build` option for Google App Engine.
`use_cloud_build` option has already been deprecated in gcloud v112.0.0
and removed in gcloud v114.0.0

If we kept the `use_cloud_build` option, we will get the error below
while deploying to GAE with Google Cloud SDK v114.0.0:
`ERROR: (gcloud.config.set) Section "app" has no property "use_cloud_build".`
Remove `docker_build` option for Google App Engine.
`docker_build` option has already been deprecated in gcloud
v112.0.0 and removed in gcloud v114.0.0

If we keep this option, we will get this error messsage:

```
ERROR: (gcloud.preview.app.deploy) Docker builds now use Container
Builder by default. To run a Docker build on
your own host, you can run:
    docker build -t gcr.io/<project>/<service.version> .
    gcloud docker push gcr.io/<project>/<service.version>
    gcloud preview app deploy --image-url=gcr.io/<project>/<service.version>
```

@M157q M157q force-pushed the M157q:fix-gcloud-v114-gae-deploy-error branch from 4105bec to a3d4f51 Jun 21, 2016

@M157q

This comment has been minimized.

Copy link
Contributor Author

M157q commented Jun 21, 2016

@FlowLo I've removed the docker_build option for the Google App Engine section in README.md.
Please take a look at it. Thank you.

@CitizenOfTheRomanEmpire

This comment has been minimized.

Copy link

CitizenOfTheRomanEmpire commented Jun 21, 2016

Any update on this fix? I am trying to deploy a Node app to GAE via Travis, but it fails with the following errors:

ERROR: (gcloud.config.set) Section "app" has no property "use_cloud_build".
ERROR: (gcloud.preview.app.deploy) Docker builds now use Container Builder by default.

My .travis.yml file:

language: node_js
node_js:
 - '6.2'
before_install:
  - git submodule add -f git@github.com:echo-health/echo-environment.git environment
  - export PACKAGE_VERSION=$(node -p -e "require('./package.json').version")
  - export FIREBASE_PROJECT=$TRAVIS_BRANCH
script:
  - npm run build
  - firebase deploy -m "${PACKAGE_VERSION}-${TRAVIS_BUILD_NUMBER}" --project "${FIREBASE_PROJECT}" --token "${FIREBASE_TOKEN}"
deploy:
  provider: gae
  skip_cleanup: true
  project: echo-data-test
  config: environment/test/config.yml
  keyfile: environment/test/firebase.key.json
  version: "v${PACKAGE_VERSION//.}-${TRAVIS_BUILD_NUMBER}"
  default: true
  on: test
@M157q

This comment has been minimized.

Copy link
Contributor Author

M157q commented Jun 21, 2016

@RomansBermans
You can temporarily modify the deploy: section in your .travis.yml by adding lines below to see if it works.

edge:
  source: M157q/dpl 
  branch: fix-gcloud-v114-gae-deploy-error

so the deploy section in your .travis.yml should become like

deploy:
  provider: gae
  edge:
    source: M157q/dpl 
    branch: fix-gcloud-v114-gae-deploy-error
  skip_cleanup: true
  project: echo-data-test
  config: environment/test/config.yml
  keyfile: environment/test/firebase.key.json
  version: "v${PACKAGE_VERSION//.}-${TRAVIS_BUILD_NUMBER}"
  default: true
  on: test

This will make Travis-CI use the dpl from my patch instead of the official one which hasn't merged this PR and will get the errors.
I am using this for my private repo and it works like a charm.
Once this PR get merged, you can change your .travis.yml back.
Whether it works or not, please let me know. Thanks!

@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Jun 21, 2016

Thanks for the PR. Has this been tested?

@lorenzleutgeb

This comment has been minimized.

Copy link
Contributor

lorenzleutgeb commented Jun 21, 2016

The PR should help to make Classic App Engine apps work, however the Flexible Environment will need some more fixes and fallback to the legacy build system in order to use Docker (as a host).

Root cause is Google discontinuing to build Docker images on their side.

@BanzaiMan I'd say go ahead and merge this, but expect a follow-up PR from @Exordian (or me). We fixed our setup in the meantime, see changes to the provider and us fixing our .travis.yml. We'll brush this up and submit a PR for to provider to expose a flag for Flexible Environment and an explanation in README.md.

This way people will be able to deploy their Classic apps as soon as this PR is merged, and Flexible Environment will be working again with the upcoming PR.

@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Jun 21, 2016

Please test it as described in https://github.com/travis-ci/dpl/blob/master/TESTING.md. Thanks.

@CitizenOfTheRomanEmpire

This comment has been minimized.

Copy link

CitizenOfTheRomanEmpire commented Jun 21, 2016

@M157q thanks a lot. Now it works.

@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Jun 22, 2016

@RomansBermans Do you have a build log URL that shows a successful deployment using this? Once we have a good test, I can merge this and move it along to the release.

@BanzaiMan BanzaiMan merged commit 12c6305 into travis-ci:master Jun 23, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@CitizenOfTheRomanEmpire

This comment has been minimized.

Copy link

CitizenOfTheRomanEmpire commented Jun 23, 2016

@BanzaiMan I can see that you have already merged it. Do you still want to see the build log?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment