use kaniko to build container images
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Torma Kristóf 2020-04-28 19:27:51 +02:00
parent 20bee844ef
commit a278ba3f74

View File

@ -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 password:
DOCKER_PASSWORD: from_secret: DOCKER_PASSWORD
from_secret: DOCKER_PASSWORD tags:
commands: - latest
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - ${DRONE_BUILD_NUMBER}
- docker build -t="$DOCKER_USERNAME/producer-endpoint" .
- 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}