Pipeline specification triggers fail to verify

Hello,

I’m setting up my first CodeFresh pipeline using a specification and cannot get the GiHub trigger to verify. The portal notes that it Failed to add Trigger to GITHUB.

If I use the codefresh cli, I get the following error:

Error: "{\"status\":500,\"code\":\"1001\",\"name\":\"INTERNAL_SERVER_ERROR\",\"message\":\"Failed to run pipeline\",\"context\":{}}"

Here’s my trigger definition:

  triggers:
  - name: "push-to-master"
    branchRegex: "/master/gi"
    branchRegexInput: "regex"
    commentRegex: "/.*/gi"
    description: "Trigger on Push to Master"
    events:
    - "push.heads"
    modifiedFilesGlob: "{awesome/src/**,awesome/src/!(*.md)}"
    provider: "github"
    pullRequestAllowForkEvents: false
    repo: "ficticious-company/lots-of-awesome"
    type: "git"

When I add a trigger via the portal, it verifies successfully but the configuration appears to be identical. Any ideas?

Thanks in advance.

As it turns out, the trigger needs to have additional fields, like this:

  triggers:
  - name: "push-to-master"
    branchRegex: "/master/gi"
    branchRegexInput: "regex"
    commentRegex: "/.*/gi"
    context: "github"
    contexts: []
    disabled: false
    events:
    - "push.heads"
    modifiedFilesGlob: '{awesome/src/**, awesome/src/!(*.md)}'
    options:
      noCache: false
      noCfCache: false
      resetVolume: false
    provider: "github"
    pullRequestAllowForkEvents: false
    repo: "ficticious-company/lots-of-awesome"
    type: "git"

Hey, thanks for the heads up! Appreciate the detail. I’ll see if w can’t add this to the docs. :slight_smile:

I’ve not tested the negative glob, but it appears to match the upstream glob specification. Before you document it that way, you might need to double check it all yourself.