drone-openapi

command module
v0.0.0-...-b868d78 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

README

drone-openapi

Build Status

Publish Open API spec files from a Drone pipeline.

Overview

This plugin accepts a team name along with a valid Open API spec file or directory of files, and it will post the given information to the given uploader_url.

Drone versions

This plugin supports Drone 1.0+.

The example below is for secrets in the Drone 1.0+ format, where the GCP Service Account json must be passed to the GOOGLE_CREDENTIALS parameter in .drone.yml as an environment variable.

Usage

Basic example config to publish the swagger.yaml spec file under the kids team

  - name: publish-openapi
    image: nytimes/drone-openapi
    settings:
      uploader_url: https://apis.nyt.net/update
      spec: swaggerui/swagger.yaml
      team: kids
    environment:
      GOOGLE_CREDENTIALS:
        from_secret: GOOGLE_CREDENTIALS
    when:
      event:
      - push
      branch:
      - main

To publish all yamls in a given directory, specify a specs_dir with your yamls within it:

  - name: publish-openapi
    image: nytimes/drone-openapi
    settings:
      uploader_url: https://apis.nyt.net/update
      specs_dir: swaggerui/
      team: kids
    environment:
      GOOGLE_CREDENTIALS:
        from_secret: GOOGLE_CREDENTIALS
    when:
      event:
      - push
      branch:
      - main

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL