feat (devops): add local image build for releases
This commit is contained in:
		
							parent
							
								
									7d3ff89fe5
								
							
						
					
					
						commit
						ff4c42dc24
					
				
							
								
								
									
										52
									
								
								docker-compose.build.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								docker-compose.build.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,52 @@
 | 
			
		||||
version: '3.2'
 | 
			
		||||
 | 
			
		||||
services:
 | 
			
		||||
  cic-cache:
 | 
			
		||||
    image: ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-cache:${TAG:-latest}
 | 
			
		||||
    build:
 | 
			
		||||
      context: apps/cic-cache
 | 
			
		||||
      dockerfile: docker/Dockerfile
 | 
			
		||||
      cache_from:
 | 
			
		||||
        - ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-cache:latest
 | 
			
		||||
  cic-eth:
 | 
			
		||||
    image: ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-eth:${TAG:-latest}
 | 
			
		||||
    build:
 | 
			
		||||
      context: apps/cic-eth
 | 
			
		||||
      dockerfile: docker/Dockerfile
 | 
			
		||||
      cache_from:
 | 
			
		||||
        - ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-eth:latest
 | 
			
		||||
  cic-meta:
 | 
			
		||||
    image: ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-meta:${TAG:-latest}
 | 
			
		||||
    build:
 | 
			
		||||
      context: apps/cic-meta
 | 
			
		||||
      dockerfile: docker/Dockerfile
 | 
			
		||||
      cache_from:
 | 
			
		||||
        - ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-meta:latest
 | 
			
		||||
  cic-notify:
 | 
			
		||||
    image: ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-notify:${TAG:-latest}
 | 
			
		||||
    build:
 | 
			
		||||
      context: apps/cic-notify
 | 
			
		||||
      dockerfile: docker/Dockerfile
 | 
			
		||||
      cache_from:
 | 
			
		||||
        - ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-notify:latest
 | 
			
		||||
  funga-eth:
 | 
			
		||||
    image: ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/funga-eth:${TAG:-latest}
 | 
			
		||||
    build:
 | 
			
		||||
      context: apps/cic-signer
 | 
			
		||||
      dockerfile: Dockerfile
 | 
			
		||||
      cache_from:
 | 
			
		||||
        - ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/funga-eth:latest
 | 
			
		||||
  cic-ussd:
 | 
			
		||||
    image: ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-ussd:${TAG:-latest}
 | 
			
		||||
    build:
 | 
			
		||||
      context: apps/cic-ussd
 | 
			
		||||
      dockerfile: docker/Dockerfile
 | 
			
		||||
      cache_from:
 | 
			
		||||
        - ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-ussd:latest
 | 
			
		||||
  cic-contract-bootstrap:
 | 
			
		||||
    image: ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-contract-bootstrap:${TAG:-latest}
 | 
			
		||||
    build:
 | 
			
		||||
      context: apps/contract-migration
 | 
			
		||||
      dockerfile: docker/Dockerfile
 | 
			
		||||
      cache_from:
 | 
			
		||||
        - ${IMAGE_BASE_URL:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-ussd:latest
 | 
			
		||||
							
								
								
									
										23
									
								
								scripts/local-build-push.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								scripts/local-build-push.sh
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,23 @@
 | 
			
		||||
#!/usr/bin/env sh
 | 
			
		||||
 | 
			
		||||
# dependencies:
 | 
			
		||||
#   - docker-compose >= v1.25.0
 | 
			
		||||
#   - sbot >= v1.0.0.
 | 
			
		||||
 | 
			
		||||
set -e
 | 
			
		||||
 | 
			
		||||
export DOCKER_BUILDKIT=1
 | 
			
		||||
export COMPOSE_DOCKER_CLI_BUILD=1
 | 
			
		||||
 | 
			
		||||
PREDICTED_TAG=$(sbot predict version -m auto)
 | 
			
		||||
 | 
			
		||||
docker-compose -f docker-compose.build.yml build --progress plain
 | 
			
		||||
 | 
			
		||||
export TAG=v$PREDICTED_TAG
 | 
			
		||||
 | 
			
		||||
docker-compose -f docker-compose.build.yml build --progress plain
 | 
			
		||||
docker-compose -f docker-compose.build.yml push
 | 
			
		||||
 | 
			
		||||
export TAG=latest
 | 
			
		||||
 | 
			
		||||
docker-compose -f docker-compose.build.yml push
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user