Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@woodpecker-ci/plugin

anbraten260Apache-2.00.2.0TypeScript support: included

Utilities to create a Woodpecker-CI typescript / javascript plugin.

woodpecker, woodpecker-ci, plugin, ci

readme

ts-plugin

Utilities to create a Woodpecker-CI typescript / javascript plugin.

Creating plugin

import { runPlugin } from '@woodpecker-ci/plugin';

runPlugin({
  meta: {
    name: 'my-plugin',
    version: '1.0.0',
    description: 'My plugin description',
  },
  settings: {
    name: {
      type: 'string',
      description: 'Your name',
      required: true,
    },
    friendly: {
      type: 'boolean',
      description: 'Use friendly greeting',
    },
  },
  async run({ settings }) {
    console.log(`${settings.friendly ? 'Hi' : 'Greetings'} ${settings.name}!`);
  },
});

Use it in Woodpecker-CI

steps:
  - image: your-image
    name: my-plugin
    settings:
      name: John
      friendly: true