Compare commits
	
		
			No commits in common. "0f45b3843276b9da993e95cb843db491e028ebbe" and "77ae214d24764eed2938b3a213e720fa5cbe40fd" have entirely different histories.
		
	
	
		
			0f45b38432
			...
			77ae214d24
		
	
		
					 68 changed files with 53 additions and 90 deletions
				
			
		
							
								
								
									
										4
									
								
								.env.local
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								.env.local
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | ||||||
|  | SERVICE_USER_POSTGRESQL=buildbot | ||||||
|  | SERVICE_PASSWORD_POSTGRESQL=changeme! | ||||||
|  | GITEA_URL=https://projects.blender.org | ||||||
|  | BUILDBOT_WEB_URL=http://localhost:8010/ | ||||||
							
								
								
									
										28
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							|  | @ -1,29 +1,3 @@ | ||||||
| # Hidden files |  | ||||||
| .venv | .venv | ||||||
| .env.production |  | ||||||
| .env.staging | .env.staging | ||||||
| 
 | .env.production | ||||||
| # Python |  | ||||||
| __pycache__ |  | ||||||
| *.py[cod] |  | ||||||
| Pipfile |  | ||||||
| Pipfile.lock |  | ||||||
| 
 |  | ||||||
| # Editors |  | ||||||
| *~ |  | ||||||
| *.swp |  | ||||||
| *.swo |  | ||||||
| *# |  | ||||||
| TAGS |  | ||||||
| tags |  | ||||||
| 
 |  | ||||||
| # Thumbnails |  | ||||||
| Thumbs.db |  | ||||||
| ehthumbs.db |  | ||||||
| Desktop.ini |  | ||||||
| .DS_Store |  | ||||||
| 
 |  | ||||||
| # Local patches and logs |  | ||||||
| *.patch |  | ||||||
| *.diff |  | ||||||
| *.log |  | ||||||
|  | @ -1,15 +0,0 @@ | ||||||
| # -*- python -*- |  | ||||||
| # ex: set filetype=python: |  | ||||||
| import importlib |  | ||||||
| import os |  | ||||||
| import sys |  | ||||||
| 
 |  | ||||||
| # Add the "config" directory to the Python path |  | ||||||
| sys.path.insert(0, os.path.join(os.path.dirname(__file__), "config")) |  | ||||||
| 
 |  | ||||||
| # Import the setup module from the "config" directory |  | ||||||
| import setup |  | ||||||
| importlib.reload(setup) |  | ||||||
| 
 |  | ||||||
| # Use the setup module as intended |  | ||||||
| BuildmasterConfig = setup.setup() |  | ||||||
|  | @ -27,5 +27,5 @@ def get_worker_password(worker_name: str) -> str: | ||||||
|     return "localhost" |     return "localhost" | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def get_worker_names(environment: str): | def get_worker_names(ENVIRONMENT: str): | ||||||
|     return _worker_names |     return _worker_names | ||||||
							
								
								
									
										8
									
								
								config/master.cfg
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								config/master.cfg
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | ||||||
|  | # -*- python -*- | ||||||
|  | # ex: set filetype=python: | ||||||
|  | import importlib | ||||||
|  | import os | ||||||
|  | import sys | ||||||
|  | import setup | ||||||
|  | importlib.reload(setup) | ||||||
|  | BuildmasterConfig = setup.setup() | ||||||
|  | @ -31,7 +31,7 @@ importlib.reload(conf.worker) | ||||||
| importlib.reload(gitea.blender) | importlib.reload(gitea.blender) | ||||||
| importlib.reload(pipeline) | importlib.reload(pipeline) | ||||||
| 
 | 
 | ||||||
| environment = os.environ.get("BUILDBOT_environment", default="LOCAL") | ENVIRONMENT = os.environ.get("ENVIRONMENT", default="LOCAL") | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def setup() -> Dict[str, Any]: | def setup() -> Dict[str, Any]: | ||||||
|  | @ -43,7 +43,7 @@ def setup() -> Dict[str, Any]: | ||||||
| 
 | 
 | ||||||
