google-app-engine,continuous-integration,travis-ci,gcloud,service-accounts , Using gcloud on Travis CI


Using gcloud on Travis CI

Question:

Tag: google-app-engine,continuous-integration,travis-ci,gcloud,service-accounts

I have gcloud installed and working and a service account gets also activated. I run the following and get a success(?):

$ gcloud auth activate-service-account "${GAE_CLIENT_ACCOUNT}" --key-file "${GAE_CLIENT_KEY_JSON_FILE}"

Activated service account credentials for: [[email protected]]

Then I run this:

$ gcloud preview app deploy app.yaml --project "${GAE_PROJECT_ID}" --quiet --version "${GAE_PROJECT_VERSION}"

You are about to deploy the following modules:
 - ricochet-robots/default/dev  From: [/home/travis/build/ricochetrobots/ricochetrobots-landing/app.yaml]

Updating module [default]...Go to the following link in your browser:

    https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&client_id=xxxxxxxx.apps.googleusercontent.com&access_type=offline

Updating module [default].../

As you can see, it prompts me to follow the link and do an oauth. Because I'm on a ci server, it's not possible to follow the link. How kan I suppress that? Or is there a totally diffrent way of deploying the app automatically.


Answer:

This is a known issue in version 0.9.61.

For now, you can work around by pinning to a previous version:

gcloud config set compent_manager/fixed_sdk_version 0.9.60
gcloud components update

Since you're running in a CI server, you can also set the following environment variable, if you run gcloud components update in your script. This may be an easier fix, depending on your CI server.

CLOUDSDK_COMPONENT_MANAGER_SNAPSHOT_URL=https://dl.google.com/dl/cloudsdk/release/components-v0.9.60.json

Running gcloud preview app deploy --set-default using a service account has the same issue in versions 0.9.57 through 0.9.62. If you'd like to use this command, you can pin to 0.9.56.

We're targeting a fix for version 0.9.63 or shortly thereafter. Follow the issue on the gcloud bug tracker for more updates.


Related:


App Engine - NDB query with projection requires subproperty?


google-app-engine,gae-datastore,app-engine-ndb,google-app-engine-python
I have the following objects: class Address(ndb.Model): type = ndb.StringProperty() # E.g., 'home', 'work' street = ndb.StringProperty() city = ndb.StringProperty() class Friend(ndb.Model): first_name = ndb.StringProperty() # E.g., 'home', 'work' last_name = ndb.StringProperty() class Contact(ndb.Model): name = ndb.StringProperty() addresses = ndb.StructuredProperty(Address, repeated=True) friends = ndb.StructuredProperty(Friend, repeated=True) And now to optimize the...

Cloud Endpoints with Cloud SQL sample code


java,google-app-engine,google-cloud-endpoints,google-cloud-sql
I am looking to use Cloud Endpoints to create an API on the Google App Engine but all the tutorials I see are for how to interact with the Cloud Datastore. I am looking to use Cloud SQL though. Does anyone have a Cloud Endpoints class sample code (in Java)...

Choosing specific ports on local development server for non-default modules


java,google-app-engine,android-studio,gradle,app-engine-modules
In my build.gradle file, I use the following config for my non-default (module2) AppEngine gradle module: appengine { downloadSdk = true httpAddress = "0.0.0.0" httpPort = 8081 appcfg { email = "[email protected]" oauth2 = true } } However, when I run my "Google AppEngine configuration", the module still starts on...

Objectify - should I create an entity super class?


java,google-app-engine,objectify
Is there any reason why shouldn't all my entities be subclasses of one generic ModelEntity object? @Entity public class ModelEntity { @Id Long id; } @Subclass public class User extends ModelEntity { @Index String username; } The advantages are clear: there is code common to all entities (like id, date,...

Check if a queue is empty in Google App Engine


python,django,google-app-engine,task-queue
I have a script that add tasks to a queue. For example: api.py: from google.appengine.api import taskqueue [...] for u in users: taskqueue.add(queue_name='mailqueue', url="/api/users/send-notification/%s" % (u.id), method='GET') I would like to check if the queue is empty and all tasks are finishing view.py: if queue_is_empty: print "Your task is finished"...

