Skip to main content
Plugins / Trigger

Trigger

by Woodpecker Authors
Website
woodpeckertriggerpipeline

Plugin to trigger manual or deployment pipelines of a repository.


Woodpecker CI plugin to trigger a manual or deployment pipeline of another repository. This plugin is a fork of drone-plugins/drone-downstream.

Features

  • Trigger one or multiple pipelines
  • Trigger as manual or deployment pipeline
  • Pass variables to pipelines

Settings

Settings Name Default Description
server current server Woodpecker CI server URL to call
token none Woodpecker CI API token for server
repositories none Repository names to trigger pipelines for
deploy none The environment to deploy to (if not set / empty, triggers a manual pipeline)
params none List of params (key=value or file paths of params) to pass to triggered pipelines
params-from-env none List of environment variables to pass to triggered pipelines
wait false To wait for any currently running pipeline to finish
timeout 60s How long to wait on any currently running pipelines
last-successful false To trigger last successful pipeline

repositories

Multiple repositories whose pipelines need to be triggered can be provided. Also it's possible to provide specific branch to trigger can be specified with @ separator, ex. owner/repo@branch.

Examples

steps:
  name: trigger-downstream:
  image: woodpeckerci/plugin-trigger
  settings:
    repositories:
      - octocat/hello-world@master
      - octocat/sample
    token:
      from_secret: woodpecker_token
steps:
  - name: publish
    image: woodpeckerci/plugin-trigger
    settings:
      repositories:
        - octocat/hello-world
      deploy: production
      params:
        - DATABASE=prod
      wait: true
      token:
        from_secret: woodpecker_token
    when:
      branch: ${CI_REPO_DEFAULT_BRANCH}
      event: push