allzweckcontainer/.drone.yml

48 lines
1.1 KiB
YAML
Raw Normal View History

2022-08-06 11:07:52 +02:00
---
kind: pipeline
2022-10-28 18:22:11 +02:00
type: kubernetes
2022-08-06 11:07:52 +02:00
name: default
steps:
2022-08-06 20:22:13 +02:00
# prüfe ob secrets im Repo sind
2022-08-06 11:07:52 +02:00
- name: run gitleaks
image: plugins/gitleaks
settings:
path: .
2022-08-06 20:22:13 +02:00
# linter für Dockerfiles
2022-08-06 11:07:52 +02:00
# https://github.com/hadolint/hadolint/blob/master/docs/INTEGRATION.md
- name: hadolint
image: hadolint/hadolint:latest-debian
# image: ghcr.io/hadolint/hadolint:latest-debian
commands:
- hadolint --version
- hadolint Dockerfile
2022-08-06 20:22:13 +02:00
# Bauen, taggen und pushen
2022-08-06 11:07:52 +02:00
- name: docker_build_and_push
image: plugins/docker
settings:
# Dockerhub-Username
2022-08-06 20:22:13 +02:00
# als Org-Secret hinterlegt
username:
from_secret: DOCKERHUB_USER
2022-08-06 11:07:52 +02:00
# Dockerhub-Password
# als Org-Secret hinterlegt
password:
from_secret: DOCKERHUB_PASS
# Container-Registry
# registry: hub.docker.com
# Name des Containerfiles
dockerfile: Dockerfile
# Repo auf dem Dockerhub
repo: quotengrote/allzweckcontainer
tags:
- latest
- ${DRONE_COMMIT_SHA:0:8}
when:
branch:
- master
event:
exclude:
- pull_request