Skip to content

Spine-based Google Chat bot that monitors the build statuses of Spine repositories and notifies the developers via Google Chat.

License

Notifications You must be signed in to change notification settings

SpineEventEngine/chat-bot

Repository files navigation

Build Status   license

Spine ChatBot

The ChatBot application is a Spine-based Google Chat bot that monitors the build statuses of Spine repositories and notifies the developers via the Google Chat.

Prerequisites

Build

In order to build the application, run:

./gradlew clean build

Also, it is possible to build a Docker image using jib:

./gradlew clean build jib

Running locally

It is possible to run the application as a docker image locally. In order to do that, please make sure you have saved the appropriate GCP credentials at .credentials/gcp-adc.json.

Then run the following script from the repository root folder:

export APP_PORT=8080
export LOCAL_PORT=9090
export CONTAINER_CREDENTIALS_PATH="/tmp/keys/gcp-adc.json"
export LOCAL_CREDENTIALS_PATH="${PWD}/.credentials/gcp-adc.json"
export GCP_PROJECT_ID="spine-chat-bot"
docker run \
    --tty \
    --rm \
    -p "${LOCAL_PORT}:${APP_PORT}" \
    -e "PORT=${APP_PORT}" \
    -e "MICRONAUT_SERVER_PORT=${APP_PORT}" \
    -e "GOOGLE_APPLICATION_CREDENTIALS=${CONTAINER_CREDENTIALS_PATH}" \
    -e "GCP_PROJECT_ID=${GCP_PROJECT_ID}" \
    -v "${LOCAL_CREDENTIALS_PATH}:${CONTAINER_CREDENTIALS_PATH}" \
    gcr.io/${GCP_PROJECT_ID}/chat-bot-server

The application will be available at 127.0.0.1:${LOCAL_PORT} (e.g. 127.0.0.1:9090). Locally-supplied GCP credentials are mounted into the image directly.

For detailed Application Default Credentials (ADC) guide for Docker see example Cloud Run guide.

Running in the Cloud

The application is deployed in the Google Cloud Platform cloud, and the overview of the cloud deployment is available in a separate document.

About

Spine-based Google Chat bot that monitors the build statuses of Spine repositories and notifies the developers via Google Chat.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks