Closed tswast closed 8 years ago
Not a bug... You did not configure correctly the default credential via gcloud auth login or Maybe the json file is in a different location than the default expected location which is: ~/.config/gcloud/application_default_credentials.json ?
Thanks. Note: gcloud auth login
gives a warning on a GCE instance. It gets credentials from the Metadata server, which is a bit different than other platforms.
I was able to work around this by copying a service account key to the instance and using the --service_account_json_key_file=PATH
argument to appcfg.
mvn clean appengine:update -Dappengine.additionalParams="--service_account_json_key_file=${HOME}/my-key.json" -Dap
pengine.appId=my-project -Dappengine.version=sometests
I still think googledefaultcredential should work on GCE OOB and find the correct info from the metadata server... Surprised it did not work!
On Fri, May 13, 2016 at 4:46 PM, Tim Swast notifications@github.com wrote:
Thanks. Note: gcloud auth login gives a warning on a GCE instance. It gets credentials from the Metadata server, which is a bit different than other platforms.
I was able to work around this by copying a service account key to the instance and using the --service_account_json_key_file=PATH argument to appcfg.
mvn clean appengine:update -Dappengine.additionalParams="--service_account_json_key_file=${HOME}/my-key.json" -Dap pengine.appId=my-project -Dappengine.version=sometests
— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub https://github.com/GoogleCloudPlatform/appengine-maven-plugin/issues/75#issuecomment-219184927
At the very least, it's a bug that there is no error message, right?
I filed a bug internally for this issue. I tested today on Cloud Shell, and --use_google_application_default_credentials
has the same issue there (no deploy, but no error message). No configuration should be necessary on Cloud Shell.
swast@tensile-octagon-135519:~/src/tensile-octagon-135519/java_gae_quickstart$ mvn clean appengine:update -Dappengine.additionalParams='--use_google_application_default_c
redentials' -Dappengine.appId=tensile-octagon-135519 -Dappengine.version=1
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building appengine-try-java 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ appengine-try-java ---
[INFO] Deleting /home/swast/src/tensile-octagon-135519/java_gae_quickstart/target
[INFO]
[INFO] >>> appengine-maven-plugin:1.9.38:update (default-cli) > package @ appengine-try-java >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ appengine-try-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/swast/src/tensile-octagon-135519/java_gae_quickstart/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ appengine-try-java ---
[INFO] Compiling 1 source file to /home/swast/src/tensile-octagon-135519/java_gae_quickstart/target/appengine-try-java/WEB-INF/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ appengine-try-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/swast/src/tensile-octagon-135519/java_gae_quickstart/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ appengine-try-java ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ appengine-try-java ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-war-plugin:2.3:war (default-war) @ appengine-try-java ---
[INFO] Packaging webapp
[INFO] Assembling webapp [appengine-try-java] in [/home/swast/src/tensile-octagon-135519/java_gae_quickstart/target/appengine-try-java-1.0]
[INFO] Processing war project
[INFO] Copying webapp webResources [/home/swast/src/tensile-octagon-135519/java_gae_quickstart/src/main/webapp/WEB-INF] to [/home/swast/src/tensile-octagon-135519/java_ga
e_quickstart/target/appengine-try-java-1.0]
[INFO] Copying webapp resources [/home/swast/src/tensile-octagon-135519/java_gae_quickstart/src/main/webapp]
[INFO] Building jar: /home/swast/src/tensile-octagon-135519/java_gae_quickstart/target/appengine-try-java-1.0/WEB-INF/lib/appengine-try-java-1.0.jar
[INFO] Webapp assembled in [174 msecs]
[INFO] Building war: /home/swast/src/tensile-octagon-135519/java_gae_quickstart/target/appengine-try-java-1.0.war
[INFO]
[INFO] <<< appengine-maven-plugin:1.9.38:update (default-cli) < package @ appengine-try-java <<<
[INFO]
[INFO] --- appengine-maven-plugin:1.9.38:update (default-cli) @ appengine-try-java ---
[INFO]
[INFO] Google App Engine Java SDK - Updating Application
[INFO]
[INFO] Retrieving Google App Engine Java SDK from Maven
[INFO] Updating Google App Engine Application
[INFO] Running -A tensile-octagon-135519 -V 1 --oauth2 --use_google_application_default_credentials update /home/swast/src/tensile-octagon-135519/java_gae_quickstart/target/appengine-try-java-1.0
swast@tensile-octagon-135519:~/src/tensile-octagon-135519/java_gae_quickstart$
On a fresh GCE instance with the Debian Jessie image, I ran the following commands:
It gives no error message, but it does not deploy either.
This is blocking our ability to do end-to-end tests of App Engine quickstart Java code samples from our Jenkins installation.
I have also tested with the latest SDK snapshot version with no luck.