tricks/.drone.yml

70 lines
1.2 KiB
YAML
Raw Normal View History

---
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
2023-07-03 18:41:23 +00:00
dry_run: false
squash: true
2023-07-03 17:24:08 +00:00
compress: true
tags:
- pre-scan
- "${DRONE_COMMIT_SHA:0:8}"
2023-07-03 17:05:23 +00:00
- name: trivy-scan
image: scm.project42.io/elia/trivy:production
privileged: true
2023-07-03 17:05:23 +00:00
commands:
2023-07-03 18:41:23 +00:00
- /usr/local/bin/trivy image --image-src remote scm.project42.io/elia/trivy:pre-scan
failure: ignore
2023-07-03 17:05:23 +00:00
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
2023-07-03 18:41:23 +00:00
compress: true
tags:
- production
- "${DRONE_COMMIT_SHA:0:8}"
when:
event:
- promote
target:
- production
depends_on:
- test
trigger:
event:
- promote
target:
- production