Port back commits from blender-devops #1
					 68 changed files with 83 additions and 42 deletions
				
			
		| 
						 | 
					@ -1,4 +1,5 @@
 | 
				
			||||||
SERVICE_USER_POSTGRESQL=buildbot
 | 
					POSTGRES_PASSWORD=buildbot
 | 
				
			||||||
SERVICE_PASSWORD_POSTGRESQL=changeme!
 | 
					POSTGRES_PASSWORD=changeme!
 | 
				
			||||||
 | 
					BUILDBOT_CONFIG_URL=''
 | 
				
			||||||
GITEA_URL=https://projects.blender.org
 | 
					GITEA_URL=https://projects.blender.org
 | 
				
			||||||
BUILDBOT_WEB_URL=http://localhost:8010/
 | 
					BUILDBOT_WEB_URL=http://localhost:8010/
 | 
				
			||||||
							
								
								
									
										28
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -1,3 +1,29 @@
 | 
				
			||||||
 | 
					# Hidden files
 | 
				
			||||||
.venv
 | 
					.venv
 | 
				
			||||||
.env.staging
 | 
					 | 
				
			||||||
.env.production
 | 
					.env.production
 | 
				
			||||||
 | 
					.env.staging
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 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
 | 
				
			||||||
							
								
								
									
										15
									
								
								buildbot/master.cfg
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								buildbot/master.cfg
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,15 @@
 | 
				
			||||||
 | 
					# -*- 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()
 | 
				
			||||||
| 
						 | 
					@ -1,8 +0,0 @@
 | 
				
			||||||
# -*- python -*-
 | 
					 | 
				
			||||||
# ex: set filetype=python:
 | 
					 | 
				
			||||||
import importlib
 | 
					 | 
				
			||||||
import os
 | 
					 | 
				
			||||||
import sys
 | 
					 | 
				
			||||||
import setup
 | 
					 | 
				
			||||||
importlib.reload(setup)
 | 
					 | 
				
			||||||
BuildmasterConfig = setup.setup()
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,24 +0,0 @@
 | 
				
			||||||
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,16 +1,18 @@
 | 
				
			||||||
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_CONFIG_URL=${BUILDBOT_CONFIG_URL:-https://git.braak.pro/api/packages/bartvdbraak/generic/builder.braak.pro/main/config.tar.gz}'
 | 
					      # - '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=${SERVICE_PASSWORD_POSTGRESQL}'
 | 
					      - 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme123}'
 | 
				
			||||||
      - 'POSTGRES_USER=${SERVICE_USER_POSTGRESQL}'
 | 
					      - 'POSTGRES_USER=${POSTGRES_USER:-buildbot}'
 | 
				
			||||||
      - '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:
 | 
				
			||||||
| 
						 | 
					@ -25,6 +27,11 @@ 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
 | 
				
			||||||
| 
						 | 
					@ -38,8 +45,32 @@ services:
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - 'buildbot-db:/var/lib/postgresql/data'
 | 
					      - 'buildbot-db:/var/lib/postgresql/data'
 | 
				
			||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      - 'POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}'
 | 
					      - 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme123}'
 | 
				
			||||||
      - 'POSTGRES_USER=${SERVICE_USER_POSTGRESQL}'
 | 
					      - 'POSTGRES_USER=${POSTGRES_USER:-buildbot}'
 | 
				
			||||||
      - '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}'
 | 
				
			||||||
 | 
					      - '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
 | 
				
			||||||
 | 
					    networks:
 | 
				
			||||||
 | 
					      buildbot: null
 | 
				
			||||||
volumes:
 | 
					volumes:
 | 
				
			||||||
  buildbot-db: {}
 | 
					  buildbot-db: {}
 | 
				
			||||||
 | 
					networks:
 | 
				
			||||||
 | 
					  buildbot: {}
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue