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

Unable to use Buildkite trigger #90

Open
alabeduarte opened this issue Dec 20, 2022 · 1 comment
Open

Unable to use Buildkite trigger #90

alabeduarte opened this issue Dec 20, 2022 · 1 comment

Comments

@alabeduarte
Copy link

Hi there 👋

First of all, thank you for this plugin, I have been looking for something similar for some time and it seems I just found it!

There is an issue I'd like to check with you is that I'm currently unable to use Buildkite trigger as it errors out due to the following:

`env` is not a valid property on the `trigger` step. Please check the documentation to get a full list of supported properties.

This seems similar to the issue #39 but what it seems to be the case with me is that even though I don't specify global any env, it tries to add to buildpipe generated yaml anyway.

Here's an example:

Given the dynamic pipeline below:

env:
  FOO: bar

projects:
  - label: "my-project"
    path:
      - internal/foo
    key: deploy
    trigger: "another-pipeline"
    build:
      env:
        BUILDPIPE_SCOPE: project

The result I get is the following:

  | [2022-12-20T04:44:49Z]   build:
  | [2022-12-20T04:44:49Z]     env:
  | [2022-12-20T04:44:49Z]       BUILDPIPE_SCOPE: project
  | [2022-12-20T04:44:49Z]   env:
  | [2022-12-20T04:44:49Z]     FOO: bar
  | [2022-12-20T04:44:49Z]   key: deploy
  | [2022-12-20T04:44:49Z]   label: 'my-project'
  | [2022-12-20T04:44:49Z]   trigger: another-pipeline

As you can see above, buildpipe is adding the key env to the same level as build, which is not supported.

Even if I remove the global environment variables, I get the same error as the env is still being added:

# no global env vars this time
projects:
  - label: "my-project"
    path:
      - internal/foo
    key: deploy
    trigger: "another-pipeline"
    build:
      env:
        BUILDPIPE_SCOPE: project

Output:

  | [2022-12-20T04:44:49Z]   build:
  | [2022-12-20T04:44:49Z]     env:
  | [2022-12-20T04:44:49Z]       BUILDPIPE_SCOPE: project
  | [2022-12-20T04:44:49Z]   env: {}
  | [2022-12-20T04:44:49Z]   key: deploy
  | [2022-12-20T04:44:49Z]   label: 'my-project'
  | [2022-12-20T04:44:49Z]   trigger: another-pipeline

As you can see above, the key env is being generated but it is empty (i.e. env: {}).


Let me know if this seems to be a legit issue or if I'm using the plugin wrong. Nevertheless, thank you for your work!

Cheers 🙏

@alabeduarte
Copy link
Author

I just realised there is an open PR: #84

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

No branches or pull requests

1 participant