Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

"deploy" Goal does not cover queues #143

Closed
NicolaSpreafico opened this issue Mar 1, 2017 · 12 comments
Closed

"deploy" Goal does not cover queues #143

NicolaSpreafico opened this issue Mar 1, 2017 · 12 comments

Comments

@NicolaSpreafico
Copy link

NicolaSpreafico commented Mar 1, 2017

Hi,
I have a Java Maven-based project with the following file system
image

I noticed that the goal com.google.cloud.tools:appengine-maven-plugin:deploy only deploy the application, the queue.xml is not handled. I discovered this because I created a new queue but during the deploy procedure the queue has been not created online (and I got an error for queue not defined)

Is there an additional configuration required in order to deploy all the files? (application, queues, crons, ...)

The strange thing is that inside the staging directory i can see appengine-staging/queue.yaml, in addition to the original file appengine-staging/WEB-INF/queue.xml

At the end in order to deploy the updated queue file I used the com.google.appengine:appengine-maven-plugin:update_queues goal with the previous App Engine Maven plugin

@patflynn
Copy link
Contributor

patflynn commented Mar 1, 2017

@NicolaSpreafico Sorry for the inconvenience. We will be introducing similar goals for this Maven plugin soon.

In the mean time you can add the appengine-staging/queue.yaml to your list of deployables in your plugin config. (you'll also need to add the generated app.yaml if you want to deploy the application with it).

@patflynn patflynn closed this as completed Mar 1, 2017
@NicolaSpreafico
Copy link
Author

@patflynn Thank you, I understand from the documentation that I need to use the deployables parameter.

Reading other issue like:

<plugin>
    <groupId>com.google.cloud.tools</groupId>
    <artifactId>appengine-maven-plugin</artifactId>
    <version>${appengine.maven.plugin.version}</version>
    <configuration>
        <deploy.project>${app.id}</deploy.project>
        <deploy.version>${app.version}</deploy.version>
        <deploy.promote>False</deploy.promote>
        <stage.enableJarClasses>true</stage.enableJarClasses>
        <stage.stagingDirectory>${java.io.tmpdir}/appengine-staging</stage.stagingDirectory>
        <deployables>
            <param>${java.io.tmpdir}/appengine-staging/app.yaml</param>
            <param>${java.io.tmpdir}/appengine-staging/cron.yaml</param>
            <param>${java.io.tmpdir}/appengine-staging/queue.yaml</param>
            <param>${java.io.tmpdir}/appengine-staging/index.yaml</param>
        </deployables>
    </configuration>
</plugin>

Please note that the stagingDirectory parameter was already there, I configured the deployables param to follow that configuration.

I like very much the possibility of deploying ONLY the application and not the related files (cron, queue, ...) which with the previous deploy procedure was not possibile. You could the deploy only the queue/cron but not only the app. I also tried, as an example, to remove the app.yaml from the deploy and it works as well.

[INFO] GCLOUD: You are about to update the following configurations:
[INFO] GCLOUD: Updating config [cron]...
[INFO] GCLOUD: done.
[INFO] GCLOUD: Updating config [queue]...
[INFO] GCLOUD: done.
[INFO] GCLOUD: Updating config [index]...
[INFO] GCLOUD: done.
[INFO] GCLOUD: 
[INFO] GCLOUD: Cron jobs have been updated.
[INFO] GCLOUD: 
[INFO] GCLOUD: Task queues have been updated.

Now that I successfully configured the Maven plugin I can choose file per file to deploy.
I can comment and uncomment the param lines in order to deploy only the proper files (which is not very comfortable but at least can be done).

@patflynn
Copy link
Contributor

patflynn commented Mar 2, 2017 via email

@boogie4eva
Copy link

This doesn't work for cloud endpoints projects

@patflynn
Copy link
Contributor

patflynn commented Mar 6, 2017

@boogie4eva deploying indexes and the app doesn't work for endpoints projects?

@loosebazooka
Copy link
Contributor

@boogie4eva do you mean it's not deploying your endpoints config?

@NicolaSpreafico
Copy link
Author

@patflynn @loosebazooka
Basing on the SO question that brought @boogie4eva here, I understand that the problem was not specific to the Cloud Endpoints per se but to the 1.2.0 plugin version that I reported here

@patflynn
Copy link
Contributor

patflynn commented Mar 6, 2017

@loosebazooka @meltsufin this issue seems pretty critical. What do you guys thinking about doing a fix release for gradle/maven ASAP?

@loosebazooka
Copy link
Contributor

loosebazooka commented Mar 6, 2017

maven fix is going out the door, this doesn't affect gradle. I mean #144

@depsypher
Copy link

Was this fixed? We're using v1.2.1 and deploy doesn't seem to update queues.xml for us.

@loosebazooka
Copy link
Contributor

@depsypher the issue in this bug is fixed. If nothing in this issue works please open a new bug with your specific issue.

@boogie4eva
Copy link

boogie4eva commented Mar 18, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants