Skip to content
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

Do not append yaml file to args if Action is a gcloudGroup #68

Merged
merged 1 commit into from
Feb 17, 2021

Conversation

brianfoshee
Copy link
Contributor

@brianfoshee brianfoshee commented Jan 14, 2021

Actions like gcloud app services list will fail with the addition of a
yaml file argument because it's arbitrary and unnecessary.

Use case:
I am trying to use gcloud app services set-traffic but I see the error:

ERROR: (gcloud.app.services.list) unrecognized arguments: ./app.yaml 

The command is configured properly with the exception of the app.yaml arg:

Running Command: gcloud app services set-traffic ./app.yaml MY_SERVICE --project MY_PROJECT --quiet --migrate --splits MY_COMMIT_SHA=1

Drone step is setup as follows:

- name: migrate-traffic
  pull: if-not-exists
  image: nytimes/drone-gae
  settings:
    action: services
    sub_commands: set-traffic
    addl_flags:
    - --migrate
    - --splits ${DRONE_COMMIT_SHA:0:8}=1
    project: MY_PROJECT
    service: MY_SERVICE
  environment:
    GAE_CREDENTIALS:
      from_secret: MY_CREDENTIALS
  when:
    event:
    - tag

None of the help docs for the commands in gcloudGroup point to the use of a yaml file so this should not break anything.

$ gcloud help app services
$ gcloud help app instances
$ gcloud help app versions

Actions like `gcloud app services list` will fail with the addition of a
yaml file argument because it's arbitrary and unnecessary.
@brianfoshee brianfoshee requested a review from tonglil January 14, 2021 22:52
@brianfoshee brianfoshee requested a review from a team as a code owner January 14, 2021 22:52
@brianfoshee brianfoshee merged commit 7e7ff45 into master Feb 17, 2021
@brianfoshee brianfoshee deleted the no-yaml-file-if-group branch February 17, 2021 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants