{"id":39075521,"url":"https://github.com/cloud-gov/buildpack-notify","last_synced_at":"2026-01-17T18:26:23.212Z","repository":{"id":38025740,"uuid":"100531140","full_name":"cloud-gov/buildpack-notify","owner":"cloud-gov","description":"Proactively encouraging cloud.gov customers to restage their apps so they can benefit from buildpack updates.","archived":false,"fork":false,"pushed_at":"2025-11-25T21:45:39.000Z","size":4950,"stargazers_count":4,"open_issues_count":1,"forks_count":4,"subscribers_count":10,"default_branch":"main","last_synced_at":"2026-01-14T17:36:58.678Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloud-gov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-08-16T20:45:30.000Z","updated_at":"2025-11-25T21:45:42.000Z","dependencies_parsed_at":"2025-04-17T14:43:22.840Z","dependency_job_id":"268085fb-445c-44f5-bc3e-df46c39f11df","html_url":"https://github.com/cloud-gov/buildpack-notify","commit_stats":null,"previous_names":["18f/cg-buildpack-notify","cloud-gov/buildpack-notify","cloud-gov/cg-buildpack-notify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cloud-gov/buildpack-notify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fbuildpack-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fbuildpack-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fbuildpack-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fbuildpack-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloud-gov","download_url":"https://codeload.github.com/cloud-gov/buildpack-notify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fbuildpack-notify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28515468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T17:57:59.192Z","status":"ssl_error","status_checked_at":"2026-01-17T17:57:52.527Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-17T18:26:23.119Z","updated_at":"2026-01-17T18:26:23.196Z","avatar_url":"https://github.com/cloud-gov.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cg-buildpack-notify\n\nEncouraging cloud foundry customers to restage their apps so they can benefit from buildpack updates.\n\n---\n\n## Notification logic \n\nThe application will look at all the system buildpacks (i.e. result of `cf buildpacks`) and look at the time stamp of\nwhen it was last updated. It will find all the applications using the system buildpacks and look at the last updated\ntime stamp and compare it with the last updated time stamp of the buildpack the application is using. If the application\nwas last updated before buildpack was updated, it will queue all the space managers and space developers to receive an\ne-mail about that application. To prevent users from receiving multiple e-mails, all the applications in violation are\ngrouped per user so that the user receives one e-mail notifying them about all of the applications instead of an\ne-mail per application. After the notifications are sent out, the buildpack version metadata (GUID and last updated time) is\nstored in the state. By storing that data, notifications won't be sent out again when the cron job runs unless the buildpack\nis updated by system admins again.\n\n## Credentials\n\nEmail:\n- `SMTP_FROM`: The email-address that will be in the From field in the e-mail. e.g. `test@example.com` or `Me \u003ctest@example.com\u003e`\n- `SMTP_HOST`: The SMTP host to authenticate with. e.g. `smtp.host.com`\n- `SMTP_PASS`: The password to authenticate with. e.g. `somepassword`\n- `SMTP_PORT`: The SMTP port to connect to. e.g. `587`\n- `SMTP_USER`: The username to authenticate with. e.g. `someuser@example.com`\n\nCF API:\n- `CF_API`: \"https://api.local.pcfdev.io\",\n- `CLIENT_ID`: \"client-id-here\",\n- `CLIENT_SECRET`: \"client-secret-here\"\n\nThe client mentioned above should be created with the following attributes:\n- `authorities`: `cloud_controller.global_auditor`\n- `authorized_grant_types`: `client_credentials`\n\nAn example of creating the client with `uaac` can be seen below for local purposes but it is recommended\nthat you add the client to your Cloud Foundry deployment YAML for production.\n\n## Development\n\n### Requirements\n\n- Go v1.17+\n- PCFDev (optional)\n- Docker \u0026 Docker-Compose (for integration tests)\n\n### Setup\n\n1. Download Go dependencies\n\n```sh\ngo get\n```\n\n2. Setup UAA Client on PCFDev's UAA\n```sh\nuaac target https://uaa.local.pcfdev.io --skip-ssl-validation \u0026\u0026 \\\nuaac token client get admin -s \"admin-client-secret\" \u0026\u0026 \\\nuaac client delete buildpack-notify; \\\nuaac client add buildpack-notify \\\n--authorities=\"cloud_controller.global_auditor\" \\\n--authorized_grant_types \"client_credentials\" -s \"notarealsecret\"\n```\n\n### Unit Tests\n\nYou can run tests with: `go test`. Template tests compare test output against pre-rendered templates that are included in version control. To update pre-rendered templates, run tests with `OVERRIDE_TEMPLATES=1`.\n\n### Integration Tests\n\nThese tests provide a good idea of how everything will work once in use. You should run these before pushing your code upstream.\n\nIntegration Tests can be found in the `integration` folder\n\nIf you want to run it locally with `pcfdev` and `docker`:\n`docker-compose up -d \u0026\u0026 TEST_PASS=\"notarealpass\" SMTP_FROM=\"no-reply@cloud.gov\" SMTP_PASS=\"\" SMTP_PORT=\"2525\" SMTP_USER=\"\" SMTP_HOST=\"localhost\" CF_API=\"https://api.local.pcfdev.io\" CLIENT_ID=\"buildpack-notify\" CLIENT_SECRET=\"notarealsecret\" INSECURE=\"1\" CF_USER=\"admin\" CF_PASS=\"admin\" CF_API_SSL_FLAG=\"--skip-ssl-validation\" DATABASE_URL=\"postgres://postgres:@localhost:5555/postgres?sslmode=disable\" ./integration/test.sh`\n\nYou can check out the e-mail by navigating to http://localhost:8025\n\nNext steps: Run this after deploy to each environment instead of locally.\n\n---\n\n## Contributing\n\nSee [CONTRIBUTING](CONTRIBUTING.md) for additional information.\n\n## Public domain\n\nThis project is in the worldwide [public domain](LICENSE.md). As stated in [CONTRIBUTING](CONTRIBUTING.md):\n\n\u003e This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the [CC0 1.0 Universal public domain dedication](https://creativecommons.org/publicdomain/zero/1.0/).\n\u003e\n\u003e All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud-gov%2Fbuildpack-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloud-gov%2Fbuildpack-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud-gov%2Fbuildpack-notify/lists"}