Dpl: GAE deploy multiple configs simultaneously

Created on 25 Jun 2018  ·  9Comments  ·  Source: travis-ci/dpl

I've got an issue that's relatively similar to https://github.com/travis-ci/dpl/issues/673 but for a different dpl provider.

I'd like to deploy both an app and an index.yaml file (for Datastore index config) via dpl, as mentioned here:
https://cloud.google.com/sdk/gcloud/reference/app/deploy

And in their example
gcloud app deploy ~/my_app/app.yaml ~/my_app/another_service.yaml

It looks like it's just these few lines would need changing:
https://github.com/travis-ci/dpl/blob/master/lib/dpl/provider/gae.rb#L64-L66
https://github.com/travis-ci/dpl/blob/master/lib/dpl/provider/gae.rb#L85

But my Ruby isn't that hot.

I'm currently doing the following:

      deploy:
        - provider: gae
          keyfile: my-project-id-key.json
          project: my-project-id
          skip_cleanup: true
          on:
            all_branches: true
        - provider: gae
          keyfile: my-project-id-key.json
          project: my-project-id
          config: index.yaml
          skip_cleanup: true
          on:
            all_branches: true

Which works, but means a lot of my config is needlessly repeated. I'd ideally like to just do something like this instead:

      deploy:
        provider: gae
        keyfile: my-project-id-key.json
        project: my-project-id
        config:
         - app.yaml
         - index.yaml
        skip_cleanup: true
        on:
          all_branches: true
important gae (Google App Engine)

Most helpful comment

I too stumbled over it after thinking it supported multiple deployables out-of-the-box and began getting build errors. Just fixed this in #849 and am awaiting the merge now.

All 9 comments

I just stumbled upon the same thing today. Would be nice to follow gcloud's own logic for the provider.

I too stumbled over it after thinking it supported multiple deployables out-of-the-box and began getting build errors. Just fixed this in #849 and am awaiting the merge now.

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

This hasn't been fixed and is still applicable.

It's blocked on testing/resolving this comment:
https://github.com/travis-ci/dpl/pull/849#issuecomment-421388516

I have changed the gae provider to accept multiple config paths in this PR https://github.com/travis-ci/dpl/pull/1067.

@peternewman @ain @AustinDizzy It would be great if you could try this out, and let me know on the PR.

I am going to close this issue here. Please feel free to re-open if needed.

I have changed the gae provider to accept multiple config paths in this PR #1067.

@peternewman @ain @AustinDizzy It would be great if you could try this out, and let me know on the PR.

I am going to close this issue here. Please feel free to re-open if needed.

Hi @svenfuchs ,

Thanks for this, what syntax should I be using? I've just tried:

          config:
           - app.yaml
           - index.yaml

And it doesn't work, I get this error:
https://travis-ci.org/peternewman/rdm-app/jobs/576206525#L1323-L1340
ERROR root (gcloud.app.deploy) [/home/travis/build/peternewman/rdm-app/[app.yaml, index.yaml]] does not exist.

Which looks like they're being passed in as an array still.

@peternewman it looks like you're using dpl v1. as mentioned on the PR you'd want to use the unreleased version v2. now that the branch has been merged that would be:

deploy:
  provider: gae
  edge:
    branch: master
⋮

does that work?

@peternewman it looks like you're using dpl v1. as mentioned on the PR you'd want to use the unreleased version v2.

Thanks @svenfuchs that appears to work fine (as in it's showed it's deployed an app and an index, the app bit has certainly updated, I haven't proved an index changed, but I imagine it's fine), I saw the PR had been merged but didn't realise master wasn't being deployed to live yet. I see it should be coming soon.

@peternewman whoops, missed your last comment here. glad to hear it's working for you 👍

yes, it's unusual for us that master is not currently also in production, but this is a pretty big release, so it will take a little while to get back to parity.

if you see any more issues with the GAE provider it would be best to open a new issue.

thanks for the feedback!

Was this page helpful?
0 / 5 - 0 ratings