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

add drone-teams plugin #289

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions content/jdamata/drone-teams/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
date: 2012-09-02T00:00:00+00:00
title: Teams
author: jdamata
tags: [ teams ]
logo: teams.svg
repo: jdamata/drone-teams
image: jdamata/drone-teams
---

The Teams plugin posts build status messages to your channel. The below pipeline configuration demonstrates simple usage:

```yaml
steps:
- name: teams
image: jdamata/drone-teams
settings:
webhook: <WEBHOOK ENDPOINT>
when:
status:
- failure
- success
```

Example configuration with webhook sourced from a secret:

```yaml
steps:
- name: teams
image: jdamata/drone-teams
settings:
webhook:
from_secret: teams_webhook
when:
status:
- failure
- success
```

Example configuration for pipeline start and pipeline finish messages:

```yaml
steps:
- name: pipeline-start
image: jdamata/drone-teams
settings:
webhook: <WEBHOOK ENDPOINT>
status: "building"
...

- name: pipeline-end
image: jdamata/drone-teams
settings:
webhook: <WEBHOOK ENDPOINT>
when:
status:
- failure
- success
```

Example configuration using global enviornment variables to define the webhook endpoint:

This is useful if you want to use different teams channels per branch. The env var must match ```${DRONE_BRANCH}_teams_webhook```

```yaml
environment:
develop_teams_webhook: <WEBHOOK ENDPOINT1>
master_teams_webhook: <WEBHOOK ENDPOINT2>

steps:
- name: pipeline-start
image: jdamata/drone-teams
settings:
status: "building"

...

- name: pipeline-end
image: jdamata/drone-teams
when:
status:
- failure
- success
```

# Parameter Reference

webhook
: teams channel webhook connector endpoint

status
: specify the teams card ActivitySubtitle. Defaults to failure or success depending on ${DRONE_BUILD_STATUS}

7 changes: 7 additions & 0 deletions static/logos/teams.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.