use kaniko to build container images
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is failing
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	continuous-integration/drone/push Build is failing
				
			This commit is contained in:
		
							
								
								
									
										48
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										48
									
								
								.drone.yml
									
									
									
									
									
								
							@@ -13,22 +13,18 @@ steps:
 | 
				
			|||||||
  - find . -name "*.py" -exec python3 -m mccabe --min 3 '{}' + || if [ $? -eq 1 ]; then echo "you fail"; fi
 | 
					  - find . -name "*.py" -exec python3 -m mccabe --min 3 '{}' + || if [ $? -eq 1 ]; then echo "you fail"; fi
 | 
				
			||||||
  - bandit -r . + || if [ $? -eq 1 ]; then echo "you fail"; fi
 | 
					  - bandit -r . + || if [ $? -eq 1 ]; then echo "you fail"; fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: build
 | 
					- name: build-app
 | 
				
			||||||
  image: docker:stable-dind
 | 
					  image: banzaicloud/drone-kaniko
 | 
				
			||||||
  volumes:
 | 
					  settings:
 | 
				
			||||||
  - name: dockersock
 | 
					    registry: registry.kmlabz.com
 | 
				
			||||||
    path: /var/run
 | 
					    repo: goldenpogacsa/${DRONE_REPO_NAME}
 | 
				
			||||||
  environment:
 | 
					    username:
 | 
				
			||||||
      DOCKER_USERNAME:
 | 
					 | 
				
			||||||
      from_secret: DOCKER_USERNAME
 | 
					      from_secret: DOCKER_USERNAME
 | 
				
			||||||
      DOCKER_PASSWORD:
 | 
					    password:
 | 
				
			||||||
      from_secret: DOCKER_PASSWORD
 | 
					      from_secret: DOCKER_PASSWORD
 | 
				
			||||||
  commands:
 | 
					    tags:
 | 
				
			||||||
  - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
 | 
					      - latest
 | 
				
			||||||
  - docker build -t="$DOCKER_USERNAME/producer-endpoint" .
 | 
					      - ${DRONE_BUILD_NUMBER}
 | 
				
			||||||
  - docker build -t="$DOCKER_USERNAME/producer-endpoint:$DRONE_BUILD_NUMBER" .
 | 
					 | 
				
			||||||
  - docker push "$DOCKER_USERNAME/producer-endpoint"
 | 
					 | 
				
			||||||
  - docker push "$DOCKER_USERNAME/producer-endpoint:$DRONE_BUILD_NUMBER"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: slack
 | 
					- name: slack
 | 
				
			||||||
  image: plugins/slack
 | 
					  image: plugins/slack
 | 
				
			||||||
@@ -40,14 +36,16 @@ steps:
 | 
				
			|||||||
  when:
 | 
					  when:
 | 
				
			||||||
    status: [ failure ]
 | 
					    status: [ failure ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
services:
 | 
					- name: build-docs
 | 
				
			||||||
- name: docker
 | 
					  image: banzaicloud/drone-kaniko
 | 
				
			||||||
  image: docker:stable-dind
 | 
					  settings:
 | 
				
			||||||
  privileged: true
 | 
					    dockerfile: docs/Dockerfile
 | 
				
			||||||
  volumes:
 | 
					    registry: registry.kmlabz.com
 | 
				
			||||||
  - name: dockersock
 | 
					    repo: goldenpogacsa/consumer-api-docs
 | 
				
			||||||
    path: /var/run
 | 
					    username:
 | 
				
			||||||
 | 
					      from_secret: DOCKER_USERNAME
 | 
				
			||||||
volumes:
 | 
					    password:
 | 
				
			||||||
- name: dockersock
 | 
					      from_secret: DOCKER_PASSWORD
 | 
				
			||||||
  temp: {}
 | 
					    tags:
 | 
				
			||||||
 | 
					      - latest
 | 
				
			||||||
 | 
					      - ${DRONE_BUILD_NUMBER}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user