tricks/.drone.yml
Elia el Lazkani f246f1b2a3
All checks were successful
continuous-integration/drone/push Build is passing
chore(): Making step container privileged
2023-07-03 20:15:00 +02:00

69 lines
1.2 KiB
YAML

---
kind: pipeline
name: test
steps:
- name: test-build-container
image: plugins/docker
settings:
registry: scm.project42.io
dockerfile: Dockerfile
username:
from_secret: registry_username
password:
from_secret: registry_password
repo: scm.project42.io/elia/trivy
dry_run: true
squash: true
purge: false
compress: true
tags:
- pre-scan
- "${DRONE_COMMIT_SHA:0:8}"
- name: trivy-scan
image: scm.project42.io/elia/trivy:production
privileged: true
commands:
- trivy image scm.project42.io/elia/trivy:pre-scan
failure: ignore
trigger:
exclude:
event:
- promote
---
kind: pipeline
name: build
steps:
- name: build-container
image: plugins/docker
settings:
registry: scm.project42.io
dockerfile: Dockerfile
username:
from_secret: registry_username
password:
from_secret: registry_password
repo: scm.project42.io/elia/trivy
dry_run: false
squash: true
tags:
- production
- "${DRONE_COMMIT_SHA:0:8}"
when:
event:
- promote
target:
- production
depends_on:
- test
trigger:
event:
- promote
target:
- production