This is a cronjob that sends SMS messages from Alma
It runs on the Kubernetes Cluster
The configuration for this cronjob is in the alma-utilies-kube repository
- Clone the repository
- Copy
.env-example
to.env
cp .env-example .env
-
Set the
BUNDLE_RUBYGEMS__PKG__GITHUB__COM
env var to your Github Personal Acess token with package:read scope -
Build the image
docker-compose build
- Bundle install the gems
docker-compose run --rm web bundle install
- Set up the ssh keys
./set_up_development_ssh_keys.sh
- Set up the sftp folders
./set_up_sms_dir.sh
- Run the test script that doesn't send any SMS messages
docker-compose run --rm web bundle exec ruby send-alma-sms.rb --nosend
To actually send SMS messages you'll need to:
- Change the twilio values in
.env
to real twilio values - Run the
send-alma-sms.rb
without the--nosend
flag. (But still with the--nosftp
)
To run the test suite:
docker-compose run --rm web bundle exec rspec
Tests are run in github actions after every push to github.