|     # Workers |     # Workers | ||||||
|     print("*** Creating platform workers") |     print("*** Creating platform workers") | ||||||
|     platform_worker_names = conf.machines.fetch_platform_worker_names(environment) |     platform_worker_names = conf.machines.fetch_platform_worker_names(ENVIRONMENT) | ||||||
|     workers: List[buildbot.plugins.worker.Worker] = [] |     workers: List[buildbot.plugins.worker.Worker] = [] | ||||||
|     configured_worker_names = set() |     configured_worker_names = set() | ||||||
|     for worker_names in platform_worker_names.values(): |     for worker_names in platform_worker_names.values(): | ||||||
|  | @ -55,7 +55,7 @@ def setup() -> Dict[str, Any]: | ||||||
|             workers += [ |             workers += [ | ||||||
|                 buildbot.plugins.worker.Worker( |                 buildbot.plugins.worker.Worker( | ||||||
|                     worker_name, |                     worker_name, | ||||||
|                     conf.machines.get_worker_password(environment, worker_name), |                     conf.machines.get_worker_password(ENVIRONMENT, worker_name), | ||||||
|                     max_builds=1, |                     max_builds=1, | ||||||
|                     keepalive_interval=3600, |                     keepalive_interval=3600, | ||||||
|                 ) |                 ) | ||||||
|  | @ -69,7 +69,7 @@ def setup() -> Dict[str, Any]: | ||||||
|     c["workers"] = workers |     c["workers"] = workers | ||||||
| 
 | 
 | ||||||
|     # Builders and Schedulers |     # Builders and Schedulers | ||||||
|     builders, schedulers = pipeline.populate(environment) |     builders, schedulers = pipeline.populate(ENVIRONMENT) | ||||||
|     c["builders"] = builders |     c["builders"] = builders | ||||||
|     c["schedulers"] = schedulers |     c["schedulers"] = schedulers | ||||||
| 
 | 
 | ||||||
|  | @ -79,7 +79,7 @@ def setup() -> Dict[str, Any]: | ||||||
|     # status of each build will be pushed to these targets. buildbot/reporters/*.py |     # status of each build will be pushed to these targets. buildbot/reporters/*.py | ||||||
|     # has a variety to choose from, like IRC bots. |     # has a variety to choose from, like IRC bots. | ||||||
| 
 | 
 | ||||||
|     gitea_status_service = gitea.blender.setup_service(environment) |     gitea_status_service = gitea.blender.setup_service(ENVIRONMENT) | ||||||
|     if gitea_status_service: |     if gitea_status_service: | ||||||
|         c["services"] = [gitea_status_service] |         c["services"] = [gitea_status_service] | ||||||
|     else: |     else: | ||||||
|  | @ -90,7 +90,7 @@ def setup() -> Dict[str, Any]: | ||||||
|     # the 'title' string will appear at the top of this buildbot installation's |     # the 'title' string will appear at the top of this buildbot installation's | ||||||
|     # home pages (linked to the 'titleURL'). |     # home pages (linked to the 'titleURL'). | ||||||
| 
 | 
 | ||||||
|     c["title"] = f"Blender Buildbot - {environment}" |     c["title"] = f"Blender Buildbot - {ENVIRONMENT}" | ||||||
|     c["titleURL"] = "https://projects.blender.org" |     c["titleURL"] = "https://projects.blender.org" | ||||||
| 
 | 
 | ||||||
|     # the 'buildbotURL' string should point to the location where the buildbot's |     # the 'buildbotURL' string should point to the location where the buildbot's | ||||||
|  | @ -113,10 +113,10 @@ def setup() -> Dict[str, Any]: | ||||||
|     c["buildbotNetUsageData"] = None |     c["buildbotNetUsageData"] = None | ||||||
| 
 | 
 | ||||||
|     # Authentication |     # Authentication | ||||||
|     c["www"]["auth"] = conf.auth.fetch_authentication(environment) |     c["www"]["auth"] = conf.auth.fetch_authentication(ENVIRONMENT) | ||||||
| 
 | 
 | ||||||
|     # Authorization |     # Authorization | ||||||
|     c["www"]["authz"] = conf.auth.fetch_authorization(environment) |     c["www"]["authz"] = conf.auth.fetch_authorization(ENVIRONMENT) | ||||||
| 
 | 
 | ||||||
|     # Disable UI - does not work |     # Disable UI - does not work | ||||||
|     c["www"]["plugins"] = { |     c["www"]["plugins"] = { | ||||||
							
								
								
									
										0
									
								
								config/worker/__init__.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								config/worker/__init__.py
									
										
									
									
									
										Normal file
									
								
							
							
								
								
									
										24
									
								
								docker-compose.override.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								docker-compose.override.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | ||||||
|  | services: | ||||||
|  |   buildbot-master: | ||||||
|  |     env_file: .env.local | ||||||
|  |     volumes: | ||||||
|  |       - ./config:/buildbot/config | ||||||
|  | 
 | ||||||
|  |   buildbot-worker: | ||||||
|  |     image: 'buildbot/buildbot-worker:${BUILDBOT_IMAGE_TAG:-v4.1.0}' | ||||||
|  |     restart: unless-stopped | ||||||
|  |     environment: | ||||||
|  |       - 'BUILDMASTER=${BUILDMASTER:-buildbot-master}' | ||||||
|  |       - 'BUILDMASTER_PORT=${BUILDBOT_WORKER_PORT:-9989}' | ||||||
|  |       - 'WORKERNAME=${WORKERNAME:-example-worker}' | ||||||
|  |       - 'WORKERPASS=${WORKERPASS:-pass}' | ||||||
|  |       - 'WORKER_ENVIRONMENT_BLACKLIST=${WORKER_ENVIRONMENT_BLACKLIST:-DOCKER_BUILDBOT* BUILDBOT_ENV_* BUILDBOT_1* WORKER_ENVIRONMENT_BLACKLIST}' | ||||||
|  |     healthcheck: | ||||||
|  |       test: | ||||||
|  |         - CMD | ||||||
|  |         - curl | ||||||
|  |         - '-f' | ||||||
|  |         - 'http://$${BUILDMASTER}:$${BUILDMASTER_PORT}' | ||||||
|  |       interval: 5s | ||||||
|  |       timeout: 20s | ||||||
|  |       retries: 10 | ||||||
|  | @ -1,18 +1,16 @@ | ||||||
| services: | services: | ||||||
|   buildbot-master: |   buildbot-master: | ||||||
|     image: 'buildbot/buildbot-master:${BUILDBOT_IMAGE_TAG:-v4.1.0}' |     image: 'buildbot/buildbot-master:${BUILDBOT_IMAGE_TAG:-v4.1.0}' | ||||||
|     hostname: buildbot-master |  | ||||||
|     restart: unless-stopped |     restart: unless-stopped | ||||||
|     ports: |  | ||||||
|       - 8010:8010 |  | ||||||
|     environment: |     environment: | ||||||
|  |       - 'HOSTNAME=${MASTER_HOSTNAME:-buildbot-master-1}' | ||||||
|       - 'BUILDBOT_CONFIG_DIR=${BUILDBOT_CONFIG_DIR:-config}' |       - 'BUILDBOT_CONFIG_DIR=${BUILDBOT_CONFIG_DIR:-config}' | ||||||
|       - 'BUILDBOT_ENVIRONMENT=${BUILDBOT_ENVIRONMENT:-LOCAL}' |       - 'BUILDBOT_CONFIG_URL=${BUILDBOT_CONFIG_URL:-https://git.braak.pro/api/packages/bartvdbraak/generic/builder.braak.pro/main/config.tar.gz}' | ||||||
|       - 'BUILDBOT_WORKER_PORT=${BUILDBOT_WORKER_PORT:-9989}' |       - 'BUILDBOT_WORKER_PORT=${BUILDBOT_WORKER_PORT:-9989}' | ||||||
|       - 'BUILDBOT_WEB_URL=${BUILDBOT_WEB_URL:-http://localhost:8010/}' |       - 'BUILDBOT_WEB_URL=${BUILDBOT_WEB_URL:-http://localhost:8010/}' | ||||||
|       - 'BUILDBOT_WEB_PORT=${BUILDBOT_WEB_PORT:-tcp:port=8010}' |       - 'BUILDBOT_WEB_PORT=${BUILDBOT_WEB_PORT:-tcp:port=8010}' | ||||||
|       - 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme123}' |       - 'POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}' | ||||||
|       - 'POSTGRES_USER=${POSTGRES_USER:-buildbot}' |       - 'POSTGRES_USER=${SERVICE_USER_POSTGRESQL}' | ||||||
|       - 'POSTGRES_DB=${POSTGRES_DB:-buildbot}' |       - 'POSTGRES_DB=${POSTGRES_DB:-buildbot}' | ||||||
|       - 'BUILDBOT_DB_URL=postgresql+psycopg2://{POSTGRES_USER}:{POSTGRES_PASSWORD}@postgresql/{POSTGRES_DB}' |       - 'BUILDBOT_DB_URL=postgresql+psycopg2://{POSTGRES_USER}:{POSTGRES_PASSWORD}@postgresql/{POSTGRES_DB}' | ||||||
|     healthcheck: |     healthcheck: | ||||||
|  | @ -27,11 +25,6 @@ services: | ||||||
|     depends_on: |     depends_on: | ||||||
|       postgresql: |       postgresql: | ||||||
|         condition: service_healthy |         condition: service_healthy | ||||||
|     volumes: |  | ||||||
|       - ./buildbot/config:/buildbot/config |  | ||||||
|       - ./buildbot/master.cfg:/buildbot/master.cfg |  | ||||||
|     networks: |  | ||||||
|       buildbot: null |  | ||||||
|   postgresql: |   postgresql: | ||||||
|     image: 'postgres:${POSTGRES_IMAGE_TAG:-16-alpine}' |     image: 'postgres:${POSTGRES_IMAGE_TAG:-16-alpine}' | ||||||
|     restart: unless-stopped |     restart: unless-stopped | ||||||
|  | @ -45,33 +38,8 @@ services: | ||||||
|     volumes: |     volumes: | ||||||
|       - 'buildbot-db:/var/lib/postgresql/data' |       - 'buildbot-db:/var/lib/postgresql/data' | ||||||
|     environment: |     environment: | ||||||
|       - 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme123}' |       - 'POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}' | ||||||
|       - 'POSTGRES_USER=${POSTGRES_USER:-buildbot}' |       - 'POSTGRES_USER=${SERVICE_USER_POSTGRESQL}' | ||||||
|       - 'POSTGRES_DB=${POSTGRES_DB:-buildbot}' |       - 'POSTGRES_DB=${POSTGRES_DB:-buildbot}' | ||||||
|     networks: |  | ||||||
|       buildbot: null |  | ||||||
|   buildbot-worker: |  | ||||||
|     image: 'buildbot/buildbot-worker:${BUILDBOT_IMAGE_TAG:-v4.1.0}' |  | ||||||
|     restart: unless-stopped |  | ||||||
|     environment: |  | ||||||
|       - 'BUILDMASTER=${BUILDMASTER:-buildbot-master}' |  | ||||||
|       - 'BUILDMASTER_PORT=${BUILDBOT_WORKER_PORT:-9989}' |  | ||||||
|       - 'BUILDBOT_ENVIRONMENT=${BUILDBOT_ENVIRONMENT:-LOCAL}' |  | ||||||
|       - 'WORKERNAME=${WORKERNAME:-localhost}' |  | ||||||
|       - 'WORKERPASS=${WORKERPASS:-localhost}' |  | ||||||
|       - 'WORKER_ENVIRONMENT_BLACKLIST=${WORKER_ENVIRONMENT_BLACKLIST:-DOCKER_BUILDBOT* BUILDBOT_ENV_* BUILDBOT_1* WORKER_ENVIRONMENT_BLACKLIST}' |  | ||||||
|     healthcheck: |  | ||||||
|       test: |  | ||||||
|         - CMD |  | ||||||
|         - curl |  | ||||||
|         - '-f' |  | ||||||
|         - 'http://$${BUILDMASTER}:$${BUILDMASTER_PORT}' |  | ||||||
|       interval: 5s |  | ||||||
|       timeout: 20s |  | ||||||
|       retries: 10 |  | ||||||
|     networks: |  | ||||||
|       buildbot: null |  | ||||||
| volumes: | volumes: | ||||||
|   buildbot-db: {} |   buildbot-db: {} | ||||||
| networks: |  | ||||||
|   buildbot: {} |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue