Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
0

Send Firebase notifications cf-firebase-messaging

Send notification messages to Firebase.

arguments

  • FIREBASE_MESSAGE_DATA - Data in json format
  • FIREBASE_MESSAGE_TOPIC - Topic for sending messages
  • FIREBASE_NOTIFICATION - Notification with properties 'title' and 'body' in json format
  • FIREBASE_REGISTRATION_TOKENS - Firebase registration tokens
  • FIREBASE_REGISTRATION_TOKENS_URL - Url for getting firebase registration tokens
  • FIREBASE_SERVICE_ACCOUNT_KEY_JSON - Service account token json from firebase console (should be passed through env variabli)
    send-message:
  title: Send firebase notification
  type: firebase-messaging
  arguments:
    FIREBASE_MESSAGE_TOPIC: test
    FIREBASE_REGISTRATION_TOKENS: |-
      [
        "AldineoDI2Ldio....",
        "AldineoDI2Ldio....",
      ]
    FIREBASE_MESSAGE_DATA: |-
      {
          "test": "test"
      }
    FIREBASE_NOTIFICATION: |-
      {
          "title": "test",
          "body": "test"
      }

  
github.com
Yaroslav Drachenko
Jul 4, 2021