#codefresh (2020-12)

codefresh

Archive: https://archive.sweetops.com/codefresh/

2020-12-15

chris avatar
chris

I searched the archives but couldn’t find anything, so hopefully this isn’t a duplicate. I am trying to post to slack for preview environments but can’t seem to get the url to be clickable. I think if the scheme was included then slack would show it as a link. I tried adding the APP_HOST ENV variable but it doesn’t seem to have an effect.

Any suggestings besides forking build-harness?

Here is my codefresh step

send_slack_notification:
    title: Send notification to Slack channel
    stage: Deploy
    image: cloudposse/build-harness:0.46.0
    working_directory: /build-harness
    environment:
      - GIT_COMMIT_SHORT=${{CF_SHORT_REVISION}}
      - GIT_COMMIT_URL=${{CF_COMMIT_URL}}
      - GIT_COMMIT_MESSAGE=${{CF_COMMIT_MESSAGE}}
      - GIT_COMMIT_AUTHOR=${{CF_COMMIT_AUTHOR}}
      - GIT_BRANCH_TAG=${{CF_BRANCH_TAG_NORMALIZED}}
      - APP_HOST=${{APP_SCHEME}}://${{APP_HOST}}
    commands:
    - make codefresh/notify/slack/deploy/webapp GIT_COMMIT_TIMESTAMP=$((${{CF_BUILD_TIMESTAMP}}/1000))
    when:
      condition:
        any:
          deployLabel: "match('${{CF_PULL_REQUEST_LABELS}}', 'deploy', false) == true"
chris avatar
chris
12:37:44 AM
    keyboard_arrow_up