Google-App-Engine[PHP]: Error trying to establish database connection


php,mysql,database,wordpress,google-app-engine
I am finding a problem with the cloudsql as database connection is not being established. I have followed the following site step-by-step https://googlecloudplatform.github.io/appengine-php-wordpress-starter-project/ However I seem to be finding problems after deploying the project to the appengine and accessing the wordpress installation page with URL: https://<PROJECT-ID>.appspot.com/wp-admin/install.php The error shown is:...

Google App Engine performance setting : Some performance settings must be changed via Module configuration files


java,google-app-engine
Google App Engine performance setting is not available for the application, it is displaying as Some performance settings must be changed via Module configuration files. My question is, in my current application I am not using module, so it should have performance setting sliders displayed? Or I need to set...

Getting gcloud to work in Cygwin Windows


python,windows,google-app-engine,cygwin
I am fairly new to programming. I have started app development on google app engine. I am trying to get the Google Cloud SDK to work with Cygwin 32 on Windows. I first ran the curl command to download the Google SDK files. Then I ran the install.py script and...

Getting user credentials using Google+ API


android,google-app-engine,google-api,google-api-java-client
I am trying to include Google sign in in my android application using Google+ Api. I am able to take account details from the user but once signed in I am getting null when requesting for username using call: Plus.PeopleApi.getCurrentPerson(mGoogleApiClient).getDisplayName() And Logcat shows: BasicNetwork.performRequest: Unexpected response code 403 for https://www.googleapis.com/plus/v1/people/me...

Fail Jenkins job when nosetests fail


python,shell,jenkins,continuous-integration
I am managing deployment / CI of a Flask app through Jenkins. I have a build step in the form of an executed shell which runs a shell script in the host that in turns runs nosetests. The Jenkins shell command looks like so: $WORKSPACE/ops/test_integration.sh integration.sh looks like so: SETTINGS_FILE="settings/integration.py"...

Designing an API on top of BigQuery


google-app-engine,bigdata,google-bigquery
I have an AppEngine app that tracks user various sorts of impression data across several websites. Currently we're gathering roughly 40 million records a month and the main BigQuery table is closing in on 15Gb in size after 6 weeks of gathering data and our estimates show that within 6...

In terms of back-end and front-end technology, what can GAE do that Web Hosting can't? [closed]


google-app-engine,web-hosting,lamp,paas,web-technologies
I vaguely understand the difference between Google App Engine and a traditional Web Hosting service. I do understand Google App Engine can scale for a much wider audience, thanks to not having to maintain your own hardware, handling the load-balancing, spreading the data over multiple locations, etc. But in terms...

AJAX call to Servlet Google App Engine (GAE)


java,ajax,jsp,google-app-engine,servlets
I am trying to make an AJAX call to my servlet but it doesn't work. I can't redirect to a JSP. This is my AJAX call: $.ajax({ url: '/register', type: 'GET' }); This is my Servlet: public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { getServletContext().getRequestDispatcher("/prueba.jsp").forward(req, resp); } If...

Continuous deployment and running with TeamCiy


.net,continuous-integration,teamcity,exe,continuous-deployment
I have a project that is built into an executable. Some kind of server. And a Team City as CI. I configured Team City to automatically build my sources. I would like to achive the following steps: Sources are built by Team City when someone commits into repo. (done) Built...

Triggering Jenkins to run application tests when GitHub PR is created


git,jenkins,continuous-integration,ansible,continuous-deployment
I am a noob to Jenkins, and I have a Jenkins server that runs an ansible playbook to deploy the app. I would like to be able to have Jenkins run an ansible playbook which runs application python tests when a GitHub pull request is opened. I would then like...

Scaling non-default version of Google App Engine Backend


python,google-app-engine
I have a live app that uses Google App Engine (python) for the backend. The app is pointing https://my-app.appspot.com. Because the API has changed significantly, I've set up a new version of the backend, 'v2', and am pointing the new app to https://v2.my-app.appspot.com. I see now in the docs, that...

Sending mail by Unauthorised sender in Google AppEngine


python,google-app-engine,email,sendmail
I've got a Google AppEngine Python application connected with my domain. I want to be able to send emails from any email, like: [email protected] So I use sendmail() and set mailobject.sender = "[email protected]", but it does not work. Also I made a receive function, but I don't want to receive...

Google App Engine datastore: filter()


python,google-app-engine
I'm trying to retrieve an entry from Google App Engine's datastore using the filter() method as follows: result = Sender.all().filter("email =", email).filter("source_address =", source).filter("dest_address =", dest).filter("food_type =", food_type) Then, if such an entry exists, I change the value of one of the columns in that entry. Otherwise, I'm displaying an...

Do we HAVE to generate and use client libraries to use Google App Engine's Endpoints?


ios,swift,rest,google-app-engine,google-cloud-endpoints
I am currently developing an Swift iOS app with GAE Endpoints for the RESTful API. It seems like all the tutorials and documents make you generate and use client libraries if you need to use the API on the client side. I was wondering if it's possible for me to...

Is it possible to use Google Cloud Endpoints built in authentication with Google+ Domains API?


google-app-engine,authentication,google-plus,google-cloud-endpoints,google-plus-domains
Google Cloud Endpoints has it's own authentication process in which the backend endpoint method is simply passed a com.google.appengine.api.users.User object. https://cloud.google.com/appengine/docs/java/endpoints/auth The Google+ Domains API specifies its own authentication process in order to get the com.google.api.client.auth.oauth2.Credential object. This allows for the building of the com.google.api.services.plusDomains.PlusDomain object. https://developers.google.com/+/domains/authentication/ How would you...

upload CSV file to database on Google app engine using Python


python,database,google-app-engine,csv,upload
I'm a newbie in python and started learning it from about a week. I was looking into couple of tasks one of which was to upload a file (.txt or .jpg) to a bucket on GAE. I was able to solve it by following couple of tutorials online, but i'm...

Profiling memory usage on App Engine


python,google-app-engine,memory
How can I profile memory (RAM) usage on my App Engine app? I'm trying to address errors related to exceeding the instance memory limit. I've tried these things and, so far, they don't work or don't provide what I need. Appstats. This doesn't provide memory usage details. Apptrace. It hasn't...

GAE Python PyML ImportError: No module named _ckernel


python,google-app-engine,pyml
I'm trying to import PyML on Google App Engine as a requirement for another library, however I am getting the following import error: File "/base/data/home/apps/s~myapp/uno.385079313378714244/PyML/__init__.py", line 4, in <module> from PyML.containers import * File "/base/data/home/apps/s~myapp/uno.385079313378714244/PyML/containers/__init__.py", line 3, in <module> VectorDataSet = __import__('PyML.containers.vectorDatasets', fromlist=['']).VectorDataSet File...

Arguments to Endpoints method change order


