docker-getgrav/.drone.yml

189 lines
3.0 KiB
YAML

---
kind: pipeline
type: docker
name: lint
platform:
os: linux
arch: amd64
steps:
- name: Lint Dockerfiles
pull: if-not-exists
image: hadolint/hadolint:latest-debian
commands:
- hadolint --version
- hadolint */Dockerfile*
when:
status:
- failure
- success
- name: Lint entrypoint scripts
pull: if-not-exists
image: koalaman/shellcheck-alpine
commands:
- shellcheck --version
- shellcheck entrypoint*.sh
when:
status:
- failure
- success
trigger:
event:
- pull_request
- push
ref:
exclude:
- refs/heads/renovate/*
---
kind: pipeline
type: docker
name: default_tests_1.7
platform:
os: linux
arch: amd64
steps:
- name: build test
pull: if-not-exists
image: thegeeklab/drone-docker-buildx
settings:
dockerfile: 1.7/Dockerfile
dry_run: true
password:
from_secret: dockerhub_password_ro
platforms: linux/amd64,linux/arm64
repo: mwalbeck/getgrav
username:
from_secret: dockerhub_username
trigger:
event:
- pull_request
depends_on:
- lint
---
kind: pipeline
type: docker
name: default_tests_1.7-prod
platform:
os: linux
arch: amd64
steps:
- name: build test
pull: if-not-exists
image: thegeeklab/drone-docker-buildx
settings:
dockerfile: 1.7/Dockerfile.prod
dry_run: true
password:
from_secret: dockerhub_password_ro
platforms: linux/amd64,linux/arm64
repo: mwalbeck/getgrav
username:
from_secret: dockerhub_username
trigger:
event:
- pull_request
depends_on:
- lint
---
kind: pipeline
type: docker
name: release_1.7
platform:
os: linux
arch: amd64
steps:
- name: determine tags
pull: if-not-exists
image: mwalbeck/determine-docker-tags
environment:
APP_NAME: GRAV
CUSTOM_TAGS: latest
DOCKERFILE_PATH: 1.7/Dockerfile
INCLUDE_MAJOR: negative
VERSION_TYPE: docker_env
- name: build and publish
pull: if-not-exists
image: thegeeklab/drone-docker-buildx
settings:
dockerfile: 1.7/Dockerfile
password:
from_secret: dockerhub_password
platforms: linux/amd64,linux/arm64
repo: mwalbeck/getgrav
username:
from_secret: dockerhub_username
trigger:
branch:
- master
event:
- push
depends_on:
- lint
---
kind: pipeline
type: docker
name: release_1.7-prod
platform:
os: linux
arch: amd64
steps:
- name: determine tags
pull: if-not-exists
image: mwalbeck/determine-docker-tags
environment:
APP_ENV: prod
APP_NAME: GRAV
CUSTOM_TAGS: latest-prod
DOCKERFILE_PATH: 1.7/Dockerfile.prod
INCLUDE_MAJOR: negative
VERSION_TYPE: docker_env
- name: build and publish
pull: if-not-exists
image: thegeeklab/drone-docker-buildx
settings:
dockerfile: 1.7/Dockerfile.prod
password:
from_secret: dockerhub_password
platforms: linux/amd64,linux/arm64
repo: mwalbeck/getgrav
username:
from_secret: dockerhub_username
trigger:
branch:
- master
event:
- push
depends_on:
- lint
---
kind: signature
hmac: 510995e2c823c0fc6e76df59b2290f27b58094f9bb28c3ec98735202f0246b5f
...