navicore / teams-notification-resource

for Concourse CI notifications on Microsoft Teams
MIT License
32 stars 33 forks source link

convert message to adaptive cards with colored headers #43

Closed jbsil closed 10 months ago

jbsil commented 10 months ago

related to #25

jbsil commented 10 months ago

example config:

    on_failure:
      do:
      - put: teams-prs
        attempts: 3
        params:
          title: FAILED - [pipeline or job name] - $BUILD_JOB_NAME for ((.:pr.title))
          text: pr build failed!
          actionName: View Pipeline
          actionTarget: https://my.concourse.url/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
    on_success:
      do:
      - put: teams-prs
        attempts: 3
        params:
          title: PASSED - [pipeline or job name] - $BUILD_JOB_NAME for ((.:pr.title))
          text: pr build passed!
          actionName: View Pipeline
          actionTarget: https://my.concourse.url/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME

and the results: Screenshot 2023-09-07 at 3 31 52 PM Screenshot 2023-09-07 at 3 33 46 PM