android,google-app-engine,google-cloud-endpoints
I am using Google App Engine with Cloud Endpoints for a simple Android application. In the backend I have the following API method, deployed to GAE: @ApiMethod(name = "getGroupInfo", path = "groups") public GroupInfo getGroupInfo(@Named("session") String sessionString, @Named("groupID") String groupID) throws ForbiddenException { Logger.getAnonymousLogger().warning("Session string is: " + sessionString); Logger.getAnonymousLogger().warning("GroupID...

serving GAE applications over http


java,google-app-engine,ssl
I have implemented an application on GAE which can be accessible through https://<my_app_id>.appspot.com. Now I have a custom domain registered with Register.com. As described in GAE documentation I have mapped my custom domain to https://<my_app_id>.appspot.com and I see my application getting served from my custom domain. But I see requests...

Google AppEngine channel is opened, client is receiving responses, but socket.onmessage is not being called


javascript,google-chrome,google-app-engine,long-polling,channel-api
I have a webpage that I want to use the google app engine channel API with. I have a token being generated with an external library, which is fed into this very, very simple javascript. <html lang="en"> <body> <script src="jquery-1.6.3.min.js" ></script> <script type="text/javascript" src="/_ah/channel/jsapi"></script> <script type="text/javascript"> var token, channel, socket;...

How can you get the Google+ Profile of the current user when using Google Cloud Endpoint's (Java) built in authentication?


google-app-engine,google-plus,google-cloud-endpoints
My Setup Backend: Google App Engine (Java) w/ Google Cloud Endpoints using Endpoint's built in authentication Frontend: AngularJS web app Problem I need to get the Google+ profile for my users. The keyword "me" can generally be used to get the current user's Google+ profile, however since all the authentication,...

GAE python - client_secrets.json 'File not found' - app.yaml error?


python,json,google-app-engine,youtube-api,app.yaml
I am using GAE (python) to make a web application. I am specifically attempting to get a youtube API to work, but I cannot get the credentials to function properly. If I follow the "Retrieve my Uploads" example here, I keep getting an error when importing the client_secrets.json file: InvalidClientSecretsError('File...

Could someone bring Google OAuth2 for Cloud DNS via Rest to light?


c#,api,rest,google-app-engine,dns
Infinite Loop Error. I have been spending way too much time going in circles in Googles really terrible API documentation regarding implementation of their cloud services in a desktop application. First major problem, it seems that I must use Oauth2 somehow in order to obtain additional client credentials (which I...

IllegalArgumentException: expected primitive class, but got: class UUID


android,google-app-engine,google-cloud-endpoints
My app is using GAE endpoints. My model has UUID. And once i try to send it Android app it encounters illegalArgument exception. Anyone has got recommendations how to handle endpoints model with UUID on android app with Google App Engine endpoints? 06-14 23:26:49.560 27462-27488/com.example E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1...

SShpass not allowed with Travis CI


ssh,continuous-integration,travis-ci,continuous-deployment
Context I have an application in which, I m using unit tests and I need to continuous deliver this. I chose to use github + travis + docker. My Docker container is an Ubuntu 12.04 with openSSL that I cant connect from outside, and I dont have any problem with...

How to automate deployment of source & compiled code (excluding git history) to third-party developers?


git,deployment,continuous-integration,bitbucket
I'm going to setup some tools/techiques/environments so that when I need to provide the source code for third-party developers, I do it without git history with some sensitive code already compiled and stripped. So I want to automate this process, so that I always provide the latest version of it...

How to get public link for the uploaded file on google cloud storage in local dev server(Google App engine+JAVA)


java,google-app-engine,file-upload,google-cloud-platform
I am trying to upload the image files using gcs client library+java in local google app engine dev server. Images are uploaded successfully and i can see the entries created in local datastore under localhost:8888/_ah/admin/datastore How to get the public key for the uploaded images so that i can show...

jQuery ajax() success data - retrieving object results from Python server


jquery,python,ajax,google-app-engine,ajaxform
I am trying to display success data after a jQuery ajax function from a Python server (GAE). I am able to make it work with just a single string or number as the success data, but I would like to relay several pieces of info from the server in the...

I am working on small project with Google AppEngine (Python), tutored by Udacity. I am unable to render user comments to main page


python-2.7,google-app-engine,gae-datastore,jinja2
I am suppose to add forms to my HTML to allow users to add data (comments to my page) and also store the data via GAE-Datastore. I have been able to store the data but not able to get the user comments posted to the main page. Seperate code files:...

GAE webapp2 delete all UserTokens (drop all sessios) for specific user


python,google-app-engine,webapp2
I want to drop all user sessions when user resets his password, but I can't find a way to do that. My idea was to get all UserTokens of the specific user and delete them, but it seems impossible, because of user = model.StringProperty(required=True, indexed=False) in UserToken model Any ideas...

How can I create a docker image from the current system?


google-app-engine,docker,boot2docker
I want to create a Docker image after I SSH into the VM and download/config the project. Due to the nature of the project I cannot do this in the config file, it must be done by "freezing" the current system into an image. Is this possible? ...

Google App Engine: Unable to find 'increasing daily budget'


google-app-engine,payment
I can't find it. https://cloud.google.com/appengine/pricing talks about it but doesn't say where. This one says it's in the billing section, but the billing section lists my billing accounts and inside an account I can't find it either....

What is the equivalent of BlobstoreLineInputReader for targeting Google Cloud Storage?


python,google-app-engine,mapreduce,pipeline
This is a python appengine question, mapreduce library 1.9.21 . I have code writing lines to a blob in the local blobstore, then processing that using mapreduce BlobstoreLineInputReader. Given that the files api is going away, I thought I'd retarget all my processing to cloud storage. I would expect to...

viewing google app engine Python logging messages in CodeEnvy


python,google-app-engine,logging,cloud
I'm trying to move my GAE development to the cloud. So far Codeenvy has the richest toolset however I'm struggling with one small issue. when I use the python logging library I don't know where to view these messages! def post(self): self.response.write('Processing form data...') feedback = self.request.get('content') logging.info(feedback) I assumed...

GAE Managed VMs: Possible to use C-based Python libraries with standard runtime?


python,google-app-engine
I'm building a background module for my app in Python 2.7, but it needs to use C-based external libraries such as OpenCV. While GAE only "directly" supports pure Python libraries, I understand that using a managed VM removes that constraint. What I'm not quite clear on, after reading the documentation,...

GAE/P: Migrating to NDB efficiently


python,google-app-engine,app-engine-ndb
I'm finally upgrading from db to ndb (it is a much bigger headache than I anticipated...). I used a lot of ReferenceProperty and I've converted these to KeyProperty. Now, every place where I used a ReferenceProperty I need to add an explicit get because it was previously done for me...

No module named _mysql - Google App Engine & Django


python,mysql,django,google-app-engine
First of all I'm working on Mac (Yosemite). I've created a simple Django project with Google App Engine. I'm using Cloud SQL in production and MySQL in development environment as recommended in the docs. The project uses virtualenv on my dev machine of course. I can run the project with...

Trying to download a file using Dropbox Java API in the GAE


java,google-app-engine
I have an XML file on Dropbox that I want to access from my Google App Engine using the Dropbox Java API. After a bit of playing around I find the GAE doesn't support FileOutputStream. FileOutputStream outputStream = new FileOutputStream("myFile.txt"); try { DbxEntry.File downloadedFile = client.getFile("/myFile.txt", null, outputStream); System.out.println("Metadata: "...

Google Appengine - Entity class is not enhanced


google-app-engine
If I change an Entity class in a an appengine project in eclipse, in run time I get this error Found Meta-Data for [classpath] but this class is not enhanced!! Please enhance the class before running DataNucleus. Even when I undo the changes and re-run the local srv i get...

How to get a response for a streaming url on google app engine (python)


python,google-app-engine,urllib2,urlfetch
I am trying to verify if a online radio url is delivering music and if the url was redirected or not (this happens if for some reason the request url is wrong or not active). I found some advices here Fetching url in python with google app engine. However, for...

jquery google app engine


jquery,google-app-engine
I have an issue where the Javascript file that I have uploaded does not work. My code is below. app.yaml has: - url: /js static_dir: /js index.html has: <script type="text/javascript" src="/js/script.js"></script> script.js has: $(document).ready(function(){ $('img').click(function(){ $(this).fadeOut('slow'); }); $('p').click(function(){ $(this).fadeOut('slow'); }); alert("hi"); }); and not even the alert comes out...

GAE DOMDocument::load(): I/O warning : failed to load external entity


javascript,php,json,google-app-engine
I'm trying to move an existing webapp on GAE. At the moment the app is running on my local SDK. When the app perform a compatibility check, it returns an error (read by FIREBUG ): This is the code of the js who fails: function checkConfig(){ // Launch the configuration...

Google datastore multiple values for the same property


android,google-app-engine,gae-datastore,google-datastore
I am using Google Datastore for an Android application, the backend is written in Java. In one table, I want to set multiple values to the same property: Entity newGroup = new Entity("group"); newGroup.setProperty("member", "A"); newGroup.setProperty("member", "B"); newGroup.setProperty("member", "C"); datastore.put(newGroup); I then want to query to find all groups a...

wercker.yml in a subdirectory


continuous-integration,wercker
having a Bitbucket repository, there is a project in a subdirectory that should be built. I'd like to have the wercker.yml in this subdirectory as well. I tried to add an environment variable WERCKER_ROOT to the pipeline containing the subdirectory: /here-is-werckerfile, according to wercker devcenter which seemed to have no...