2022-08-06 11:07:52 +02:00
|
|
|
---
|
|
|
|
kind: pipeline
|
2023-03-21 17:48:29 +01:00
|
|
|
type: docker
|
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
|
2023-04-10 18:59:36 +02:00
|
|
|
- name: docker_build_and_push_master
|
2022-08-06 11:07:52 +02:00
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
2022-08-06 20:22:13 +02:00
|
|
|
username:
|
|
|
|
from_secret: DOCKERHUB_USER
|
2022-08-06 11:07:52 +02:00
|
|
|
password:
|
|
|
|
from_secret: DOCKERHUB_PASS
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
repo: quotengrote/allzweckcontainer
|
|
|
|
tags:
|
|
|
|
- latest
|
|
|
|
- ${DRONE_COMMIT_SHA:0:8}
|
2023-04-10 18:47:13 +02:00
|
|
|
- ${DRONE_COMMIT_BRANCH}
|
2022-08-06 11:07:52 +02:00
|
|
|
when:
|
|
|
|
branch:
|
2022-08-26 17:26:15 +02:00
|
|
|
- master
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- pull_request
|
2023-04-10 18:59:36 +02:00
|
|
|
|
|
|
|
- name: docker_build_and_push
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
username:
|
|
|
|
from_secret: DOCKERHUB_USER
|
|
|
|
password:
|
|
|
|
from_secret: DOCKERHUB_PASS
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
repo: quotengrote/allzweckcontainer
|
|
|
|
tags:
|
|
|
|
- ${DRONE_COMMIT_SHA:0:8}
|
|
|
|
- ${DRONE_COMMIT_BRANCH}
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- pull_request
|