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

Support standalone triggers #84

Closed
n1cholasgeorge opened this issue Jun 22, 2022 · 2 comments
Closed

Support standalone triggers #84

n1cholasgeorge opened this issue Jun 22, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@n1cholasgeorge
Copy link

Hi,

Is there any chance we might see support for pipeline triggers that are defined outside of the codefresh_pipeline block?

Being able to do something like this would be wonderful:

resource "codefresh_trigger" "my_trigger" {
    branch_regex  = "/.*/gi"
    context            = "git"
    description      = "Trigger for tags"
    disabled           = false
    events              = [
      "push.tags"
    ]
    modified_files_glob = ""
    commit_status_title = "tags-trigger"
    name                = "tags"
    provider            = "github"
    repo                = "codefresh-contrib/react-sample-app"
    type                = "git"
}

resource "codefresh_trigger_attachment" "my_trigger_attachment" {
    trigger_id  = codefresh_trigger.my_trigger.id
    pipeline_id = codefresh_pipeline.my_pipeline.id
}

Cheers

@korenyoni
Copy link
Contributor

korenyoni commented Sep 14, 2022

As of #39 (comment) standalone triggers are planned (in an upcoming minor release — 0.1.0).

However, there is no need for an attachment resource. Your proposal is probably inspired by IAM policy attachments, but really, the trigger just needs a pipeline ID and that's it.

@korenyoni korenyoni added the enhancement New feature or request label Sep 14, 2022
korenyoni added a commit that referenced this issue Oct 3, 2022
## What

* Add resource for Pipeline Cron Trigger
* Fix Terraform Acceptance tests
* Add Acceptance Tests to CI
* Add release automation (release drafter, labeler, automatic changelog
drafting)
* GH Repo best practices (PULL_REQUEST_TEMPLATE, CODEOWNERS, etc)
* Misc documentation fixes

## Why

* Only git triggers are currently supported.
* Triggers should be a standalone resource. The next minor release
(`0.2.0`) will support remaining standalone triggers (registry, helm,
git).

## Notes

* Closes #39 
* Closes #88
* #84

Co-authored-by: Yonatan Koren <10080107+korenyoni@users.noreply.github.com>
Co-authored-by: korenyoni <korenyoni@users.noreply.github.com>
@korenyoni
Copy link
Contributor

Please see #39 (comment)

Unfortunately the API used for these standalone triggers is being deprecated and we are moving towards inline blocks for them instead 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants