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

convert message to adaptive cards with colored headers #43

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

jbsil
Copy link
Contributor

@jbsil jbsil commented Sep 7, 2023

related to #25

  • put the structure of the adaptive card into a .jq template file. you can use https://adaptivecards.io/designer/ to adjust the "content" section visually.
  • the header of the card is visually distinct, if we can find a descriptive word in either the provided title or text content.
    • you can override this by passing a style param
  • pulled the Dockerfile apt-gets into separate, earlier, RUN statement to take better advantage of docker build caching (for faster iterations).

@jbsil jbsil marked this pull request as ready for review September 7, 2023 19:13
@jbsil
Copy link
Contributor Author

jbsil commented Sep 7, 2023

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

@navicore navicore merged commit d13f9aa into navicore:main Sep 7, 2023
@jbsil jbsil deleted the adaptive_cards branch September 7, 2023 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants