{"id":20471756,"url":"https://github.com/signiant/weekly-build-scheduler","last_synced_at":"2026-05-27T13:39:00.805Z","repository":{"id":203439890,"uuid":"709608973","full_name":"Signiant/weekly-build-scheduler","owner":"Signiant","description":"A tool that adds a weekly build schedule to Bitbucket repositories associated with services listed in the Datadog  Service Catalog that are not actively being developed (aka no changes in the last week).","archived":false,"fork":false,"pushed_at":"2023-10-25T14:34:34.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-05T13:49:01.490Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Signiant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-25T03:11:17.000Z","updated_at":"2023-10-25T13:35:15.000Z","dependencies_parsed_at":"2023-10-25T15:03:30.368Z","dependency_job_id":null,"html_url":"https://github.com/Signiant/weekly-build-scheduler","commit_stats":null,"previous_names":["signiant/bob-the-builder","signiant/weekly-build-scheduler"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Signiant/weekly-build-scheduler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fweekly-build-scheduler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fweekly-build-scheduler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fweekly-build-scheduler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fweekly-build-scheduler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Signiant","download_url":"https://codeload.github.com/Signiant/weekly-build-scheduler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fweekly-build-scheduler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33568857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-11-15T14:17:10.026Z","updated_at":"2026-05-27T13:39:00.769Z","avatar_url":"https://github.com/Signiant.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weekly Build Scheduler\n\nA tool that adds a weekly build schedule to Bitbucket repositories associated with services listed in the Datadog \nService Catalog that are not actively being developed (aka no changes in the last week).\n\nAn AWS CloudFormation template is included in this repository to facilitate the automation of this script's execution \nthrough the use of an AWS Lambda function.\n\n## Requirements\n\nAlongside **Python 3.11+**, the following packages must be installed to run this tool:\n- boto3\n- requests\n- datadog-api-client\n\nAdditionally, you need to have both AWS CLI \u0026 AWS SAM CLI installed and configured. The following guides provide \ndetailed instructions on how to do so:\n1. [Install or update the latest version of the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)\n2. [Set up the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html)\n3. [Installing the AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html)\n\n## Setup\n\nWhether you plan to run the script locally or to deploy a Lambda function, you must do these four things:\n\n1. Clone this repository.\n2. Create app pass/keys with the following scopes:\n   - Bitbucket Pass: repository, pipeline:write\n   - Datadog Key: apm_service_catalog_read\n3. Set environment variables:\n   1. BB_APP_PASS\n   2. BB_USER_ID\n   3. DD_API_KEY\n   4. DD_APP_KEY\n4. Set values specific to your use case for the two global variables found at the top of weekly_build_scheduler.py.\n\n### Local Execution\n\n1. Install dependencies:  \n`python -m pip install -r requirements.txt`\n2. In the same directory as the script, execute the provided command:  \n`python -m weekly_build_scheduler`\n\n#### Run Examples\n\n- Run script and process all services in the Datadog Service Catalog  \n`python -m weekly_build_scheduler`\n- Run script and process all services in the Datadog Service Catalog , but ignore services with Bitbucket repositories \nwhose names begin with \"media\"  \n`python -m weekly_build_scheduler --override media*`\n- Run script and process only dummy repos (i.e. dummy-tool, dummy-tool-2, dummy-tool-3)  \n`python -m weekly_build_scheduler --repositories dummy-tool dummy-tool-2 dummy-tool-3`\n- Run script with more detailed logs  \n`python -m weekly_build_scheduler --verbose`\n\n### Lambda Deployment (Using SAM CLI)\n\n1. Set a schedule in cron format as well as a description for the Lambda event in the template.yaml file.\n2. Build the .aws-sam directory:  \n`sam build`\n3. Deploy one of two versions of this Lambda:  \n   - To deploy the dev version (unscheduled):  \n   `sam deploy --stack_name TEXT -- s3-bucket TEXT --s3-prefix TEXT --region TEXT --parameter-overrides \n   \"AppName=weekly-build-scheduler-dev EnvName=dev DryRun=true BBAPPPASS=$BB_APP_PASS BBUSERID=$BB_USER_ID DDAPIKEY=$DD_API_KEY \n   DDAPPKEY=$DD_APP_KEY\"`\n   - To deploy the prod version (scheduled):  \n   `sam deploy --stack_name TEXT -- s3-bucket TEXT --s3-prefix TEXT --region TEXT --parameter-overrides \n   \"AppName=weekly-build-scheduler-prod EnvName=prod BBAPPPASS=$BB_APP_PASS BBUSERID=$BB_USER_ID DDAPIKEY=$DD_API_KEY \n   DDAPPKEY=$DD_APP_KEY\"`\n4. (Optional) *Create an AWS SAM CLI config file to skip entering the arguments in the previous step every time you want to \ndeploy. Learn more about that \n[here](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html).*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigniant%2Fweekly-build-scheduler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigniant%2Fweekly-build-scheduler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigniant%2Fweekly-build-scheduler/lists"}